fix some more rotated-bbox issues
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 21 Dec 2010 13:16:37 +0000 (14:16 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 21 Dec 2010 13:16:37 +0000 (14:16 +0100)
qcsrc/server/g_subs.qc
qcsrc/server/t_plats.qc

index 5598d2d483f0bf322f7b5aee4fde149d63488037..8ba71e4655822bc988c645cf0e354dd51a3d06ff 100644 (file)
@@ -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) +
index 3089ab650a83b33f449bdea80375ae6cfc63692b..f3afdf580c26b0ff2890ff28107c6c77ab1db964 100644 (file)
@@ -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";