From 97e4f59f2e29d44584e8181d9645a415e6e2c64f Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 12 Feb 2012 11:42:54 +0100 Subject: [PATCH] remove the impactfilter warning --- qcsrc/warpzonelib/server.qc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index 6c27842ef..12fbf49a6 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -1,4 +1,6 @@ -#define REMOVEHACK +#ifdef WARPZONELIB_KEEPDEBUG +#define WARPZONELIB_REMOVEHACK +#endif // for think function .vector warpzone_save_origin; @@ -300,6 +302,7 @@ float WarpZone_Camera_Send(entity to, float sendflags) return TRUE; } +#ifndef WARPZONELIB_KEEPDEBUG float WarpZone_CheckProjectileImpact(entity player) { vector o0, v0; @@ -317,7 +320,7 @@ float WarpZone_CheckProjectileImpact(entity player) if(!wz) return 0; -#ifdef REMOVEHACK +#ifdef WARPZONELIB_REMOVEHACK print("impactfilter found something - and it no longer gets handled correctly - please tell divVerent whether anything behaves broken now\n"); #else print("impactfilter found something - and it even gets handled correctly - please tell divVerent that this code apparently gets triggered again\n"); @@ -326,7 +329,7 @@ float WarpZone_CheckProjectileImpact(entity player) print("Origin: ", vtos(player.origin), "\n"); print("Velocity: ", vtos(player.velocity), "\n"); -#ifdef REMOVEHACK +#ifdef WARPZONELIB_REMOVEHACK return 0; #else // retry previous move @@ -365,6 +368,8 @@ float WarpZone_CheckProjectileImpact(entity player) return +1; #endif } +#endif + float WarpZone_Projectile_Touch() { float f; @@ -372,9 +377,13 @@ float WarpZone_Projectile_Touch() return TRUE; // no further impacts if we teleported this frame! + // this is because even if we did teleport, the engine still may raise + // touch events for the previous location + // FIXME or not? engine now aborts moves on teleport, so this SHOULD not happen any more if(time == self.warpzone_teleport_time) return TRUE; +#ifndef WARPZONELIB_KEEPDEBUG // this SEEMS to not happen at the moment, but if it did, it would be more reliable { float save_dpstartcontents; @@ -419,6 +428,7 @@ float WarpZone_Projectile_Touch() trace_inopen = save_inopen; trace_inwater = save_inwater; } +#endif if(WarpZone_Projectile_Touch_ImpactFilter_Callback()) return TRUE; -- 2.39.2