Some fixes/checks for prop_dynamic that I forgot to revert while testing.

Also added some changes to NSVehicle/prop_vehicle_drivable.
This commit is contained in:
Marco Cawthorne 2022-02-03 21:18:31 -08:00
parent 54cf7f8273
commit 4c6800aa4f
Signed by: eukara
GPG key ID: C196CD8BA993248A
3 changed files with 10 additions and 5 deletions

View file

@ -43,12 +43,9 @@ prop_dynamic::Respawn(void)
{
super::Respawn();
SetModel(GetSpawnModel());
//UpdateBounds();
if (spawnflags & PRPDYN_NONSOLID)
SetSolid(SOLID_NOT);
SetSolid(SOLID_BBOX);
}
void

View file

@ -200,6 +200,9 @@ NSVehicle::PlayerEnter(base_player pl)
{
vector offs;
if (!pl)
return;
/* cache the position */
offs = pl.origin - origin;
@ -218,6 +221,9 @@ NSVehicle::PlayerEnter(base_player pl)
void
NSVehicle::PlayerLeave(base_player pl)
{
if (!pl)
return;
pl.movetype = MOVETYPE_WALK;
pl.flags &= ~FL_INVEHICLE;

View file

@ -242,8 +242,11 @@ prop_vehicle_driveable_wheel::Accel(float flMoveTime, float m_flTurn)
makevectors(vecAngle);
if (m_flTurn) {
/* cripple turnrate by our current velocity */
float turnbreak = bound(0, vlen(velocity), 100) * 0.5;
/* rotates v_forward */
rotatevectorsbyangle([ 0, m_flTurn * 50, 0]);
rotatevectorsbyangle([ 0, m_flTurn * turnbreak, 0]);
}
tracebox(origin, mins, maxs, origin - v_up, MOVE_NOMONSTERS, owner);
@ -405,7 +408,6 @@ prop_vehicle_driveable::RunVehiclePhysics(void)
angles[0] = bound(-45, angles[0], 45);
angles[2] = bound(-45, angles[2], 45);
velocity[0] = bound(-1000, velocity[0], 1000);
velocity[1] = bound(-1000, velocity[1], 1000);
velocity[2] = bound(-1000, velocity[2], 1000);