Fix MapWarp

Add SetLevelFailureState
This commit is contained in:
Lactozilla 2024-04-28 02:45:54 -03:00
parent 4c28433afd
commit 8ee90099a6
5 changed files with 4 additions and 69 deletions

View file

@ -37,8 +37,6 @@ special
-509:MusicStopAll(0,1),
-510:MusicRestore(0),
-512:MusicDim(1),
// -700:AddMessage(1),
// -701:AddMessageForPlayer(1),
// SRB2 linedef types (400-499)
// Not all are implemented
@ -57,7 +55,6 @@ special
420:Light_Fade(3,6),
421:StopLightingEffect(1),
// 422:SwitchToCutAwayView(2), // should be reimplemented to search by TID
// 423:ChangeSky(1,2), // already implemented
424:Weather_Change(1,2),
425:Thing_ChangeState(1),
426:Thing_Stop(0,1),
@ -91,12 +88,11 @@ special
// 457:Thing_TrackAngle(4,5), // should be reimplemented to search by TID
// 458:Thing_StopTrackingAngle(0),
// 459:StartConversation(), // to reimplement
460:AwardRings(2),
460:AwardRings(1,2),
// 461:Thing_Spawn(2), // to reimplement
462:StopTimer(0),
// 463:Thing_Dye(1), // Reimplemented as SetObjectDye
464:TriggerEggCapsule(1,2),
// 466:SetLevelFailureState(0,1), // to reimplement
466:SetLevelFailureState(1),
475:ACS_NamedExecute(1,10),
476:ACS_NamedExecuteAlways(1,10),
477:ACS_NamedSuspend(1),

View file

@ -1869,7 +1869,7 @@ bool CallFunc_MapWarp(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Wor
return false;
}
nextmapoverride = (nextmap + 1);
nextmapoverride = nextmap;
if (argV[1] == 0)
skipstats = 1;
@ -3424,40 +3424,3 @@ bool CallFunc_SetThingProperty(ACSVM::Thread *thread, const ACSVM::Word *argV, A
return false;
}
//not needed
#if 0
bool CallFunc_AddMessage(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC)
{
(void)argC;
ACSVM::MapScope *map = thread->scopeMap;
CONS_Printf(map->getString(argV[0])->str);
thread->dataStk.push(0);
return false;
}
bool CallFunc_AddMessageForPlayer(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC)
{
(void)argC;
ACSVM::MapScope *map = thread->scopeMap;
auto info = &static_cast<Thread *>(thread)->info;
if ((info != NULL)
&& (info->mo != NULL && P_MobjWasRemoved(info->mo) == false)
&& (info->mo->player != NULL))
{
if (ACS_ActivatorIsLocal(thread))
CONS_Printf(map->getString(argV[0])->str);
}
thread->dataStk.push(0);
return false;
}
#endif

View file

@ -107,9 +107,4 @@ bool CallFunc_SetSectorProperty(ACSVM::Thread *thread, const ACSVM::Word *argV,
bool CallFunc_GetThingProperty(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
bool CallFunc_SetThingProperty(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
#if 0
bool CallFunc_AddMessage(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
bool CallFunc_AddMessageForPlayer(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
#endif
#endif // __SRB2_ACS_CALL_FUNCS_HPP__

View file

@ -160,7 +160,6 @@ Environment::Environment()
addFuncDataACS0( 300, addCallFunc(CallFunc_CountEnemies));
addFuncDataACS0( 301, addCallFunc(CallFunc_CountPushables));
// addFuncDataACS0( 302, addCallFunc(CallFunc_Dummy1));
addFuncDataACS0( 303, addCallFunc(CallFunc_HaveUnlockable));
addFuncDataACS0( 304, addCallFunc(CallFunc_PlayerSkin));
addFuncDataACS0( 305, addCallFunc(CallFunc_GetObjectDye));
@ -175,35 +174,17 @@ Environment::Environment()
addFuncDataACS0( 315, addCallFunc(CallFunc_PlayerBot));
addFuncDataACS0( 316, addCallFunc(CallFunc_ModeAttacking));
addFuncDataACS0( 317, addCallFunc(CallFunc_NiGHTSAttack));
// addFuncDataACS0( 318, addCallFunc(CallFunc_Dummy3));
// addFuncDataACS0( 319, addCallFunc(CallFunc_Dummy4));
addFuncDataACS0( 320, addCallFunc(CallFunc_PlayerExiting));
addFuncDataACS0( 500, addCallFunc(CallFunc_CameraWait));
// addFuncDataACS0( 501, addCallFunc(CallFunc_Dummy5));
// addFuncDataACS0( 502, addCallFunc(CallFunc_Dummy6));
addFuncDataACS0( 503, addCallFunc(CallFunc_SetLineRenderStyle));
addFuncDataACS0( 504, addCallFunc(CallFunc_MapWarp));
addFuncDataACS0( 505, addCallFunc(CallFunc_AddBot));
// addFuncDataACS0( 506, addCallFunc(CallFunc_Dummy7));
addFuncDataACS0( 507, addCallFunc(CallFunc_ExitLevel));
addFuncDataACS0( 508, addCallFunc(CallFunc_MusicPlay));
addFuncDataACS0( 509, addCallFunc(CallFunc_MusicStopAll));
addFuncDataACS0( 510, addCallFunc(CallFunc_MusicRestore));
// addFuncDataACS0( 511, addCallFunc(CallFunc_Dummy9));
addFuncDataACS0( 512, addCallFunc(CallFunc_MusicDim));
// addFuncDataACS0( 600, addCallFunc(CallFunc_Dummy10));
// addFuncDataACS0( 601, addCallFunc(CallFunc_Dummy11));
// addFuncDataACS0( 602, addCallFunc(CallFunc_Dummy12));
// addFuncDataACS0( 603, addCallFunc(CallFunc_Dummy13));
// addFuncDataACS0( 604, addCallFunc(CallFunc_Dummy14));
// addFuncDataACS0( 605, addCallFunc(CallFunc_Dummy15));
// addFuncDataACS0( 700, addCallFunc(CallFunc_AddMessage));
// addFuncDataACS0( 701, addCallFunc(CallFunc_AddMessageForPlayer));
// addFuncDataACS0( 702, addCallFunc(CallFunc_Dummy16));
// addFuncDataACS0( 703, addCallFunc(CallFunc_Dummy17));
}
ACSVM::Thread *Environment::allocThread()

View file

@ -3939,7 +3939,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
case 466: // Set level failure state
{
if (args[1])
if (args[0])
{
stagefailed = false;
CONS_Debug(DBG_GAMELOGIC, "Stage can be completed successfully!\n");