From 4ef8afa9e14bb71820ab1589cf4077d135f7dce3 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 12 Jan 2007 16:44:08 +0000 Subject: (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. --- src/newgrf_spritegroup.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 { -- cgit v1.2.3-70-g09d2