ProvidenceMusicScene fix
* ProvidenceMusicScene no longer uses Providence's global NPC index to check if she's alive or not when delaying her music during her spawn animation. Was reported that this was causing freezes due to an IndexOutOfRange Exception: https://discord.com/channels/458428222061936650/1526090577056239696
This commit is contained in:
1 parent
c30c415773
commit
28b0e598b2
1 file changed
+2
-1
@@ -21,10 +21,11 @@ namespace CalamityMod.Systems
|
||||
if (ProvidenceSpawnState() == 180f)
|
||||
Main.musicFade[ProvidenceTrack] = 1f;
|
||||
}
|
||||
|
||||
public static float ProvidenceSpawnState()
|
||||
{
|
||||
int provIndex = CalamityGlobalNPC.holyBoss;
|
||||
if (provIndex < 0 || provIndex >= Main.maxNPCs || !Main.npc[provIndex].active)
|
||||
if (!Main.npc.IndexInRange(provIndex))
|
||||
return -1f;
|
||||
|
||||
var prov = Main.npc[provIndex];
|
||||
|
||||
Reference in new issue
Block a user