forked from Mirrors/openclonk
Fix solid check position for earthquakes launched from local calls
The effect is created in global coordinates, but the SemiSolidCheck was done in local coordinates.ipv6
parent
308fc37e47
commit
93109e60f5
|
@ -43,11 +43,11 @@ func FxIntEarthquakeControlSaveScen(obj, fx, props)
|
|||
return true;
|
||||
}
|
||||
|
||||
// Launches an earthquake with epicenter (x,y).
|
||||
// Launches an earthquake with epicenter (x,y) in global coordinates.
|
||||
global func LaunchEarthquake(int x, int y, int strength)
|
||||
{
|
||||
// Earthquake should start in solid.
|
||||
if (!GBackSemiSolid(x, y))
|
||||
if (!GBackSemiSolid(x - GetX(), y - GetY()))
|
||||
return false;
|
||||
// Minimum strength is 15, maximum strength is 100.
|
||||
strength = BoundBy(strength, 15, 100);
|
||||
|
|
Loading…
Reference in New Issue