mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- DoPlayerTurnVehicle
This commit is contained in:
parent
079fbd340f
commit
9df83edd10
2 changed files with 6 additions and 6 deletions
|
@ -36,7 +36,7 @@ BEGIN_SW_NS
|
|||
|
||||
void DoPlayerHorizon(PLAYER* pp, float const horz, double const scaleAdjust);
|
||||
void DoPlayerTurn(PLAYER* pp, float const avel, double const scaleAdjust);
|
||||
void DoPlayerTurnVehicle(PLAYER* pp, float avel, int z, int floor_dist);
|
||||
void DoPlayerTurnVehicle(PLAYER* pp, float avel, double z, double floor_dist);
|
||||
void DoPlayerTurnTurret(PLAYER* pp, float avel);
|
||||
|
||||
static InputPacket loc;
|
||||
|
@ -186,7 +186,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
|
|||
|
||||
if ((pp->Flags2 & PF2_INPUT_CAN_TURN_VEHICLE))
|
||||
{
|
||||
DoPlayerTurnVehicle(pp, input.avel, pp->int_ppos().Z + Z(10), abs(pp->int_ppos().Z + Z(10) - pp->sop->floor_loz * worldtoint));
|
||||
DoPlayerTurnVehicle(pp, input.avel, pp->pos.Z + 10, abs(pp->pos.Z + 10 - pp->sop->floor_loz));
|
||||
}
|
||||
|
||||
if ((pp->Flags2 & PF2_INPUT_CAN_TURN_TURRET))
|
||||
|
|
|
@ -1450,7 +1450,7 @@ void DoPlayerTurn(PLAYER* pp, float const avel, double const scaleAdjust)
|
|||
UpdatePlayerSpriteAngle(pp);
|
||||
}
|
||||
|
||||
void DoPlayerTurnVehicle(PLAYER* pp, float avel, int z, int floor_dist)
|
||||
void DoPlayerTurnVehicle(PLAYER* pp, float avel, double zz, double floordist)
|
||||
{
|
||||
SECTOR_OBJECT* sop = pp->sop;
|
||||
|
||||
|
@ -1469,10 +1469,10 @@ void DoPlayerTurnVehicle(PLAYER* pp, float avel, int z, int floor_dist)
|
|||
if (avel != 0)
|
||||
{
|
||||
auto sum = pp->angle.ang + DAngle::fromDeg(avel);
|
||||
if (MultiClipTurn(pp, sum, z * zinttoworld, floor_dist * zinttoworld))
|
||||
if (MultiClipTurn(pp, sum, zz, floordist))
|
||||
{
|
||||
pp->angle.ang = sum;
|
||||
pp->actor->set_int_ang(pp->angle.ang.Buildang());
|
||||
pp->actor->spr.angle = pp->angle.ang;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2596,7 +2596,7 @@ void DoPlayerMoveVehicle(PLAYER* pp)
|
|||
}
|
||||
else
|
||||
{
|
||||
DoPlayerTurnVehicle(pp, pp->input.avel, z, floor_dist);
|
||||
DoPlayerTurnVehicle(pp, pp->input.avel, z * zinttoworld, floor_dist * zinttoworld);
|
||||
}
|
||||
|
||||
auto save_cstat = plActor->spr.cstat;
|
||||
|
|
Loading…
Reference in a new issue