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) +
);
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) +
self.blocked = generic_plat_blocked;
+ self.avelocity_z = 0.0000001;
if not(InitMovingBrushTrigger())
return;
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";