make boats and horses exist in legacy scenarios

This commit is contained in:
2025-08-04 21:34:19 -05:00
parent b72bf8f7a8
commit bd6b9ae247
2 changed files with 4 additions and 3 deletions

View File

@@ -492,7 +492,7 @@ void start_town_mode(short which_town, short entry_dir, bool debug_enter) {
monst.targ_loc.y = 0; monst.targ_loc.y = 0;
} }
// check horses // check boats
for(short i = 0; i < univ.party.boats.size(); i++) { for(short i = 0; i < univ.party.boats.size(); i++) {
if(univ.scenario.boats[i].which_town >= 0 && univ.scenario.boats[i].loc.x >= 0) { if(univ.scenario.boats[i].which_town >= 0 && univ.scenario.boats[i].loc.x >= 0) {
if(!univ.party.boats[i].exists) { if(!univ.party.boats[i].exists) {
@@ -501,6 +501,7 @@ void start_town_mode(short which_town, short entry_dir, bool debug_enter) {
} }
} }
} }
// check horses
for(short i = 0; i < univ.party.horses.size(); i++) { for(short i = 0; i < univ.party.horses.size(); i++) {
if(univ.scenario.horses[i].which_town >= 0 && univ.scenario.horses[i].loc.x >= 0) { if(univ.scenario.horses[i].which_town >= 0 && univ.scenario.horses[i].loc.x >= 0) {
if(!univ.party.horses[i].exists) { if(!univ.party.horses[i].exists) {

View File

@@ -25,7 +25,7 @@ cVehicle::cVehicle() :
void cVehicle::import_legacy(legacy::horse_record_type& old){ void cVehicle::import_legacy(legacy::horse_record_type& old){
which_town = old.which_town; which_town = old.which_town;
exists = old.exists; exists = which_town >= 0 && which_town <= 200;
property = old.property; property = old.property;
if(which_town < 200) { if(which_town < 200) {
loc.x = old.horse_loc.x; loc.x = old.horse_loc.x;
@@ -40,7 +40,7 @@ void cVehicle::import_legacy(legacy::horse_record_type& old){
void cVehicle::import_legacy(legacy::boat_record_type& old){ void cVehicle::import_legacy(legacy::boat_record_type& old){
which_town = old.which_town; which_town = old.which_town;
exists = old.exists; exists = which_town >= 0 && which_town <= 200;
property = old.property; property = old.property;
if(which_town < 200) { if(which_town < 200) {
loc.x = old.boat_loc.x; loc.x = old.boat_loc.x;