diff --git a/source/server/ai/ai_core.qc b/source/server/ai/ai_core.qc index 83d5aba..c38d100 100644 --- a/source/server/ai/ai_core.qc +++ b/source/server/ai/ai_core.qc @@ -783,3 +783,57 @@ void() Do_Zombie_AI = { self = oself; lastzombie = z; } + +#ifdef FTE + +void() AI_SetAllEnemiesBBOX = +{ + entity list; + + // First target zombies + list = find(world, classname, "ai_zombie"); + while (list != world) { + list.solid = SOLID_BBOX; + + if (list.head) list.head.solid = SOLID_BBOX; + if (list.larm) list.larm.solid = SOLID_BBOX; + if (list.rarm) list.rarm.solid = SOLID_BBOX; + + list = find(list, classname, "ai_zombie"); + } + + // Now Dogs + list = find(world, classname, "ai_dog"); + while (list != world) { + list.solid = SOLID_BBOX; + + list = find(list, classname, "ai_dog"); + } +} + +void() AI_SetAllEnemiesCorpse = +{ + entity list; + + // First target zombies + list = find(world, classname, "ai_zombie"); + while (list != world) { + list.solid = SOLID_CORPSE; + + if (list.head) list.head.solid = SOLID_CORPSE; + if (list.larm) list.larm.solid = SOLID_CORPSE; + if (list.rarm) list.rarm.solid = SOLID_CORPSE; + + list = find(list, classname, "ai_zombie"); + } + + // Now Dogs + list = find(world, classname, "ai_dog"); + while (list != world) { + list.solid = SOLID_CORPSE; + + list = find(list, classname, "ai_dog"); + } +} + +#endif // FTE \ No newline at end of file diff --git a/source/server/weapons/weapon_core.qc b/source/server/weapons/weapon_core.qc index db36436..fc1e016 100644 --- a/source/server/weapons/weapon_core.qc +++ b/source/server/weapons/weapon_core.qc @@ -30,6 +30,10 @@ void() W_PutOut; void(float side) W_Reload; void() GrenadeExplode; void() W_SprintStart; +#ifdef FTE +void() AI_SetAllEnemiesBBOX; +void() AI_SetAllEnemiesCorpse; +#endif // FTE void() ReturnWeaponModel = { @@ -991,21 +995,20 @@ void (float shotcount, float sprd, float Damage, float side) FireTrace = hitent = world; while (!do_break && random() < getWeaponPenetration(self.weapon, penetration_times)) { - while (1) - { - traceline (trace_start_org, trace_start_org + dir, MOVE_HITMODEL, trace_ent); - - if (hitent == world) - break; - /*if (hitent.larm == trace_ent || hitent.rarm == trace_ent || hitent.head == trace_ent) - { - hitent = trace_ent; - trace_start_org = trace_endpos + normalize(dir)*10; - //break; - }*/ - else - break; - } + +#ifdef FTE + + AI_SetAllEnemiesBBOX(); + +#endif // FTE + + traceline (trace_start_org, trace_start_org + dir, MOVE_HITMODEL, trace_ent); + +#ifdef FTE + + AI_SetAllEnemiesCorpse(); + +#endif // FTE if (trace_fraction != 1.0) TraceAttack (Damage, dir, trace_endpos, trace_plane_normal, trace_ent, side);