mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 15:40:26 +00:00
multi:: more modern centering
This commit is contained in:
parent
72865478aa
commit
9a25da1989
10
graph.cpp
10
graph.cpp
@ -5035,11 +5035,10 @@ EX void drawthemap() {
|
|||||||
if(multi::centerplayer != -1)
|
if(multi::centerplayer != -1)
|
||||||
cwtV = multi::whereis[multi::centerplayer];
|
cwtV = multi::whereis[multi::centerplayer];
|
||||||
else {
|
else {
|
||||||
hyperpoint h;
|
hyperpoint h = Hypc;
|
||||||
for(int i=0; i<3; i++) h[i] = 0;
|
|
||||||
for(int p=0; p<multi::players; p++) if(multi::playerActive(p)) {
|
for(int p=0; p<multi::players; p++) if(multi::playerActive(p)) {
|
||||||
hyperpoint h1 = unshift(tC0(multi::whereis[p]));
|
hyperpoint h1 = unshift(tC0(multi::whereis[p]));
|
||||||
for(int i=0; i<3; i++) h[i] += h1[i];
|
h += h1;
|
||||||
}
|
}
|
||||||
h = mid(h, h);
|
h = mid(h, h);
|
||||||
cwtV = shiftless(rgpushxto0(h));
|
cwtV = shiftless(rgpushxto0(h));
|
||||||
@ -5052,11 +5051,10 @@ EX void drawthemap() {
|
|||||||
else if(multi::centerplayer != -1)
|
else if(multi::centerplayer != -1)
|
||||||
cwtV = shmup::pc[multi::centerplayer]->pat;
|
cwtV = shmup::pc[multi::centerplayer]->pat;
|
||||||
else {
|
else {
|
||||||
hyperpoint h;
|
hyperpoint h = Hypc;
|
||||||
for(int i=0; i<3; i++) h[i] = 0;
|
|
||||||
for(int p=0; p<multi::players; p++) {
|
for(int p=0; p<multi::players; p++) {
|
||||||
hyperpoint h1 = unshift(tC0(shmup::pc[p]->pat));
|
hyperpoint h1 = unshift(tC0(shmup::pc[p]->pat));
|
||||||
for(int i=0; i<3; i++) h[i] += h1[i];
|
h += h1;
|
||||||
}
|
}
|
||||||
h = mid(h, h);
|
h = mid(h, h);
|
||||||
cwtV = shiftless(rgpushxto0(h));
|
cwtV = shiftless(rgpushxto0(h));
|
||||||
|
Loading…
Reference in New Issue
Block a user