break;
push = this.move_velocity * time_left;
- vector prev_origin = this.move_origin;
_Movetype_PushEntity(this, push, true);
- if(trace_startsolid && this.move_origin != prev_origin)
+ if(trace_startsolid)
{
// we got teleported by a touch function
// let's abort the move
float my_trace_fraction = trace_fraction;
vector my_trace_plane_normal = trace_plane_normal;
- if(trace_plane_normal_z)
+ if(trace_plane_normal.z)
{
- if(trace_plane_normal_z > 0.7)
+ if(trace_plane_normal.z > 0.7)
{
// floor
blocked |= 1;
vector steppush = '0 0 1' * stepheight;
_Movetype_PushEntity(this, steppush, true);
- if(trace_startsolid && this.move_origin != org)
+ if(trace_startsolid)
{
blocked |= 8;
break;
}
_Movetype_PushEntity(this, push, true);
- if(trace_startsolid && this.move_origin != org)
+ if(trace_startsolid)
{
blocked |= 8;
break;
float trace2_fraction = trace_fraction;
steppush = '0 0 1' * (org_z - this.move_origin_z);
_Movetype_PushEntity(this, steppush, true);
- if(trace_startsolid && this.move_origin != org)
+ if(trace_startsolid)
{
blocked |= 8;
break;
this.avelocity = this.move_avelocity;
this.velocity = this.move_velocity;
this.angles = this.move_angles;
+ this.flags = BITSET(this.flags, FL_ONGROUND, boolean(this.move_flags & FL_ONGROUND));
setorigin(this, this.move_origin);
}
this.move_movetype = MOVETYPE_WALK; // temp
this.move_velocity = this.velocity;
this.move_avelocity = this.avelocity;
+ this.move_flags = BITSET(this.move_flags, FL_ONGROUND, boolean(this.flags & FL_ONGROUND));
Movetype_Physics_Spam(this);
}
}