mirror of
https://github.com/nzp-team/quakec.git
synced 2025-02-08 09:21:45 +00:00
SERVER: Fix finding target for window reaching
This commit is contained in:
parent
5df73e8431
commit
5378bafa18
2 changed files with 4 additions and 18 deletions
|
@ -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 =
|
void() PathfindToEnemy =
|
||||||
{
|
{
|
||||||
float path_result;
|
float path_result;
|
||||||
|
|
|
@ -909,17 +909,17 @@ void() zombie_attack =
|
||||||
local entity who;
|
local entity who;
|
||||||
local float found;
|
local float found;
|
||||||
found = 0;
|
found = 0;
|
||||||
who = findradius(self.origin,70);
|
who = findradius(self.origin, 70);
|
||||||
while(who && found == 0 )
|
while (who != world && found == false)
|
||||||
{
|
{
|
||||||
if(who.classname == "player")
|
if(who.classname == "player")
|
||||||
{
|
{
|
||||||
found = 1;
|
found = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
who = who.chain;
|
who = who.chain;
|
||||||
}
|
}
|
||||||
if(found == 1)
|
if (found == true)
|
||||||
{
|
{
|
||||||
zombie_attack_through_w1();
|
zombie_attack_through_w1();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue