mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r26138) -Fix [FS#5821] (r26105-ish): [Script] scripts could trigger the internal IsValidRoadType assertion
This commit is contained in:
parent
ebf46b7e4f
commit
a7ac207c8f
@ -53,7 +53,7 @@
|
||||
|
||||
/* static */ bool ScriptRoad::IsRoadTypeAvailable(RoadType road_type)
|
||||
{
|
||||
return ::HasRoadTypesAvail(ScriptObject::GetCompany(), ::RoadTypeToRoadTypes((::RoadType)road_type));
|
||||
return ::IsValidRoadType((::RoadType)road_type) && ::HasRoadTypesAvail(ScriptObject::GetCompany(), ::RoadTypeToRoadTypes((::RoadType)road_type));
|
||||
}
|
||||
|
||||
/* static */ ScriptRoad::RoadType ScriptRoad::GetCurrentRoadType()
|
||||
|
Loading…
Reference in New Issue
Block a user