In COOP, after ending an episode, start map is skipped and next episode starts immediately.

This commit is contained in:
slipyx 2019-08-14 18:13:06 -04:00
parent b505541f3c
commit dd71baf8dd
Signed by: slipyx
GPG Key ID: 09CEED554B4B1172
2 changed files with 21 additions and 0 deletions

View File

@ -314,6 +314,18 @@ void() changelevel_touch =
nextmap = self.map;
// [slipyx] skip start after episode ends in coop
if (coop && nextmap == "start")
{
if (mapname == "e1m7") nextmap = "e2m1";
if (mapname == "e2m6") nextmap = "e3m1";
if (mapname == "e3m6") nextmap = "e4m1";
if (mapname == "e4m7") nextmap = "end";
if (mapname == "end") nextmap = "e1m1";
if (mapname == "e5end") nextmap = "e5m1";
other.health = 0; // for setnewparms
}
SUB_UseTargets ();
if ( (self.spawnflags & 1) && (deathmatch == 0) )

View File

@ -139,6 +139,7 @@ void() finale_1 =
pl.movetype = MOVETYPE_NONE;
pl.modelindex = 0;
setorigin (pl, pos.origin);
if (coop) pl.health = 0; // [slipyx] so changelevel will setnewparms
pl = find (pl, classname, "player");
}
@ -235,6 +236,14 @@ void() finale_4 =
WriteByte (MSG_ALL, 3);
WriteByte (MSG_ALL, 3);
lightstyle(0, "m");
// [slipyx] go back to e1m1 in coop
if (coop)
{
n.nextthink = time + 35;
nextmap = "e1m1";
n.think = GotoNextMap;
}
};
//============================================================================