]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/warpzone/server.qc
Merge branch 'DefaultUser/gametype_votescreen' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / server.qc
index 594bd48e1568aaec57e514cd4742867c6136810e..34ea2610dedd7afa60e30ce6bab89f7df643940a 100644 (file)
@@ -7,7 +7,7 @@
        #include <common/constants.qh>
        #include <common/triggers/subs.qh>
        #include <common/util.qh>
-       #include <server/command/common.qh>
+       #include <server/command/_mod.qh>
        #include <server/constants.qh>
        #include <server/defs.qh>
 #endif
@@ -40,9 +40,9 @@ void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector
        setorigin(player, to); // NOTE: this also aborts the move, when this is called by touch
 #ifdef SVQC
        player.oldorigin = to; // for DP's unsticking
+       player.fixangle = true;
 #endif
        player.angles = to_angles;
-       player.fixangle = true;
        player.velocity = to_velocity;
 
        BITXOR_ASSIGN(player.effects, EF_TELEPORT_BIT);
@@ -175,8 +175,7 @@ void WarpZone_Touch(entity this, entity toucher)
                return;
 
        // FIXME needs a better check to know what is safe to teleport and what not
-       if(toucher.movetype == MOVETYPE_NONE || toucher.movetype == MOVETYPE_FOLLOW || toucher.tag_entity
-       || toucher.move_movetype == MOVETYPE_NONE || toucher.move_movetype == MOVETYPE_FOLLOW
+       if((toucher.move_movetype == MOVETYPE_NONE && toucher.move_movetype == MOVETYPE_NONE) || toucher.move_movetype == MOVETYPE_FOLLOW || toucher.move_movetype == MOVETYPE_FOLLOW || toucher.tag_entity
 #ifdef CSQC
        || tag_networkentity
 #endif
@@ -226,7 +225,7 @@ void WarpZone_Touch(entity this, entity toucher)
        }
        else
        {
-               LOG_TRACE("WARPZONE FAIL AHAHAHAHAH))\n");
+               LOG_TRACE("WARPZONE FAIL AHAHAHAHAH))");
        }
 }
 
@@ -804,7 +803,7 @@ void WarpZone_StartFrame()
                WarpZone_PostInitialize_Callback();
        }
 
-       FOREACH_ENTITY(!is_pure(it),
+       FOREACH_ENTITY_FLOAT(pure_data, false,
        {
                if(warpzone_warpzones_exist)
                        WarpZone_StoreProjectileData(it);
@@ -836,9 +835,10 @@ void WarpZone_StartFrame()
 .float warpzone_reconnecting;
 bool visible_to_some_client(entity ent)
 {
-       FOREACH_ENTITY(!IS_NOT_A_CLIENT(it), LAMBDA(
-               if (IS_PLAYER(it) && IS_REAL_CLIENT(it) && checkpvs(it.origin + it.view_ofs, ent)) return true;
-       ));
+       FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && checkpvs(it.origin + it.view_ofs, ent),
+       {
+               return true;
+       });
        return false;
 }
 void trigger_warpzone_reconnect_use(entity this, entity actor, entity trigger)