SERVER: Fix finding target for window reaching

This commit is contained in:
Steam Deck User 2023-01-24 21:34:10 -05:00
parent 5df73e8431
commit 5378bafa18
2 changed files with 4 additions and 18 deletions

View file

@ -522,20 +522,6 @@ float() TryWalkToEnemy =
}
};
#ifndef PC
float() SetUpGoalDummy =
{
self.goaldummy.origin = Get_Waypoint_Near(self);
setorigin(self.goaldummy,self.goaldummy.origin);
self.goalentity = self.goaldummy;
if (!self.goalentity)
bprint(PRINT_HIGH, "Could not find waypoint for zombie\n");
return 1; //because we can't actually know if it was good or not... yet
};
#endif
void() PathfindToEnemy =
{
float path_result;

View file

@ -909,17 +909,17 @@ void() zombie_attack =
local entity who;
local float found;
found = 0;
who = findradius(self.origin,70);
while(who && found == 0 )
who = findradius(self.origin, 70);
while (who != world && found == false)
{
if(who.classname == "player")
{
found = 1;
found = true;
}
else
who = who.chain;
}
if(found == 1)
if (found == true)
{
zombie_attack_through_w1();
return;