- WW2GI: fixed event numbering.

There is a typo in the CON files that assigns EVENT_AIMUP and EVENT_AIMDOWN the same number. The source did not replicate this which caused several events to call the wrong handler.
Fixes #252
This commit is contained in:
Christoph Oelckers 2021-01-30 23:42:44 +01:00
parent a0be30facb
commit 40593b866f
2 changed files with 2 additions and 2 deletions

View file

@ -332,7 +332,7 @@ enum
EVENT_LOOKUP, // for each player
EVENT_LOOKDOWN, // for each player
EVENT_AIMUP, // for each player
EVENT_AIMDOWN, // for each player
EVENT_AIMDOWN = EVENT_AIMUP, // for each player, typo in WW2GI
EVENT_FIRE, // for each player
EVENT_CHANGEWEAPON, // for each player
EVENT_GETSHOTRANGE, // for each player

View file

@ -931,7 +931,7 @@ void playerAimDown(int snum, ESyncBits actions)
{
auto p = &ps[snum];
SetGameVarID(g_iReturnVarID, 0, p->GetActor(), snum);
OnEvent(EVENT_AIMDOWN, snum, p->GetActor(), -1);
OnEvent(EVENT_AIMDOWN, snum, p->GetActor(), -1); // due to a typo in WW2GI's CON files this is the same as EVENT_AIMUP.
if (GetGameVarID(g_iReturnVarID, p->GetActor(), snum) != 0)
{
p->sync.actions &= ~SB_AIM_DOWN;