pret / pokecrystal

Disassembly of Pokémon Crystal
https://pret.github.io/pokecrystal/
2.07k stars 778 forks source link

[Bug] ["no-maps" Branch] Whiting out while set to the default spawnpoint causes a crash #1075

Closed DoctorOrchid closed 1 year ago

DoctorOrchid commented 1 year ago

In the "no-maps" branch, fainting in battle while on the default spawn causes the game to crash. The crash will persist regardless of if you add the normal map spawns and flypoints back or add entirely new ones.

The usual result is a white screen when the battle ends, however in rare cases I've gotten it to go to the "This game requires the GBC" screen, and twice I even got it to go to a garbage map made out of the Gate and Mart blocksets respectively (these were on a modified version of the branch, but nothing in there was using the Gate or Mart tileset at the time).

I attempted to troubleshoot the problem myself by comparing the files relevant to SPAWN_HOME, SPAWN_N_A, and wDefaultSpawnpoint with the vanilla pokecrystal files, however nothing seemed to be out of the ordinary. Another test was to see if there was a problem with the modified PlayersHouse scripts, but copying those over from pokecrystal also didn't fix it. I have also not tested what happens if you beat Lance or Red and view the credits, however after looking at the code for how those work I don't believe they would have the same issue. Whatever is causing this is above my current level of understanding, but if anything I would guess it has something to do with SPAWN_N_A.

Healing at a Pokecenter in a typical, functional town causes respawns to work normally, so this is a temporary workaround to avoid the crash.

mid-kid commented 1 year ago

Please file this issue on the branch's repository, rather than the main repository.