1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

(svn r12947) -Fix: keep only first 15 bits for non failed callback results

This commit is contained in:
glx
2008-05-04 22:32:25 +00:00
parent a51e32376e
commit 9eb498eb53

View File

@@ -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;