mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-03-11 11:17:16 +08:00
Almost fully fix Chasing Shadows (#2202)
This commit is contained in:
parent
9dbeb2172d
commit
2788206934
@ -27,27 +27,6 @@ public class ExecNotifyGroupLua extends QuestExecHandler {
|
|||||||
}
|
}
|
||||||
scene.runWhenFinished(
|
scene.runWhenFinished(
|
||||||
() -> {
|
() -> {
|
||||||
val groupInstance = scriptManager.getGroupInstanceById(groupId);
|
|
||||||
|
|
||||||
if (groupInstance != null) {
|
|
||||||
// workaround to make sure the triggers are still there todo find better way of trigger
|
|
||||||
// handling
|
|
||||||
scriptManager.refreshGroup(groupInstance);
|
|
||||||
Grasscutter.getLogger()
|
|
||||||
.trace(
|
|
||||||
"group: {} \ncondition: {} \nparamStr {}",
|
|
||||||
groupInstance.getLuaGroup(),
|
|
||||||
condition,
|
|
||||||
paramStr);
|
|
||||||
} else {
|
|
||||||
Grasscutter.getLogger()
|
|
||||||
.debug(
|
|
||||||
"notify, no group instance for:\n group: {} \ncondition: {} \nparamStr {}",
|
|
||||||
groupId,
|
|
||||||
condition,
|
|
||||||
paramStr);
|
|
||||||
}
|
|
||||||
|
|
||||||
val eventType =
|
val eventType =
|
||||||
quest.getState() == QuestState.QUEST_STATE_FINISHED
|
quest.getState() == QuestState.QUEST_STATE_FINISHED
|
||||||
? EventType.EVENT_QUEST_FINISH
|
? EventType.EVENT_QUEST_FINISH
|
||||||
|
@ -32,9 +32,9 @@ public class SceneRegion {
|
|||||||
public boolean contains(Position position) {
|
public boolean contains(Position position) {
|
||||||
switch (shape) {
|
switch (shape) {
|
||||||
case ScriptRegionShape.CUBIC:
|
case ScriptRegionShape.CUBIC:
|
||||||
return (Math.abs(pos.getX() - position.getX()) <= size.getX())
|
return (Math.abs(pos.getX() - position.getX()) <= size.getX() / 2f)
|
||||||
&& (Math.abs(pos.getY() - position.getY()) <= size.getY())
|
&& (Math.abs(pos.getY() - position.getY()) <= size.getY() / 2f)
|
||||||
&& (Math.abs(pos.getZ() - position.getZ()) <= size.getZ());
|
&& (Math.abs(pos.getZ() - position.getZ()) <= size.getZ() / 2f);
|
||||||
case ScriptRegionShape.SPHERE:
|
case ScriptRegionShape.SPHERE:
|
||||||
var x = Math.pow(pos.getX() - position.getX(), 2);
|
var x = Math.pow(pos.getX() - position.getX(), 2);
|
||||||
var y = Math.pow(pos.getY() - position.getY(), 2);
|
var y = Math.pow(pos.getY() - position.getY(), 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user