diff options
author | glx <glx@openttd.org> | 2008-05-04 22:32:25 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2008-05-04 22:32:25 +0000 |
commit | 9eb498eb5397d46b8a16eb59626900ebd1af2dc2 (patch) | |
tree | a53051430449f2812dfac807865c7e6597464185 /src/newgrf_spritegroup.cpp | |
parent | a51e32376eda7c62de0b70d3771324dec6afbbc0 (diff) | |
download | openttd-9eb498eb5397d46b8a16eb59626900ebd1af2dc2.tar.xz |
(svn r12947) -Fix: keep only first 15 bits for non failed callback results
Diffstat (limited to 'src/newgrf_spritegroup.cpp')
-rw-r--r-- | src/newgrf_spritegroup.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index b8103ae02..989ee2034 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -204,6 +204,7 @@ static inline const SpriteGroup *ResolveVariable(const SpriteGroup *group, Resol if (group->g.determ.num_ranges == 0) { /* nvar == 0 is a special case -- we turn our value into a callback result */ + if (value != CALLBACK_FAILED) value = GB(value, 0, 15); nvarzero.type = SGT_CALLBACK; nvarzero.g.callback.result = value; return &nvarzero; |