From 0f9538c8c8f4958b4778f9c358e6861d5249f0ce Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 4 Aug 2025 21:34:19 -0500 Subject: [PATCH] make boats and horses exist in legacy scenarios --- src/game/boe.town.cpp | 3 ++- src/scenario/vehicle.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/boe.town.cpp b/src/game/boe.town.cpp index 7f46d89a..e2001773 100644 --- a/src/game/boe.town.cpp +++ b/src/game/boe.town.cpp @@ -491,7 +491,7 @@ void start_town_mode(short which_town, short entry_dir, bool debug_enter) { monst.targ_loc.y = 0; } - // check horses + // check boats 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.party.boats[i].exists) { @@ -500,6 +500,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++) { if(univ.scenario.horses[i].which_town >= 0 && univ.scenario.horses[i].loc.x >= 0) { if(!univ.party.horses[i].exists) { diff --git a/src/scenario/vehicle.cpp b/src/scenario/vehicle.cpp index 7a2d0c3b..5716bf3e 100644 --- a/src/scenario/vehicle.cpp +++ b/src/scenario/vehicle.cpp @@ -25,7 +25,7 @@ cVehicle::cVehicle() : void cVehicle::import_legacy(legacy::horse_record_type& old){ which_town = old.which_town; - exists = old.exists; + exists = which_town >= 0 && which_town <= 200; property = old.property; if(which_town < 200) { 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){ which_town = old.which_town; - exists = old.exists; + exists = which_town >= 0 && which_town <= 200; property = old.property; if(which_town < 200) { loc.x = old.boat_loc.x;