mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- Duke: Fix issue where calculated value for old player variable return_to_center
could have been negative, causing undefined behaviour.
This commit is contained in:
parent
bb20827027
commit
bc9ea38aba
1 changed files with 1 additions and 1 deletions
|
@ -916,7 +916,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
}
|
||||
else
|
||||
{
|
||||
auto center = ps[iPlayer].sync.actions & SB_CENTERVIEW ? xs_CRoundToInt(ps[iPlayer].horizon.horiz.asq16() * (9. / gi->playerHorizMax())) : 0;
|
||||
auto center = ps[iPlayer].sync.actions & SB_CENTERVIEW ? abs(xs_CRoundToInt(ps[iPlayer].horizon.horiz.asq16() * (9. / gi->playerHorizMax()))) : 0;
|
||||
SetGameVarID(lVar2, center, sActor, sPlayer);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue