mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03: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:
parent
f5d2fdbcad
commit
f347102ecb
1 changed files with 10 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue