mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 21:20:54 +00:00
Fix instances reverted to old unlocked variable
This commit is contained in:
parent
d751ad5cf2
commit
29f55471dd
2 changed files with 6 additions and 10 deletions
|
@ -79,9 +79,9 @@ static UINT8 cheatf_warp(void)
|
|||
|
||||
// Temporarily unlock stuff.
|
||||
G_SetUsedCheats(false);
|
||||
unlockables[31].unlocked = true; // credits
|
||||
unlockables[30].unlocked = true; // sound test
|
||||
unlockables[28].unlocked = true; // level select
|
||||
clientGamedata->unlocked[31] = true; // credits
|
||||
clientGamedata->unlocked[30] = true; // sound test
|
||||
clientGamedata->unlocked[28] = true; // level select
|
||||
|
||||
// Refresh secrets menu existing.
|
||||
M_ClearMenus(true);
|
||||
|
|
10
src/p_spec.c
10
src/p_spec.c
|
@ -1795,9 +1795,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
{ // Unlockable triggers required
|
||||
INT32 trigid = triggerline->args[1];
|
||||
|
||||
if (netgame || multiplayer)
|
||||
return false;
|
||||
else if (trigid < 0 || trigid > 31) // limited by 32 bit variable
|
||||
if (trigid < 0 || trigid > 31) // limited by 32 bit variable
|
||||
{
|
||||
CONS_Debug(DBG_GAMELOGIC, "Unlockable trigger (sidedef %hu): bad trigger ID %d\n", triggerline->sidenum[0], trigid);
|
||||
return false;
|
||||
|
@ -1810,14 +1808,12 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
{ // An unlockable itself must be unlocked!
|
||||
INT32 unlockid = triggerline->args[1];
|
||||
|
||||
if (netgame || multiplayer)
|
||||
return false;
|
||||
else if (unlockid < 0 || unlockid >= MAXUNLOCKABLES) // limited by unlockable count
|
||||
if (unlockid < 0 || unlockid >= MAXUNLOCKABLES) // limited by unlockable count
|
||||
{
|
||||
CONS_Debug(DBG_GAMELOGIC, "Unlockable check (sidedef %hu): bad unlockable ID %d\n", triggerline->sidenum[0], unlockid);
|
||||
return false;
|
||||
}
|
||||
else if (!(unlockables[unlockid-1].unlocked))
|
||||
else if (!(serverGamedata->unlocked[unlockid-1]))
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue