forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
39458d5de6
commit
6cc1b9217f
203 files changed
+133929
-31271
No files matched your search
@@ -2,12 +2,14 @@ import { beforeEach, describe, expect, it } from "vitest";
|
||||
import {
|
||||
clearPartyRuntimeRegistry,
|
||||
clearPartyRuntimeAttackCorridor,
|
||||
consumePartyRuntimeCombatRelocation,
|
||||
getPartyRuntimePosition,
|
||||
partyRuntimeDistanceSquared,
|
||||
partyRuntimeCenter,
|
||||
partyRuntimeTargetVisible,
|
||||
partyRuntimePositionAlongAttackCorridor,
|
||||
registerPartyRuntimePosition,
|
||||
requestPartyRuntimeCombatRelocation,
|
||||
updatePartyRuntimeTargetVisibility,
|
||||
updatePartyRuntimeAttackCorridor,
|
||||
updatePartyRuntimePosition,
|
||||
@@ -46,6 +48,18 @@ describe("party runtime position registry", () => {
|
||||
expect(partyRuntimeIsRejoining("tank")).toBe(false);
|
||||
});
|
||||
|
||||
it("consumes combat teleports once without creating a rejoin task", () => {
|
||||
const origin: [number, number, number] = [1, 2, 3];
|
||||
registerPartyRuntimePosition("rogue", [0, 0, 0]);
|
||||
requestPartyRuntimeCombatRelocation("rogue", origin, 1.25);
|
||||
origin[0] = 999;
|
||||
expect(getPartyRuntimePosition("rogue")).toEqual([1, 2, 3]);
|
||||
const relocation = consumePartyRuntimeCombatRelocation("rogue")!;
|
||||
expect(relocation).toEqual({ position: [1, 2, 3], yaw: 1.25 });
|
||||
expect(consumePartyRuntimeCombatRelocation("rogue")).toBeNull();
|
||||
expect(partyRuntimeIsRejoining("rogue")).toBe(false);
|
||||
});
|
||||
|
||||
it("tracks world actors without exposing mutable registry storage", () => {
|
||||
const unregister = registerPartyRuntimePosition("tank", [1, 2, 3]);
|
||||
updatePartyRuntimePosition("tank", 4, 5, 6);
|
||||
|
||||
Reference in new issue
Block a user