prop_vehicle_drivable: Add spawnflag VEHSF_NOFLIP, which will prevent the vehicle from flipping over
This commit is contained in:
parent
50070b031b
commit
0f7d4fd214
1 changed files with 7 additions and 0 deletions
|
@ -32,6 +32,8 @@ This entity was introduced in Half-Life 2 (2004).
|
|||
|
||||
#define VEH_SKIDDING FL_USE_RELEASED
|
||||
|
||||
#define VEHSF_NOFLIP 2048
|
||||
|
||||
enumflags
|
||||
{
|
||||
VEHFL_DRIVER,
|
||||
|
@ -579,6 +581,11 @@ prop_vehicle_driveable::RunVehiclePhysics(void)
|
|||
PlayerUpdateFlags();
|
||||
}
|
||||
|
||||
if (spawnflags & VEHSF_NOFLIP) {
|
||||
angles[0] = bound (-45, angles[0], 45);
|
||||
angles[2] = bound (-45, angles[2], 45);
|
||||
}
|
||||
|
||||
flags &= ~VEH_SKIDDING;
|
||||
|
||||
angles[0] = Math_FixDelta(angles[0]);
|
||||
|
|
Loading…
Reference in a new issue