mirror of https://github.com/OpenTTD/OpenTTD
(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.
parent
a352bf8529
commit
4ef8afa9e1
|
@ -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. */
|
/* Try to get the variable. We shall assume it is available, unless told otherwise. */
|
||||||
bool available = true;
|
bool available = true;
|
||||||
if (adjust->variable == 0x7E) {
|
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) {
|
if (subgroup == NULL || subgroup->type != SGT_CALLBACK) {
|
||||||
value = CALLBACK_FAILED;
|
value = CALLBACK_FAILED;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue