X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fgamemode_invasion.qc;h=412e7bd5405caa28832a5edc54ad8dcd4f01c652;hb=8da45596c76bb645e864b4ec8ff5a3ee13bbf27c;hp=c5f71ea1f376ed60487ec1e841b41b4c51a33fe0;hpb=263c592e468eeeffb2755d204b21eb13e398adac;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/gamemode_invasion.qc b/qcsrc/server/mutators/gamemode_invasion.qc index c5f71ea1f..412e7bd54 100644 --- a/qcsrc/server/mutators/gamemode_invasion.qc +++ b/qcsrc/server/mutators/gamemode_invasion.qc @@ -7,7 +7,7 @@ #include "../../common/monsters/sv_monsters.qh" void spawnfunc_invasion_spawnpoint() -{ +{SELFPARAM(); if(!g_invasion) { remove(self); return; } self.classname = "invasion_spawnpoint"; @@ -20,7 +20,7 @@ void spawnfunc_invasion_spawnpoint() float invasion_PickMonster(float supermonster_count) { if(autocvar_g_invasion_zombies_only) - return MON_ZOMBIE; + return MON_ZOMBIE.monsterid; float i; entity mon; @@ -62,7 +62,7 @@ void invasion_SpawnChosenMonster(float mon) if(spawn_point == world) { - dprint("Warning: couldn't find any invasion_spawnpoint spawnpoints, attempting to spawn monsters in random locations\n"); + LOG_TRACE("Warning: couldn't find any invasion_spawnpoint spawnpoints, attempting to spawn monsters in random locations\n"); entity e = spawn(); setsize(e, (get_monsterinfo(mon)).mins, (get_monsterinfo(mon)).maxs); @@ -126,7 +126,7 @@ float Invasion_CheckWinner() if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0) { FOR_EACH_MONSTER(head) - monster_remove(head); + Monster_Remove(head); Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_ROUND_OVER); Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_ROUND_OVER); @@ -203,7 +203,7 @@ float Invasion_CheckWinner() } FOR_EACH_MONSTER(head) - monster_remove(head); + Monster_Remove(head); if(teamplay) { @@ -261,7 +261,7 @@ void Invasion_RoundStart() } MUTATOR_HOOKFUNCTION(invasion_MonsterDies) -{ +{SELFPARAM(); if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) { inv_numkilled += 1; @@ -283,7 +283,7 @@ MUTATOR_HOOKFUNCTION(invasion_MonsterDies) } MUTATOR_HOOKFUNCTION(invasion_MonsterSpawn) -{ +{SELFPARAM(); if(!(self.spawnflags & MONSTERFLAG_SPAWNED)) return true; @@ -296,7 +296,7 @@ MUTATOR_HOOKFUNCTION(invasion_MonsterSpawn) self.monster_skill = inv_monsterskill; if((get_monsterinfo(self.monsterid)).spawnflags & MON_FLAG_SUPERMONSTER) - Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_INVASION_SUPERMONSTER, M_NAME(self.monsterid)); + Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_INVASION_SUPERMONSTER, self.monster_name); self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP | DPCONTENTS_MONSTERCLIP; @@ -304,7 +304,7 @@ MUTATOR_HOOKFUNCTION(invasion_MonsterSpawn) } MUTATOR_HOOKFUNCTION(invasion_OnEntityPreSpawn) -{ +{SELFPARAM(); if(startsWith(self.classname, "monster_")) if(!(self.spawnflags & MONSTERFLAG_SPAWNED)) return true; @@ -327,7 +327,7 @@ MUTATOR_HOOKFUNCTION(invasion_PlayerRegen) } MUTATOR_HOOKFUNCTION(invasion_PlayerSpawn) -{ +{SELFPARAM(); self.bot_attack = false; return false; } @@ -344,7 +344,7 @@ MUTATOR_HOOKFUNCTION(invasion_PlayerDamage) } MUTATOR_HOOKFUNCTION(invasion_PlayerCommand) -{ +{SELFPARAM(); if(MUTATOR_RETURNVALUE) // command was already handled? return false; @@ -366,7 +366,7 @@ MUTATOR_HOOKFUNCTION(invasion_PlayerCommand) MUTATOR_HOOKFUNCTION(invasion_BotShouldAttack) { - if(!(checkentity.flags & FL_MONSTER)) + if(!IS_MONSTER(checkentity)) return true; return false; @@ -382,7 +382,7 @@ MUTATOR_HOOKFUNCTION(invasion_SetStartItems) MUTATOR_HOOKFUNCTION(invasion_AccuracyTargetValid) { - if(frag_target.flags & FL_MONSTER) + if(IS_MONSTER(frag_target)) return MUT_ACCADD_INVALID; return MUT_ACCADD_INDIFFERENT; } @@ -431,7 +431,7 @@ void invasion_DelayedInit() // Do this check with a delay so we can wait for tea void invasion_Initialize() { if(autocvar_g_invasion_zombies_only) - MON_ACTION(MON_ZOMBIE, MR_PRECACHE); + MON_ACTION(MON_ZOMBIE.monsterid, MR_PRECACHE); else { float i; @@ -483,7 +483,7 @@ MUTATOR_DEFINITION(gamemode_invasion) MUTATOR_ONREMOVE { - print("This is a game type and it cannot be removed at runtime."); + LOG_INFO("This is a game type and it cannot be removed at runtime."); return -1; }