Add cParty::is_in_scenario()

This commit is contained in:
2023-01-20 09:07:24 -05:00
parent b896abf29b
commit 5cd2ced8c2
3 changed files with 6 additions and 2 deletions

View File

@@ -57,12 +57,11 @@ cCustomGraphics spec_scen_g;
void finish_load_party(){
bool town_restore = univ.party.town_num < 200;
bool in_scen = univ.party.scen_name.length() > 0;
party_in_memory = true;
// now if not in scen, this is it.
if(!in_scen) {
if(!univ.party.is_in_scenario()) {
if(overall_mode != MODE_STARTUP) {
reload_startup();
draw_startup(0);

View File

@@ -437,6 +437,10 @@ void cParty::clear_bad_status() {
adven[i]->clear_bad_status();
}
bool cParty::is_in_scenario() const {
return !scen_name.empty();
}
bool cParty::is_alive() const {
for(int i = 0; i < 6; i++)
if(adven[i]->is_alive())

View File

@@ -155,6 +155,7 @@ public:
void import_legacy(legacy::setup_save_type& old);
void import_legacy(legacy::pc_record_type(& old)[6]);
bool is_in_scenario() const;
bool is_alive() const;
bool is_friendly() const;
bool is_friendly(const iLiving& other) const;