mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-22 20:01:34 +00:00
SERVER: Hellhounds stalk their prey
This commit is contained in:
parent
a2d1078ec3
commit
45a9714ea6
1 changed files with 12 additions and 5 deletions
|
@ -121,18 +121,25 @@ void() Dog_Walk_Setup =
|
||||||
dog_runanim();
|
dog_runanim();
|
||||||
};
|
};
|
||||||
|
|
||||||
// decide our walktype based on player distance
|
|
||||||
void() Dog_Think =
|
void() Dog_Think =
|
||||||
{
|
{
|
||||||
if(vlen(self.enemy.origin - self.origin) < 200)
|
// Hellhounds begin to run whenever their target is in their line of sight.
|
||||||
self.walktype = 2;
|
// So perform a tracemove and see if it hits it
|
||||||
else
|
if (self.ads_release == 0) {
|
||||||
|
float result = tracemove(self.origin, VEC_HULL_MIN, VEC_HULL_MAX, self.enemy.origin, TRUE, self);
|
||||||
|
self.ads_release = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stalk...
|
||||||
|
if (self.ads_release == 0)
|
||||||
self.walktype = 1;
|
self.walktype = 1;
|
||||||
|
// Charge...
|
||||||
|
else
|
||||||
|
self.walktype = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
float dogCount;
|
float dogCount;
|
||||||
|
|
||||||
|
|
||||||
void(entity ent) Dog_Death_Cleanup = {
|
void(entity ent) Dog_Death_Cleanup = {
|
||||||
// Already dead
|
// Already dead
|
||||||
if(ent.aistatus == "0") {
|
if(ent.aistatus == "0") {
|
||||||
|
|
Loading…
Reference in a new issue