aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_control.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2017-08-22 20:57:22 -0400
committerPaul Gilbert2017-08-22 20:57:22 -0400
commit0e2be98857a3fbf028aeb62a12a684cbb6116a19 (patch)
tree56b7e352c9ccff45a25fd00eb8866b544cc86e59 /engines/titanic/pet_control/pet_control.cpp
parentaad739120b96826ebe69e58fb6f2a4fb2bb8d966 (diff)
downloadscummvm-rg350-0e2be98857a3fbf028aeb62a12a684cbb6116a19.tar.gz
scummvm-rg350-0e2be98857a3fbf028aeb62a12a684cbb6116a19.tar.bz2
scummvm-rg350-0e2be98857a3fbf028aeb62a12a684cbb6116a19.zip
TITANIC: Ensure PET _remoteTargetName is set when saving
Diffstat (limited to 'engines/titanic/pet_control/pet_control.cpp')
-rw-r--r--engines/titanic/pet_control/pet_control.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index 73f6df58a0..cfd209f763 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -58,6 +58,10 @@ CPetControl::CPetControl() : CGameObject(),
}
void CPetControl::save(SimpleFile *file, int indent) {
+ // Ensure a remote target name is set if there is one
+ if (_remoteTargetName.empty() && _remoteTarget)
+ _remoteTargetName = _remoteTarget->getName();
+
file->writeNumberLine(0, indent);
file->writeNumberLine(_currentArea, indent);
file->writeQuotedLine(_activeNPCName, indent);