X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fsv_main.qc;h=0ae9b356cd3cdecbdcaf7e8c6c8c445d13fc847b;hb=5172811ca1681144cddd447c3ae9c5a0acef9912;hp=ccc309be64703b6e32047297ec678a480edbdf68;hpb=3bbcff2475d1b2efc1314a358bf60c6fba6e4be6;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index ccc309be6..0ae9b356c 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -127,7 +127,8 @@ void CreatureFrame_FallDamage(entity this) void CreatureFrame_All() { - FOREACH_ENTITY_FLOAT(damagedbycontents, true, { + IL_EACH(g_damagedbycontents, it.damagedbycontents, + { if (it.move_movetype == MOVETYPE_NOCLIP) continue; CreatureFrame_Liquids(it); CreatureFrame_FallDamage(it); @@ -159,8 +160,7 @@ Called before each frame by the server ============= */ -float game_delay; -float game_delay_last; +bool game_delay_last; bool autocvar_sv_autopause = false; float RedirectionThink(); @@ -219,17 +219,15 @@ void StartFrame() skill = autocvar_skill; // detect when the pre-game countdown (if any) has ended and the game has started - game_delay = (time < game_starttime); - + bool game_delay = (time < game_starttime); if (autocvar_sv_eventlog && game_delay_last && !game_delay) GameLogEcho(":startdelay_ended"); - game_delay_last = game_delay; CreatureFrame_All(); CheckRules_World(); - if (warmup_stage && !gameover && warmup_limit > 0 && time >= warmup_limit) { + if (warmup_stage && !game_stopped && warmup_limit > 0 && time >= warmup_limit) { ReadyRestart(); return; } @@ -380,6 +378,9 @@ LABEL(cvar_fail) set_movetype(this, this.movetype); + if(this.monster_attack) + IL_PUSH(g_monster_targets, this); + // support special -1 and -2 angle from radiant if (this.angles == '0 -1 0') this.angles = '-90 0 0'; @@ -412,8 +413,8 @@ LABEL(cvar_fail) void WarpZone_PostInitialize_Callback() { // create waypoint links for warpzones - entity e; - for(e = NULL; (e = find(e, classname, "trigger_warpzone")); ) + //for(entity e = warpzone_first; e; e = e.warpzone_next) + for(entity e = NULL; (e = find(e, classname, "trigger_warpzone")); ) { vector src, dst; src = (e.absmin + e.absmax) * 0.5;