Add the skipFade parameter in bsptransition so the fade can be skipped

Useful for scripts that are using fadeout during cinematics and then transitioning to the nextmap, like in e2l2 where vehicles explode at the end of the mission
This commit is contained in:
smallmodel 2024-11-05 22:37:33 +01:00
parent f5d2fdbcad
commit f347102ecb
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -1043,10 +1043,9 @@ Event EV_ScriptThread_BspTransition
(
"bsptransition",
EV_DEFAULT,
"s",
"next_map",
"Transitions to the next BSP. Keeps player data,"
"and game data."
"sB",
"next_map skipFade", // Added in 2.30: skipFade
"Transitions to the next BSP. Keeps player data, and game data."
);
Event EV_ScriptThread_LevelTransition
(
@ -4090,9 +4089,15 @@ void ScriptThread::EventRadiusDamage(Event *ev)
void ScriptThread::EventBspTransition(Event *ev)
{
str map = ev->GetString(1);
bool skipFade;
if (ev->NumArgs() >= 2) {
// Added in 2.30
skipFade = ev->GetBoolean(2);
}
if (level.intermissiontime == 0.0f) {
G_BeginIntermission(map, TRANS_BSP);
G_BeginIntermission(map, TRANS_BSP, skipFade);
}
}