forked from phenom/healer-man
Release Healer Man 0.1.7
This commit is contained in:
1 parent
b12fb84859
commit
eca6b5db9b
99 files changed
+1931
-150
No files matched your search
@@ -78,6 +78,7 @@ import { useGameStore } from "../game/store";
|
||||
import { useManastormStore } from "../game/manastormStore";
|
||||
import { registerCombatSpatialProvider } from "../game/combatSpatial";
|
||||
import { PLAYER_AGGRO_ID } from "../game/aggro";
|
||||
import { hasDungeonLineOfSight } from "./dungeonLineOfSight";
|
||||
|
||||
const PARTY_MOVE_SPEED = 5.25;
|
||||
const PARTY_CATCH_UP_SPEED = 7.5;
|
||||
@@ -378,25 +379,7 @@ function PartyActors({
|
||||
const hasStaticLineOfSight = useCallback((
|
||||
start: PartyWorldPosition,
|
||||
end: PartyWorldPosition,
|
||||
): boolean => {
|
||||
const dx = end[0] - start[0];
|
||||
const dy = end[1] - start[1];
|
||||
const dz = end[2] - start[2];
|
||||
const distance = Math.hypot(dx, dy, dz);
|
||||
if (!Number.isFinite(distance)) return false;
|
||||
if (distance <= 0.08) return true;
|
||||
const ray = new rapier.Ray(
|
||||
{ x: start[0], y: start[1] + 1.05, z: start[2] },
|
||||
{ x: dx / distance, y: dy / distance, z: dz / distance },
|
||||
);
|
||||
const hit = world.castRay(
|
||||
ray,
|
||||
distance,
|
||||
true,
|
||||
rapier.QueryFilterFlags.EXCLUDE_SENSORS | rapier.QueryFilterFlags.EXCLUDE_DYNAMIC,
|
||||
);
|
||||
return !hit || hit.timeOfImpact >= distance - 0.08;
|
||||
}, [rapier, world]);
|
||||
): boolean => hasDungeonLineOfSight(rapier, world, start, end), [rapier, world]);
|
||||
const routeSurfaceSegmentAllowed = useCallback((
|
||||
start: PartyWorldPosition,
|
||||
end: PartyWorldPosition,
|
||||
|
||||
Reference in new issue
Block a user