1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 18:39:10 +00:00

Fix: [NewGRF] Computed VarAction2 callback results were not always properly masked to 15 bit results.

This commit is contained in:
frosch
2025-04-28 13:24:39 +02:00
parent 2c19a42fc2
commit f1d9e4a6c7

View File

@@ -230,9 +230,8 @@ const SpriteGroup *DeterministicSpriteGroup::Resolve(ResolverObject &object) con
if (this->calculated_result) {
/* nvar == 0 is a special case -- we turn our value into a callback result */
if (value != CALLBACK_FAILED) value = GB(value, 0, 15);
static CallbackResultSpriteGroup nvarzero(0);
nvarzero.result = value;
nvarzero.result = GB(value, 0, 15);
return &nvarzero;
}