aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/party.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-17 21:29:05 -0400
committerPaul Gilbert2018-03-18 14:33:03 -0400
commitb0bb560138f1f1415654a540cdc8fd51fef13501 (patch)
tree9889c70edf1d5fdd700a23db5b074743ce093f4b /engines/xeen/party.cpp
parent4dd0713fddb2589a7a23ec62f083994f384140c1 (diff)
downloadscummvm-rg350-b0bb560138f1f1415654a540cdc8fd51fef13501.tar.gz
scummvm-rg350-b0bb560138f1f1415654a540cdc8fd51fef13501.tar.bz2
scummvm-rg350-b0bb560138f1f1415654a540cdc8fd51fef13501.zip
XEEN: Properly write party character data when saving the game
Diffstat (limited to 'engines/xeen/party.cpp')
-rw-r--r--engines/xeen/party.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index 83490abefa..8e94c939c3 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -54,6 +54,14 @@ Roster::Roster() {
}
void Roster::synchronize(Common::Serializer &s) {
+ Party &party = *g_vm->_party;
+
+ if (s.isSaving()) {
+ // Copy out the party's characters back to the roster
+ for (uint idx = 0; idx < party._activeParty.size(); ++idx)
+ (*this)[party._activeParty[idx]._rosterId] = party._activeParty[idx];
+ }
+
for (uint i = 0; i < TOTAL_CHARACTERS; ++i)
(*this)[i].synchronize(s);
}