Server: Find a new target/enemy other than Players in Last Stand

Fixes https://github.com/nzp-team/nzportable/issues/20
This commit is contained in:
moto 2022-10-25 12:49:02 -04:00
parent 4cf879558f
commit 22fb84ac25
2 changed files with 4 additions and 3 deletions

Binary file not shown.

View file

@ -88,8 +88,9 @@ entity(entity blarg) find_new_enemy =
//////////////////////////////
while(player) {
if (player.downed == true) {
return world;
}
player = find(player,classname,"player");
continue;
}
dist = vlen(self.origin - player.origin);
if (dist < bestdist) {
@ -745,4 +746,4 @@ void() Do_Zombie_AI = {
Zombie_AI();
self = oself;
lastzombie = z;
}
}