mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- Duke: Restore return_to_center
in gameexec.cpp dropped in 0ab3b33a6c
and redo based on new code.
This commit is contained in:
parent
6ecbb2587e
commit
2865fef7ed
1 changed files with 12 additions and 0 deletions
|
@ -909,6 +909,18 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, int sActor, int sPl
|
|||
else SetGameVarID((int)lVar2, ps[iPlayer].actors_killed, sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_RETURN_TO_CENTER:
|
||||
if (bSet)
|
||||
{
|
||||
ps[iPlayer].sync.actions |= SB_CENTERVIEW;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto center = ps[iPlayer].sync.actions & SB_CENTERVIEW ? xs_CRoundToInt(ps[iPlayer].horizon.horiz.asbuild() * (9. / gi->playerHorizMax())) : 0;
|
||||
SetGameVarID((int)lVar2, center, sActor, sPlayer);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (!bSet) SetGameVarID((int)lVar2, 0, sActor, sPlayer);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue