From 5b10b2fe0fc544882e4c74696d09304b9902011f Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 21 Dec 2010 14:16:37 +0100 Subject: [PATCH] fix some more rotated-bbox issues --- qcsrc/server/g_subs.qc | 4 ++-- qcsrc/server/t_plats.qc | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index 5598d2d48..8ba71e465 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -700,7 +700,7 @@ void LODmodel_attach() void ApplyMinMaxScaleAngles(entity e) { - if(e.angles_x != 0 || e.angles_z != 0) // "weird" rotation + if(e.angles_x != 0 || e.angles_z != 0 || self.avelocity_x != 0 || self.avelocity_z != 0) // "weird" rotation { e.maxs = '1 1 1' * vlen( '1 0 0' * max(-e.mins_x, e.maxs_x) + @@ -709,7 +709,7 @@ void ApplyMinMaxScaleAngles(entity e) ); e.mins = -e.maxs; } - else if(e.angles_y != 0) // yaw only is a bit better + else if(e.angles_y != 0 || self.avelocity_y != 0) // yaw only is a bit better { e.maxs_x = vlen( '1 0 0' * max(-e.mins_x, e.maxs_x) + diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index 3089ab650..f3afdf580 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -536,6 +536,7 @@ void spawnfunc_func_pendulum() self.blocked = generic_plat_blocked; + self.avelocity_z = 0.0000001; if not(InitMovingBrushTrigger()) return; @@ -1433,8 +1434,10 @@ void spawnfunc_func_door_rotating() self.angles = '0 0 0'; self.max_health = self.health; + self.avelocity = self.movedir; if not(InitMovingBrushTrigger()) return; + self.velocity = '0 0 0'; //self.effects |= EF_LOWPRECISION; self.classname = "door_rotating"; -- 2.39.2