]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/sv_main.qc
Merge branch 'morphed/newrl' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / sv_main.qc
index aec41d0fec0c3e1aaa3d3c5fc750406fe09cce82..1448218796b17c7c6b3bef14bcd88f27ec04387e 100644 (file)
@@ -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,8 +127,7 @@ void CreatureFrame_FallDamage(entity this)
 
 void CreatureFrame_All()
 {
-       //IL_EACH(g_damagedbycontents, it.damagedbycontents,
-       FOREACH_ENTITY_FLOAT(damagedbycontents, true,
+       IL_EACH(g_damagedbycontents, it.damagedbycontents,
        {
                if (it.move_movetype == MOVETYPE_NOCLIP) continue;
                CreatureFrame_Liquids(it);
@@ -221,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;
        }
@@ -404,8 +413,8 @@ LABEL(cvar_fail)
 void WarpZone_PostInitialize_Callback()
 {
        // create waypoint links for warpzones
-       for(entity e = warpzone_first; e; e = e.warpzone_next)
-       //for(entity 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;