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
commit4ef8afa9e14bb71820ab1589cf4077d135f7dce3 (patch)
tree2ecfa19852c1778cf7b93b0d09b0a0ac57721446 /src
parenta352bf852999cd845ecec803c0aea4e5a5f2579b (diff)
downloadopenttd-4ef8afa9e14bb71820ab1589cf4077d135f7dce3.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 {