mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-19 14:00:24 +02:00
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:
1 file changed
+10
-5
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user