mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
CON: Fix checkavailweapon command.
git-svn-id: https://svn.eduke32.com/eduke32@6408 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fe10e46778
commit
bb13b0db85
1 changed files with 7 additions and 6 deletions
|
@ -4280,22 +4280,23 @@ finish_qsprintf:
|
|||
|
||||
case CON_CHECKAVAILWEAPON:
|
||||
case CON_CHECKAVAILINVEN:
|
||||
{
|
||||
insptr++;
|
||||
tw = (*insptr != g_thisActorVarID) ? Gv_GetVarX(*insptr) : vm.playerNum;
|
||||
insptr++;
|
||||
size_t const playerNum = (*insptr++ != g_thisActorVarID) ? Gv_GetVarX(*insptr) : vm.playerNum;
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)tw >= (unsigned)g_mostConcurrentPlayers))
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)playerNum >= (unsigned)g_mostConcurrentPlayers))
|
||||
{
|
||||
CON_ERRPRINTF("invalid player %d\n", tw);
|
||||
CON_ERRPRINTF("invalid player %d\n", (int)playerNum);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tw == CON_CHECKAVAILWEAPON)
|
||||
P_CheckWeapon(g_player[tw].ps);
|
||||
P_CheckWeapon(g_player[playerNum].ps);
|
||||
else
|
||||
P_SelectNextInvItem(g_player[tw].ps);
|
||||
P_SelectNextInvItem(g_player[playerNum].ps);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
case CON_GETPLAYERANGLE:
|
||||
insptr++;
|
||||
|
|
Loading…
Reference in a new issue