]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/warpzonelib/server.qc
More cleanup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / warpzonelib / server.qc
index dfc30bdfd569868c8d3f96f569fd521bae877e80..9b94640b5a2319c734a103db57e036b48dd26883 100644 (file)
@@ -259,7 +259,7 @@ float WarpZone_Send(entity to, float sendflags)
 
 float WarpZone_Camera_Send(entity to, float sendflags)
 {
-       float f;
+       float f = 0;
        WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_CAMERA);
 
        if(self.warpzone_fadestart)
@@ -302,7 +302,7 @@ float WarpZone_Camera_Send(entity to, float sendflags)
        return TRUE;
 }
 
-#ifndef WARPZONELIB_KEEPDEBUG
+#ifdef WARPZONELIB_KEEPDEBUG
 float WarpZone_CheckProjectileImpact(entity player)
 {
        vector o0, v0;
@@ -372,7 +372,6 @@ float WarpZone_CheckProjectileImpact(entity player)
 
 float WarpZone_Projectile_Touch()
 {
-       float f;
        if(other.classname == "trigger_warpzone")
                return TRUE;
 
@@ -385,7 +384,7 @@ float WarpZone_Projectile_Touch()
        if(time == self.warpzone_teleport_time)
                return TRUE;
 
-#ifndef WARPZONELIB_KEEPDEBUG
+#ifdef WARPZONELIB_KEEPDEBUG
        // this SEEMS to not happen at the moment, but if it did, it would be more reliable
        {
                float save_dpstartcontents;
@@ -414,6 +413,7 @@ float WarpZone_Projectile_Touch()
                save_ent = trace_ent;
                save_inopen = trace_inopen;
                save_inwater = trace_inwater;
+               float f;
                if((f = WarpZone_CheckProjectileImpact(self)) != 0)
                        return (f > 0);
                trace_dpstartcontents = save_dpstartcontents;