aboutsummaryrefslogtreecommitdiff
path: root/sword2/sync.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sword2/sync.cpp')
-rw-r--r--sword2/sync.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sword2/sync.cpp b/sword2/sync.cpp
index d5fb75105f..256ecf5097 100644
--- a/sword2/sync.cpp
+++ b/sword2/sync.cpp
@@ -46,8 +46,10 @@ void Logic::clearSyncs(uint32 id) {
*/
int Logic::getSync() {
+ uint32 id = readVar(ID);
+
for (int i = 0; i < MAX_syncs; i++) {
- if (_syncList[i].id == _scriptVars[ID])
+ if (_syncList[i].id == id)
return i;
}