for (i=0;i<NUMAMMO;i++) plyr->ammo[i] = plyr->maxammo[i];
plyr->message = STSTR_FAADDED;
}
// ’kfa’ cheat for key full ammo
else if (cht_CheckCheat(&cheat_ammo, ev->data1))
{
plyr->armorpoints = 200; plyr->armortype = 2;
for (i=0;i<NUMWEAPONS;i++) plyr->weaponowned[i] = true;
for (i=0;i<NUMAMMO;i++) plyr->ammo[i] = plyr->maxammo[i];
for (i=0;i<NUMCARDS;i++) plyr->cards[i] = true;
plyr->message = STSTR_KFAADDED;
}
// ’mus’ cheat for changing music
else if (cht_CheckCheat(&cheat_mus, ev->data1))
{
plyr->message = STSTR_MUS; cht_GetParam(&cheat_mus, buf);
if (gamemode == commercial)
{
musnum = mus_runnin + (buf[0]-’0’)*10 + buf[1]-’0’ - 1;
if (((buf[0]-’0’)*10 + buf[1]-’0’) > 35) plyr->message = STSTR_NOMUS;
else
S_ChangeMusic(musnum, 1);
}
else
{
musnum = mus_e1m1 + (buf[0]-’1’)*9 + (buf[1]-’1’);
if (((buf[0]-’1’)*9 + buf[1]-’1’) > 31) plyr->message = STSTR_NOMUS;
else
S_ChangeMusic(musnum, 1);
}
}
//Simplified, accepting both "noclip" and "idspispopd".
//no clipping mode cheat
else if ( cht_CheckCheat(&cheat_noclip, ev->data1)
|| cht_CheckCheat(&cheat_commercial_noclip,ev->data1) )
{
plyr->cheats ^= CF_NOCLIP;
if (plyr->cheats & CF_NOCLIP) plyr->message = STSTR_NCON;
else
plyr->message = STSTR_NCOFF;
}
// ’behold?’ power-up cheats