mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 13:40:45 +00:00
Merge branch 'fix-joiner-consoleplayer' into 'next'
Fix consoleplayer returning the server player during joining phase See merge request STJr/SRB2!1396
This commit is contained in:
commit
481ddb6532
2 changed files with 2 additions and 2 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,
|
||||
// So we need to temporarily transform it so Lua scripters
|
||||
// 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 origangle = cmd->angleturn;
|
||||
|
|
|
@ -333,7 +333,7 @@ int LUA_PushGlobals(lua_State *L, const char *word)
|
|||
return 1;
|
||||
// local player variables, by popular request
|
||||
} else if (fastcmp(word,"consoleplayer")) { // player controlling console (aka local player 1)
|
||||
if (consoleplayer < 0 || !playeringame[consoleplayer])
|
||||
if (!addedtogame || consoleplayer < 0 || !playeringame[consoleplayer])
|
||||
return 0;
|
||||
LUA_PushUserdata(L, &players[consoleplayer], META_PLAYER);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue