diff --git a/source/server/ai/dog_core.qc b/source/server/ai/dog_core.qc index a37266c..51c5d86 100644 --- a/source/server/ai/dog_core.qc +++ b/source/server/ai/dog_core.qc @@ -191,7 +191,7 @@ void(entity where) spawn_a_dogB = { local entity sdog;//USED FOR WHAT TO SPAWN - sdog = getFreeZombieEnt(self); + sdog = getFreeZombieEnt(); if(sdog == world) { return; @@ -308,7 +308,7 @@ float() spawn_a_dogA = FAIL = false; pcount = 0; - szombie = getFreeZombieEnt(self); + szombie = getFreeZombieEnt(); if(szombie == world || dogCount >= (2 * (player_count + 1))) { return 0; diff --git a/source/server/ai/zombie_core.qc b/source/server/ai/zombie_core.qc index 76757ed..e82be66 100644 --- a/source/server/ai/zombie_core.qc +++ b/source/server/ai/zombie_core.qc @@ -1439,13 +1439,14 @@ void() set_z_health = } }; -entity(entity me) getFreeZombieEnt = +inline entity() getFreeZombieEnt = { - local entity who; + entity who; who = find(world,classname,"freeZombieEntity"); return who; }; + float() spawn_a_zombieA = { //dprint("Spawn_a_zombieA \n"); @@ -1457,7 +1458,7 @@ float() spawn_a_zombieA = pcount = 0; FAIL = false; - szombie = getFreeZombieEnt(self); + szombie = getFreeZombieEnt(); if(szombie == world || zombie_spawn_timer > time) { //bprint(PRINT_HIGH, "STOPPED AT A\n"); @@ -1639,7 +1640,7 @@ void(entity where) spawn_a_zombieB = local entity szombie;//USED FOR WHAT TO SPAWN //szombie = spawn(); - szombie = getFreeZombieEnt(self); + szombie = getFreeZombieEnt(); if(szombie == world || zombie_spawn_timer > time) { //bprint(PRINT_HIGH, "STOPPED AT B\n");