This page details bugs of Spyro: A Hero's Tail (GameCube, Xbox, PlayStation 2).
|
|
This page sucks. |
Player Unload While Breathing Electric Crash#
|
|
This page or section needs more videos. |
If the player is unloaded while electric breath is being fired, the game crashes. This is most easily performed by pausing the game while holding the electric breath, and then quitting to the title screen.
The reason is due to the object responsible for the electric breath trying to play a sound at the player's position after the player has unloaded.
void ElecBreath::Stop()
{
m_GAlphaTarget = 0.0f;
m_Flags |= 2;
if (m_SFX.IsPlaying())
{
PlaySFX(HT_Sound_SFX_HERO_SPYRO_SHOOT_ELEC_END, gpPlayer->m_pItem); // Crash!
}
PlaySound(false);
}
This "Stop" function runs whenever the electric breath is equipped but not being fired.
When the player unloads, the ElecBreath object won't unload until sometime after, thus it'll still run its update routine one last time before it also unloads. Since the player is unloaded, the breath is not being fired, and thus the "Stop" function will run.
If it finds that the associated sound effect is playing, it means that the breath was fired last frame, and thus it plays an "end" sound effect at the player's position. This causes the function to try and dereference the player pointer (gpPlayer) which is now null, thus it crashes.