// Pitch
ftmp = 0;
- if(this.movement_x > 0 && vang_x < autocvar_g_vehicle_raptor_pitchlimit) ftmp = 5;
- else if(this.movement_x < 0 && vang_x > -autocvar_g_vehicle_raptor_pitchlimit) ftmp = -20;
+ if(CS(this).movement_x > 0 && vang_x < autocvar_g_vehicle_raptor_pitchlimit) ftmp = 5;
+ else if(CS(this).movement_x < 0 && vang_x > -autocvar_g_vehicle_raptor_pitchlimit) ftmp = -20;
df_x = bound(-autocvar_g_vehicle_raptor_pitchlimit, df_x , autocvar_g_vehicle_raptor_pitchlimit);
ftmp = vang_x - bound(-autocvar_g_vehicle_raptor_pitchlimit, df_x + ftmp, autocvar_g_vehicle_raptor_pitchlimit);
df = vehic.velocity * -autocvar_g_vehicle_raptor_friction;
- if(this.movement_x != 0)
+ if(CS(this).movement_x != 0)
{
- if(this.movement_x > 0)
+ if(CS(this).movement_x > 0)
df += v_forward * autocvar_g_vehicle_raptor_speed_forward;
- else if(this.movement_x < 0)
+ else if(CS(this).movement_x < 0)
df -= v_forward * autocvar_g_vehicle_raptor_speed_forward;
}
- if(this.movement_y != 0)
+ if(CS(this).movement_y != 0)
{
- if(this.movement_y < 0)
+ if(CS(this).movement_y < 0)
df -= v_right * autocvar_g_vehicle_raptor_speed_strafe;
- else if(this.movement_y > 0)
+ else if(CS(this).movement_y > 0)
df += v_right * autocvar_g_vehicle_raptor_speed_strafe;
- vehic.angles_z = bound(-30,vehic.angles_z + (this.movement_y / autocvar_g_vehicle_raptor_speed_strafe),30);
+ vehic.angles_z = bound(-30,vehic.angles_z + (CS(this).movement_y / autocvar_g_vehicle_raptor_speed_strafe),30);
}
else
{
df += v_up * autocvar_g_vehicle_raptor_speed_up;
vehic.velocity += df * dt;
- this.velocity = this.movement = vehic.velocity;
+ this.velocity = CS(this).movement = vehic.velocity;
setorigin(this, vehic.origin + '0 0 32');
this.oldorigin = this.origin; // negate fall damage