Fix cheats giving inventory items and their events.

git-svn-id: https://svn.eduke32.com/eduke32@2670 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-05-18 12:46:25 +00:00
parent f5fb70250a
commit b40ec07d36

View file

@ -7003,11 +7003,9 @@ enum cheatindex_t
static void doinvcheat(int32_t invidx, int32_t defaultnum, int32_t event)
{
if (VM_OnEvent(event, g_player[myconnectindex].ps->i, myconnectindex, -1, defaultnum) >= 0)
{
g_player[myconnectindex].ps->inv_amount[invidx] =
aGameVars[g_iReturnVarID].val.lValue;
}
defaultnum = VM_OnEvent(event, g_player[myconnectindex].ps->i, myconnectindex, -1, defaultnum);
if (defaultnum >= 0)
g_player[myconnectindex].ps->inv_amount[invidx] = defaultnum;
}
static void G_CheatGetInv(void)