mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-29 07:12:20 +00:00
SERVER/FTE: Re-introduce trace penetration for Zombies
This commit is contained in:
parent
4e88aa404a
commit
3de18c324c
2 changed files with 28 additions and 38 deletions
|
@ -824,56 +824,46 @@ void() Do_Zombie_AI = {
|
||||||
|
|
||||||
void() AI_SetAllEnemiesBBOX =
|
void() AI_SetAllEnemiesBBOX =
|
||||||
{
|
{
|
||||||
entity list;
|
entity zombies = find(world, classname, "ai_zombie");
|
||||||
|
|
||||||
// First target zombies
|
while(zombies != world) {
|
||||||
list = find(world, classname, "ai_zombie");
|
zombies.last_solid = zombies.solid;
|
||||||
while (list != world) {
|
zombies.solid = SOLID_BBOX;
|
||||||
list.last_solid = list.solid;
|
|
||||||
list.solid = SOLID_BBOX;
|
|
||||||
list.had_solid_modified = true;
|
|
||||||
|
|
||||||
if (list.head) {
|
if (zombies.head) {
|
||||||
list.head.last_solid = list.head.solid;
|
zombies.head.last_solid = zombies.head.solid;
|
||||||
list.head.solid = SOLID_BBOX;
|
zombies.head.solid = SOLID_BBOX;
|
||||||
list.head.had_solid_modified = true;
|
|
||||||
}
|
|
||||||
if (list.larm) {
|
|
||||||
list.larm.last_solid = list.larm.solid;
|
|
||||||
list.larm.solid = SOLID_BBOX;
|
|
||||||
list.larm.had_solid_modified = true;
|
|
||||||
}
|
|
||||||
if (list.rarm) {
|
|
||||||
list.rarm.last_solid = list.rarm.solid;
|
|
||||||
list.rarm.solid = SOLID_BBOX;
|
|
||||||
list.larm.had_solid_modified = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list = find(list, classname, "ai_zombie");
|
if (zombies.larm) {
|
||||||
}
|
zombies.larm.last_solid = zombies.larm.solid;
|
||||||
|
zombies.larm.solid = SOLID_BBOX;
|
||||||
|
}
|
||||||
|
|
||||||
// Now Dogs
|
if (zombies.rarm) {
|
||||||
list = find(world, classname, "ai_dog");
|
zombies.rarm.last_solid = zombies.rarm.solid;
|
||||||
while (list != world) {
|
zombies.rarm.solid = SOLID_BBOX;
|
||||||
list.last_solid = list.solid;
|
}
|
||||||
list.solid = SOLID_BBOX;
|
|
||||||
list.had_solid_modified = true;
|
|
||||||
|
|
||||||
list = find(list, classname, "ai_dog");
|
zombies = find(zombies, classname, "ai_zombie");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void() AI_RevertEnemySolidState =
|
void() AI_RevertEnemySolidState =
|
||||||
{
|
{
|
||||||
entity list;
|
entity zombies = find(world, classname, "ai_zombie");
|
||||||
|
|
||||||
list = findfloat(world, had_solid_modified, true);
|
while(zombies != world) {
|
||||||
|
zombies.solid = zombies.last_solid;
|
||||||
|
|
||||||
while (list != world) {
|
if (zombies.head)
|
||||||
list.solid = list.last_solid;
|
zombies.head.solid = zombies.head.last_solid;
|
||||||
list.had_solid_modified = false;
|
if (zombies.larm)
|
||||||
|
zombies.larm.solid = zombies.larm.last_solid;
|
||||||
|
if (zombies.rarm)
|
||||||
|
zombies.rarm.solid = zombies.rarm.last_solid;
|
||||||
|
|
||||||
list = findfloat(list, had_solid_modified, true);
|
zombies = find(zombies, classname, "ai_zombie");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -949,7 +949,7 @@ void (float shotcount, float sprd, float Damage, float side) FireTrace =
|
||||||
|
|
||||||
#ifdef FTE
|
#ifdef FTE
|
||||||
|
|
||||||
//AI_SetAllEnemiesBBOX();
|
AI_SetAllEnemiesBBOX();
|
||||||
|
|
||||||
#endif // FTE
|
#endif // FTE
|
||||||
|
|
||||||
|
@ -957,7 +957,7 @@ void (float shotcount, float sprd, float Damage, float side) FireTrace =
|
||||||
|
|
||||||
#ifdef FTE
|
#ifdef FTE
|
||||||
|
|
||||||
//AI_RevertEnemySolidState();
|
AI_RevertEnemySolidState();
|
||||||
|
|
||||||
#endif // FTE
|
#endif // FTE
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue