X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fsv_main.qc;h=1448218796b17c7c6b3bef14bcd88f27ec04387e;hb=aef420aeb3a0c37fa1d1d345d831465a2b765f28;hp=ea11ea36a613f25ffb8c3f9915c8fa3dbf9c58f0;hpb=a491650510dce3f774cce457ebf15ddcafcf393f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index ea11ea36a..144821879 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -99,7 +99,17 @@ void CreatureFrame_FallDamage(entity this) { // check for falling damage float velocity_len = vlen(this.velocity); - if(!this.hook.state) + bool have_hook = false; + for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) + { + .entity weaponentity = weaponentities[slot]; + if(this.(weaponentity).hook && this.(weaponentity).hook.state) + { + have_hook = true; + break; + } + } + if(!have_hook) { float dm = vlen(this.oldvelocity) - velocity_len; // dm is now the velocity DECREASE. Velocity INCREASE should never cause a sound or any damage. if (IS_DEAD(this)) @@ -117,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); @@ -219,7 +230,7 @@ void StartFrame() 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; } @@ -402,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;