mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 01:15:52 +01:00
Almost fully fix Chasing Shadows (#2202)
This commit is contained in:
@@ -32,9 +32,9 @@ public class SceneRegion {
|
||||
public boolean contains(Position position) {
|
||||
switch (shape) {
|
||||
case ScriptRegionShape.CUBIC:
|
||||
return (Math.abs(pos.getX() - position.getX()) <= size.getX())
|
||||
&& (Math.abs(pos.getY() - position.getY()) <= size.getY())
|
||||
&& (Math.abs(pos.getZ() - position.getZ()) <= size.getZ());
|
||||
return (Math.abs(pos.getX() - position.getX()) <= size.getX() / 2f)
|
||||
&& (Math.abs(pos.getY() - position.getY()) <= size.getY() / 2f)
|
||||
&& (Math.abs(pos.getZ() - position.getZ()) <= size.getZ() / 2f);
|
||||
case ScriptRegionShape.SPHERE:
|
||||
var x = Math.pow(pos.getX() - position.getX(), 2);
|
||||
var y = Math.pow(pos.getY() - position.getY(), 2);
|
||||
|
||||
Reference in New Issue
Block a user