Release Healer Man 0.1.35
This commit is contained in:
1 parent
46c272f889
commit
40d9f346d8
13 files changed
+218
-118
No files matched your search
@@ -38,7 +38,6 @@ import {
|
||||
partyNaturalFollowPosition,
|
||||
partyPersonalizedCombatMovementGoal,
|
||||
partyPresentationY,
|
||||
partySeparationGoal,
|
||||
partyShouldRecallForStuck,
|
||||
partyShouldMoveToComfortTarget,
|
||||
personalizedPartyCombatRangeBand,
|
||||
@@ -84,12 +83,12 @@ import { registerCombatSpatialProvider } from "../game/combatSpatial";
|
||||
import { PLAYER_AGGRO_ID } from "../game/aggro";
|
||||
import { hasDungeonLineOfSight } from "./dungeonLineOfSight";
|
||||
import { registerCombatEffectAnchor } from "./combatEffectAnchorRegistry";
|
||||
import { ACTOR_TERRAIN_QUERY_GROUPS } from "./actorCollision";
|
||||
import {
|
||||
createPartyDirectSegmentValidator,
|
||||
createPartyRouteSegmentValidator,
|
||||
PARTY_FLOOR_RAY_DEPTH,
|
||||
PARTY_FLOOR_RAY_HEIGHT,
|
||||
partyTerrainQueryFlags,
|
||||
} from "./partyTraversal";
|
||||
|
||||
const PARTY_MOVE_SPEED = 5.25;
|
||||
@@ -300,7 +299,8 @@ function PartyActors({
|
||||
ray,
|
||||
PARTY_FLOOR_RAY_DEPTH,
|
||||
true,
|
||||
partyTerrainQueryFlags(rapier),
|
||||
rapier.QueryFilterFlags.EXCLUDE_SENSORS,
|
||||
ACTOR_TERRAIN_QUERY_GROUPS,
|
||||
);
|
||||
const floorY = floor ? ray.origin.y - floor.timeOfImpact : null;
|
||||
return partyPresentationY(position[1], floorY, PARTY_MAX_GROUND_CORRECTION);
|
||||
@@ -394,7 +394,8 @@ function PartyActors({
|
||||
ray,
|
||||
20,
|
||||
true,
|
||||
rapier.QueryFilterFlags.EXCLUDE_SENSORS | rapier.QueryFilterFlags.EXCLUDE_DYNAMIC,
|
||||
rapier.QueryFilterFlags.EXCLUDE_SENSORS,
|
||||
ACTOR_TERRAIN_QUERY_GROUPS,
|
||||
);
|
||||
return hit ? [x, ray.origin.y - hit.timeOfImpact, z] : null;
|
||||
},
|
||||
@@ -636,11 +637,9 @@ function PartyActors({
|
||||
const nextPosition: MutablePartyWorldPosition = [0, 0, 0];
|
||||
const leaderDestination: MutablePartyWorldPosition = [0, 0, 0];
|
||||
const naturalFollowTarget: MutablePartyWorldPosition = [0, 0, 0];
|
||||
const separatedDesired: MutablePartyWorldPosition = [0, 0, 0];
|
||||
const livingIndices = party.members
|
||||
.map((member, index) => member.health > 0 ? index : -1)
|
||||
.filter((index) => index >= 0);
|
||||
const livingIds = new Set(livingIndices.map((index) => party.members[index].id));
|
||||
const movementProfileFor = (memberId: string, memberIndex: number): PartyMovementProfile => {
|
||||
const livingRank = Math.max(0, livingIndices.indexOf(memberIndex));
|
||||
const key = `${memberId}|${livingRank}`;
|
||||
@@ -651,13 +650,6 @@ function PartyActors({
|
||||
}
|
||||
return profile;
|
||||
};
|
||||
const peerPositionsFor = (memberId: string): PartyWorldPosition[] => {
|
||||
const peers: PartyWorldPosition[] = [];
|
||||
for (const [id, position] of positionsRef.current) {
|
||||
if (id !== memberId && livingIds.has(id)) peers.push(position);
|
||||
}
|
||||
return peers;
|
||||
};
|
||||
let leaderHasWaypoint = false;
|
||||
let leaderMovementExpected = false;
|
||||
let leaderFollowingPlayer = false;
|
||||
@@ -712,15 +704,12 @@ function PartyActors({
|
||||
};
|
||||
combatAnchorsRef.current.set(leader.id, combatAnchor);
|
||||
}
|
||||
const peers = peerPositionsFor(leader.id);
|
||||
const crowded = peers.some((peer) => planarDistance(leaderPosition, peer) < 0.85);
|
||||
const movementIntent = partyPersonalizedCombatMovementGoal(
|
||||
leaderPosition,
|
||||
targetPosition,
|
||||
hasStaticLineOfSight(leaderPosition, targetPosition),
|
||||
rangeBand,
|
||||
combatAnchor.bearing,
|
||||
crowded,
|
||||
leaderDestination,
|
||||
);
|
||||
if (movementIntent === "hold") {
|
||||
@@ -1039,15 +1028,12 @@ function PartyActors({
|
||||
};
|
||||
combatAnchorsRef.current.set(member.id, combatAnchor);
|
||||
}
|
||||
const peers = peerPositionsFor(member.id);
|
||||
const crowded = peers.some((peer) => planarDistance(current, peer) < 0.85);
|
||||
const movementIntent = partyPersonalizedCombatMovementGoal(
|
||||
current,
|
||||
memberTargetPosition,
|
||||
canSeeActiveTarget,
|
||||
rangeBand,
|
||||
combatAnchor.bearing,
|
||||
crowded,
|
||||
desired,
|
||||
);
|
||||
movementExpected = movementIntent !== "hold";
|
||||
@@ -1245,23 +1231,6 @@ function PartyActors({
|
||||
}
|
||||
|
||||
const movementProfile = movementProfileFor(member.id, index);
|
||||
if (hasDesired) {
|
||||
const peers = peerPositionsFor(member.id);
|
||||
if (
|
||||
partySeparationGoal(
|
||||
current,
|
||||
desired,
|
||||
peers,
|
||||
movementProfile.swayPhase,
|
||||
separatedDesired,
|
||||
)
|
||||
&& directSegmentAllowed(current, separatedDesired)
|
||||
) {
|
||||
desired[0] = separatedDesired[0];
|
||||
desired[1] = separatedDesired[1];
|
||||
desired[2] = separatedDesired[2];
|
||||
}
|
||||
}
|
||||
|
||||
const currentPlanarDistance = planarDistance(current, playerNavigation);
|
||||
if (member.health > 0 && party.command !== "stop" && hasDesired) {
|
||||
|
||||
Reference in new issue
Block a user