mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 07:21:53 +00:00
(svn r12947) -Fix: keep only first 15 bits for non failed callback results
This commit is contained in:
parent
a51e32376e
commit
9eb498eb53
@ -204,6 +204,7 @@ static inline const SpriteGroup *ResolveVariable(const SpriteGroup *group, Resol
|
|||||||
|
|
||||||
if (group->g.determ.num_ranges == 0) {
|
if (group->g.determ.num_ranges == 0) {
|
||||||
/* nvar == 0 is a special case -- we turn our value into a callback result */
|
/* 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.type = SGT_CALLBACK;
|
||||||
nvarzero.g.callback.result = value;
|
nvarzero.g.callback.result = value;
|
||||||
return &nvarzero;
|
return &nvarzero;
|
||||||
|
Loading…
Reference in New Issue
Block a user