mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 13:40:45 +00:00
Only call PlayerCmd hooks if added to game
This commit is contained in:
parent
3dff1eb1b7
commit
dfc1767794
1 changed files with 1 additions and 1 deletions
|
@ -1678,7 +1678,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
// At this point, cmd doesn't contain the final angle yet,
|
// At this point, cmd doesn't contain the final angle yet,
|
||||||
// So we need to temporarily transform it so Lua scripters
|
// So we need to temporarily transform it so Lua scripters
|
||||||
// don't need to handle it differently than in other hooks.
|
// don't need to handle it differently than in other hooks.
|
||||||
if (gamestate == GS_LEVEL)
|
if (addedtogame && gamestate == GS_LEVEL)
|
||||||
{
|
{
|
||||||
INT16 extra = ticcmd_oldangleturn[forplayer] - player->oldrelangleturn;
|
INT16 extra = ticcmd_oldangleturn[forplayer] - player->oldrelangleturn;
|
||||||
INT16 origangle = cmd->angleturn;
|
INT16 origangle = cmd->angleturn;
|
||||||
|
|
Loading…
Reference in a new issue