Fix several crucial bits of data not being loaded

- Creature save data
- Outdoor wandering encounters
- Fix crash when entering outdoor combat after loading
- Stop using char types in cItemRec
- Move all pending attributes from cMonster to cCreature
This commit is contained in:
2014-04-21 21:35:26 -04:00
parent e8022df514
commit 434d4c522f
10 changed files with 85 additions and 57 deletions

View File

@@ -130,6 +130,22 @@ void finish_load_party(){
if (!load_scenario(path))
return;
// Saved creatures may not have had their monster attributes saved
// Make sure that they know what they are!
// Cast to cMonster base class and assign, to avoid clobbering other attributes
for(int i = 0; i < 4; i++) {
for(int j = 0; j < 60; j++) {
int number = univ.party.creature_save[i][j].number;
cMonster& monst = univ.party.creature_save[i][j];
monst = scenario.scen_monsters[number];
}
}
for(int j = 0; j < 60; j++) {
int number = univ.town.monst[j].number;
cMonster& monst = univ.town.monst[j];
monst = scenario.scen_monsters[number];
}
// if at this point, startup must be over, so make this call to make sure we're ready,
// graphics wise
end_startup();