From 2ef0221b405abdf1b954135e2ff7b4333004f70c Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 31 Jul 2024 11:49:32 +1000 Subject: [PATCH] Prevent division by zero when warpzones teleport a stationary player --- qcsrc/lib/warpzone/server.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/lib/warpzone/server.qc b/qcsrc/lib/warpzone/server.qc index f216aa9c6..3a98911e4 100644 --- a/qcsrc/lib/warpzone/server.qc +++ b/qcsrc/lib/warpzone/server.qc @@ -145,7 +145,7 @@ float WarpZone_Teleport(entity wz, entity player, float f0, float f1) #ifdef SVQC // prevent further teleports back - float dt = (o1 - o10) * v1 * (1 / (v1 * v1)); + float dt = (v1 != '0 0 0') ? (o1 - o10) * v1 * (1 / (v1 * v1)) : 0; if(dt < PHYS_INPUT_FRAMETIME) player.warpzone_teleport_finishtime += PHYS_INPUT_FRAMETIME - dt; #endif -- 2.39.2