mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r19750) -Fix: Var 0x43 is not 'safe' during callbacks 22 and 38 either.
This commit is contained in:
parent
cb61f5ac10
commit
1716314fa5
|
@ -185,12 +185,6 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par
|
||||||
}
|
}
|
||||||
|
|
||||||
if (industry == NULL) {
|
if (industry == NULL) {
|
||||||
/* industry does not exist, only use those variables that are "safe" */
|
|
||||||
switch (variable) {
|
|
||||||
/* Manhattan distance of closes dry/water tile */
|
|
||||||
case 0x43: return GetClosestWaterDistance(tile, (indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER) == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG(grf, 1, "Unhandled property 0x%X (no available industry) in callback 0x%x", variable, object->callback);
|
DEBUG(grf, 1, "Unhandled property 0x%X (no available industry) in callback 0x%x", variable, object->callback);
|
||||||
|
|
||||||
*available = false;
|
*available = false;
|
||||||
|
|
Loading…
Reference in New Issue