mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 01:11:15 +00:00
- Clean-up of input functions.
* Remove unused `getincanglef()`. * Remove unused `getincangleq16()`. * In `PlayerHorizon` struct, clamp value when setting target in `__settarget()`, not each public `settarget()` overload. * Rename `PlayerAngle` method `applylook()` to `applyinput()`. * Rename `PlayerHorizon` method `sethorizon()` to `applyinput()`. * In `PlayerHorizon::applylook()`, slightly clean return to centre code so it doesn't do math if already at 0. * In `PlayerAngle::applylook()`, slightly clean rotscrnang/look_ang code so it doesn't do math if already at 0 and reposition where mouse input is applied so that if input is applied, the player never enters a spin. * In `Duke3d::player_struct::apply_seasick()`, use `buildfang()` method instead of scaling float to BAM within function.
This commit is contained in:
parent
b49de68c86
commit
93edeac791
11 changed files with 54 additions and 81 deletions
|
@ -1516,7 +1516,7 @@ UpdatePlayerSpriteAngle(PLAYERp pp)
|
|||
void
|
||||
DoPlayerTurn(PLAYERp pp, float const avel, double const scaleAdjust)
|
||||
{
|
||||
pp->angle.applylook(avel, &pp->input.actions, scaleAdjust);
|
||||
pp->angle.applyinput(avel, &pp->input.actions, scaleAdjust);
|
||||
UpdatePlayerSpriteAngle(pp);
|
||||
}
|
||||
|
||||
|
@ -1668,7 +1668,7 @@ DoPlayerHorizon(PLAYERp pp, float const horz, double const scaleAdjust)
|
|||
{
|
||||
bool const canslopetilt = !TEST(pp->Flags, PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING) && TEST(sector[pp->cursectnum].floorstat, FLOOR_STAT_SLOPE);
|
||||
pp->horizon.calcviewpitch(pp->pos.vec2, pp->angle.ang, pp->input.actions & SB_AIMMODE, canslopetilt, pp->cursectnum, scaleAdjust, TEST(pp->Flags, PF_CLIMBING));
|
||||
pp->horizon.sethorizon(horz, &pp->input.actions, scaleAdjust);
|
||||
pp->horizon.applyinput(horz, &pp->input.actions, scaleAdjust);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue