Fix breakage of EVENT_WEAPKEYx after r2656

git-svn-id: https://svn.eduke32.com/eduke32@2658 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2012-05-17 17:23:02 +00:00
parent 778e463549
commit c0851da27b

View file

@ -2705,14 +2705,12 @@ CHECKINV1:
j = ((sb_snum&(15<<SK_WEAPON_BITS))>>SK_WEAPON_BITS) - 1; j = ((sb_snum&(15<<SK_WEAPON_BITS))>>SK_WEAPON_BITS) - 1;
aGameVars[g_iReturnVarID].val.lValue = j;
switch ((int32_t)j) switch ((int32_t)j)
{ {
case -1: case -1:
break; break;
default: default:
VM_OnEvent(EVENT_WEAPKEY1+j,p->i,snum, -1, 0); j = (uint32_t)VM_OnEvent(EVENT_WEAPKEY1+j,p->i,snum, -1, j);
break; break;
case 10: case 10:
VM_OnEvent(EVENT_PREVIOUSWEAPON,p->i,snum, -1, 0); VM_OnEvent(EVENT_PREVIOUSWEAPON,p->i,snum, -1, 0);
@ -2722,8 +2720,6 @@ CHECKINV1:
break; break;
} }
j = (uint32_t) aGameVars[g_iReturnVarID].val.lValue;
if (p->reloading == 1) if (p->reloading == 1)
j = -1; j = -1;
else if ((int32_t)j != -1 && p->kickback_pic == 1 && p->weapon_pos == 1) else if ((int32_t)j != -1 && p->kickback_pic == 1 && p->weapon_pos == 1)