Update Healer Man server
This commit is contained in:
1 parent
9c5fb4c614
commit
bd073fb00f
113 files changed
+4902
-273
No files matched your search
@@ -119,6 +119,9 @@ const lootLabelStyle: CSSProperties = {
|
||||
};
|
||||
|
||||
const POPULATION_ACTIVATION_DISTANCE = 95;
|
||||
// Scholomance stacks rooms on several floors around its entrance. Its standard
|
||||
// radius mounts nearly 200 mobs at once, including creatures behind walls.
|
||||
const SCHOLOMANCE_ACTIVATION_DISTANCE = 48;
|
||||
|
||||
function mobTargetPosition(
|
||||
targetActorId: string | null | undefined,
|
||||
@@ -808,7 +811,10 @@ function isPlayerOrPartyNear(points: readonly MobVector3[], maxDistance: number)
|
||||
* so the player's 10 Hz HUD snapshot does not re-render the population tree.
|
||||
*/
|
||||
function usePopulationProximity(points: readonly MobVector3[]): boolean {
|
||||
const initial = isPlayerOrPartyNear(points, POPULATION_ACTIVATION_DISTANCE);
|
||||
const activationDistance = useGameStore.getState().activeDungeonId === "scholomance"
|
||||
? SCHOLOMANCE_ACTIVATION_DISTANCE
|
||||
: POPULATION_ACTIVATION_DISTANCE;
|
||||
const initial = isPlayerOrPartyNear(points, activationDistance);
|
||||
const nearbyRef = useRef(initial);
|
||||
const [nearby, setNearby] = useState(initial);
|
||||
const elapsedRef = useRef(0);
|
||||
@@ -819,7 +825,7 @@ function usePopulationProximity(points: readonly MobVector3[]): boolean {
|
||||
elapsedRef.current = 0;
|
||||
|
||||
// Small hysteresis prevents mount/unmount churn at the boundary.
|
||||
const distance = POPULATION_ACTIVATION_DISTANCE + (nearbyRef.current ? 18 : 0);
|
||||
const distance = activationDistance + (nearbyRef.current ? 18 : 0);
|
||||
const next = isPlayerOrPartyNear(points, distance);
|
||||
if (next === nearbyRef.current) return;
|
||||
nearbyRef.current = next;
|
||||
|
||||
Reference in new issue
Block a user