ref: af2746a42ce2fbce209d813c057449df32f71473
parent: aedeaac6b7f27f5400bcae7f391c457ebad4da59
author: James Haley <[email protected]>
date: Mon Oct 4 21:50:11 EDT 2010
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
--- a/src/strife/st_stuff.c
+++ b/src/strife/st_stuff.c
@@ -801,25 +801,28 @@
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;
}