mirror of https://github.com/OpenTTD/OpenTTD
Codechange: CALLBACK_FAILED is an internal constant, do not use it as numeric value in VA2 computations.
parent
30b1eb6e5f
commit
d90f6f01cc
|
@ -198,9 +198,10 @@ const SpriteGroup *DeterministicSpriteGroup::Resolve(ResolverObject &object) con
|
||||||
if (adjust.variable == 0x7E) {
|
if (adjust.variable == 0x7E) {
|
||||||
const SpriteGroup *subgroup = SpriteGroup::Resolve(adjust.subroutine, object, false);
|
const SpriteGroup *subgroup = SpriteGroup::Resolve(adjust.subroutine, object, false);
|
||||||
if (subgroup == nullptr) {
|
if (subgroup == nullptr) {
|
||||||
value = CALLBACK_FAILED;
|
value = UINT16_MAX;
|
||||||
} else {
|
} else {
|
||||||
value = subgroup->GetCallbackResult();
|
value = subgroup->GetCallbackResult();
|
||||||
|
if (value == CALLBACK_FAILED) value = UINT16_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: 'last_value' and 'reseed' are shared between the main chain and the procedure */
|
/* Note: 'last_value' and 'reseed' are shared between the main chain and the procedure */
|
||||||
|
|
Loading…
Reference in New Issue