summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-01-12 16:44:08 +0000
committerpeter1138 <peter1138@openttd.org>2007-01-12 16:44:08 +0000
commit32bee7948553a0347c1f57289a51f3fc7eb90dba (patch)
tree2ecfa19852c1778cf7b93b0d09b0a0ac57721446 /src
parenta5cd65b3f961c190ee29ab76c896c7b06379af76 (diff)
downloadopenttd-32bee7948553a0347c1f57289a51f3fc7eb90dba.tar.xz
(svn r8081) -Fix (r8075): Use a copy of the resolver object instead of the using the existing one. This fixes problems with the object scope setting.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_spritegroup.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp
index 97e0114e2..69c286459 100644
--- a/src/newgrf_spritegroup.cpp
+++ b/src/newgrf_spritegroup.cpp
@@ -144,7 +144,8 @@ static inline const SpriteGroup *ResolveVariable(const SpriteGroup *group, Resol
/* Try to get the variable. We shall assume it is available, unless told otherwise. */
bool available = true;
if (adjust->variable == 0x7E) {
- const SpriteGroup *subgroup = Resolve(adjust->subroutine, object);
+ ResolverObject subobject = *object;
+ const SpriteGroup *subgroup = Resolve(adjust->subroutine, &subobject);
if (subgroup == NULL || subgroup->type != SGT_CALLBACK) {
value = CALLBACK_FAILED;
} else {