1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

3d:: limit distance between players

This commit is contained in:
Zeno Rogue 2019-03-11 18:49:41 +01:00
parent 168a9bc304
commit 51ae22363d

View File

@ -1314,7 +1314,7 @@ monster *playerCrash(monster *who, hyperpoint where) {
for(int j=0; j<players; j++) if(pc[j] && pc[j]!=who) { for(int j=0; j<players; j++) if(pc[j] && pc[j]!=who) {
if(pc[j]->isVirtual) continue; if(pc[j]->isVirtual) continue;
double d = intval(pc[j]->pat*C0, where); double d = intval(pc[j]->pat*C0, where);
if(d < 0.1 * SCALE2 || d > 100) return pc[j]; if(d < 0.1 * SCALE2 || d > 100 || (DIM == 3 && hdist(tC0(pc[j]->pat), where) > sightranges[geometry]/2)) return pc[j];
} }
return NULL; return NULL;
} }