commit af2746a42ce2fbce209d813c057449df32f71473
Author: James Haley <haleyjd@hotmail.com>
AuthorDate: Tue Oct 5 01:50:11 2010 +0000
Commit: James Haley <haleyjd@hotmail.com>
CommitDate: Tue Oct 5 01:50:11 2010 +0000
Fix to LEGO cheat so it doesn't cause an invalid access to invsigil[-1]
in the status bar code, though it IS still possible to acquire and use
Sigil type -1, just as it is in vanilla, with some extreme side effects.
Subversion-branch: /branches/strife-branch
Subversion-revision: 2157
---
src/strife/st_stuff.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/strife/st_stuff.c b/src/strife/st_stuff.c
index 57b099ef..bd1061a9 100644
--- a/src/strife/st_stuff.c
+++ b/src/strife/st_stuff.c
@@ -801,25 +801,28 @@ boolean ST_Responder(event_t* ev)
P_GiveItemToPlayer(plyr, SPR_HELT, MT_TOKEN_TOUGHNESS);
}
- // villsa [STRIFE]
+ // villsa [STRIFE]
if(cht_CheckCheat(&cheat_lego, ev->data2))
{
plyr->st_update = true;
if(plyr->weaponowned[wp_sigil])
{
- plyr->weaponowned[wp_sigil] = true;
if(++plyr->sigiltype > 4)
{
plyr->sigiltype = -1;
- plyr->pendingweapon = wp_sigil;
- plyr->weaponowned[wp_sigil] = true;
+ plyr->pendingweapon = wp_fist;
+ plyr->weaponowned[wp_sigil] = false;
}
}
else
{
plyr->weaponowned[wp_sigil] = true;
- plyr->sigiltype = -1;
+ plyr->sigiltype = 0;
}
+ // BUG: This brings up a bad version of the Sigil (sigiltype -1) which
+ // causes some VERY interesting behavior, when you type LEGO for the
+ // sixth time. This shouldn't be done when taking it away, and yet it
+ // is here... verified with vanilla.
plyr->pendingweapon = wp_sigil;
}