Fix initial ambience and music setting in sequences without cursor.

shapetextures
Sven Eberhardt 2015-09-28 16:53:14 -04:00
parent edf66783aa
commit aff87890e7
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@ static npc_tuesday;
func Intro_Start() func Intro_Start()
{ {
// Intro starts high up in the clouds // Intro starts high up in the clouds
Music("TheSkylands");
LoadScenarioSection("Intro"); LoadScenarioSection("Intro");
SetWind(-100); SetWind(-100);
this.intro_skyscroll_xdir = -10; this.intro_skyscroll_xdir = -10;

View File

@ -131,6 +131,7 @@ private func Execute()
private func ExecutePlayer(int plr, array environments) private func ExecutePlayer(int plr, array environments)
{ {
var cursor = GetCursor(plr); var cursor = GetCursor(plr);
if (!cursor) cursor = GetPlrView(plr);
// Update active state of all player environments // Update active state of all player environments
if (cursor) if (cursor)
{ {
@ -196,7 +197,8 @@ func InitializePlayer(int plr)
envs[i] = new all_environments[i] { change_delay = 999, is_active = false }; envs[i] = new all_environments[i] { change_delay = 999, is_active = false };
player_environments[plr] = envs; player_environments[plr] = envs;
// Newly joining players should have set playlist immediately (so they don't start playing a random song just to switch it immediately) // Newly joining players should have set playlist immediately (so they don't start playing a random song just to switch it immediately)
ExecutePlayer(plr); // However, this only works with a cursor
ExecutePlayer(plr, envs);
} }
return true; return true;
} }