From 0e2be98857a3fbf028aeb62a12a684cbb6116a19 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 22 Aug 2017 20:57:22 -0400 Subject: TITANIC: Ensure PET _remoteTargetName is set when saving --- engines/titanic/pet_control/pet_control.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/titanic/pet_control/pet_control.cpp') 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); -- cgit v1.2.3