Fix #1973: Gems do not grow on wooden bridges anymore

Gems should not be near material vehicle now. This does still not prevent them from growing on things that the player built with concrete.
install-platforms
Mark 2018-01-07 16:14:54 +01:00
parent 8bf90871e1
commit 0d38a3fb33
1 changed files with 6 additions and 3 deletions

View File

@ -218,10 +218,13 @@ global func FxGrowGemStalactitesTimer(object target, proplist effect, int time)
if (y <= pos.y - 5)
continue;
// Check for other stalactites and crew members.
var dist = 300;
// Check for other stalactites, crew members, and vehicle material (wooden bridges, etc.). The new stalactite should not be too close to either
var dist = 300;
var vehicle_dist = 30;
if (!!FindLocation(Loc_Or(Loc_Material("Vehicle")), Loc_InRect(pos.x - vehicle_dist, pos.y - vehicle_dist, 2 * vehicle_dist, 2 * vehicle_dist)))
continue;
if (!!FindLocation(Loc_Or(Loc_Material("Ruby"), Loc_Material("Amethyst")), Loc_InRect(pos.x - dist, pos.y - dist, 2 * dist, 2 * dist)))
continue;
continue;
if (!!FindObject(Find_OCF(OCF_CrewMember), Find_Distance(dist, pos.x, pos.y)))
continue;