diff --git a/Aetheria.State.Daemon.Smoke/Program.cs b/Aetheria.State.Daemon.Smoke/Program.cs index 9afc68b38..1c90d76c4 100644 --- a/Aetheria.State.Daemon.Smoke/Program.cs +++ b/Aetheria.State.Daemon.Smoke/Program.cs @@ -170,6 +170,7 @@ internal sealed class AetheriaDaemonYmirSmokeChecks ThermalMedicalExposureUsesCockpitTemperature, ThermalMedicalDeathUsesOrdinaryDestructionPath, MultipleActorsUseTheSameMovementLever, + LookDirectionRejectsInvalidVectorsWithoutMutatingTheShip, AgentClaimsAndCompletesExploreTaskThroughCommands, SchedulerAssignsHighestPriorityCompatibleTask, SchedulerRequeuesTaskFromDeadAgent, @@ -507,6 +508,7 @@ internal sealed class AetheriaDaemonYmirSmokeChecks var world = Flatten(surface.Surface.Root).Single(node => node.Kind == "world.scene3d"); var aim = Flatten(surface.Surface.Root).Single(node => node.Kind == "aim.presentation"); Require(!string.IsNullOrWhiteSpace(world.Props["lookCommand"]) && + world.Props["lookModel"] == "planar-yaw.v1" && world.Props["lookSensitivityRadians"] == "-0.001", "playable world must advertise the daemon-owned continuous look command and fossil pointer response"); Require(aim.Props["controlledEntityIndex"] == "0" && @@ -2229,6 +2231,48 @@ internal sealed class AetheriaDaemonYmirSmokeChecks "releasing the movement lever must not steal targeting authority"); } + private static void LookDirectionRejectsInvalidVectorsWithoutMutatingTheShip() + { + var player = Entity(0, 0, "player"); + player.DirectionX = 0.6; + player.DirectionY = 0.8; + var run = new AetheriaRuntimeRunCheckpointCommit + { + RunId = "invalid-look-smoke", + CurrentZoneIndex = 0, + CurrentEntityKey = "zone.0.entity.0", + Zones = [new AetheriaRuntimeZoneSnapshotCommit { ZoneIndex = 0, Entities = [player] }] + }; + + AetheriaRuntimeDaemonCommandDocument Look(string id, double x, double z) + { + var command = AetheriaRuntimeDaemonCommandDocument.Create( + AetheriaRuntimeDaemonCommandKinds.SetLookDirection, + "look-smoke", + "look-session", + 0, + "zone.0.entity.0"); + command.CommandId = id; + command.DirectionX = x; + command.PositionZ = z; + return command; + } + + var operation = AetheriaRuntimeDaemonOperations.Execute(run, + [ + Look("zero-look", 0, 0), + Look("nan-look", double.NaN, 1), + Look("infinite-look", 1, double.PositiveInfinity) + ]); + + Require(operation.RejectedCommandIds.SequenceEqual(new[] { "zero-look", "nan-look", "infinite-look" }), + "zero and non-finite look intents must be rejected at the daemon authority boundary"); + RequireNear(0.6, player.DirectionX, 0.000001, + "rejected look intents must not mutate the authoritative ship direction X"); + RequireNear(0.8, player.DirectionY, 0.000001, + "rejected look intents must not mutate the authoritative ship direction Z"); + } + private static AetheriaRuntimeDaemonCommandDocument MovementCommand( string commandId, string actor, diff --git a/Aetheria.Unity/Packages/manifest.json b/Aetheria.Unity/Packages/manifest.json index 3fa9b5e15..b3b715291 100644 --- a/Aetheria.Unity/Packages/manifest.json +++ b/Aetheria.Unity/Packages/manifest.json @@ -9,6 +9,6 @@ "org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.13", "org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.1.1", "org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.1", - "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.24" + "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.25" } } diff --git a/Aetheria.Unity/Packages/packages-lock.json b/Aetheria.Unity/Packages/packages-lock.json index 80171db0d..96f144c49 100644 --- a/Aetheria.Unity/Packages/packages-lock.json +++ b/Aetheria.Unity/Packages/packages-lock.json @@ -142,7 +142,7 @@ "hash": "d0aa50d31f3b6da96bffc194fdc3aa358f37e332" }, "org.gamecult.eve.unity-scene": { - "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.24", + "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.25", "depth": 0, "source": "git", "dependencies": { @@ -151,7 +151,7 @@ "org.gamecult.eve.surface": "0.2.1", "com.unity.mathematics": "1.3.2" }, - "hash": "e43f2d74557dcbf2cc408893c7b7d7ac708a44a8" + "hash": "58d87c628a261751439584263c18e93a7d8d8708" }, "com.unity.modules.assetbundle": { "version": "1.0.0", diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs index 2a5ec9f23..18ddfef12 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs @@ -609,6 +609,7 @@ namespace GameCult.Aetheria.State.Verse ["presentationMode"] = isDocked ? "docked" : "world", ["movementCommand"] = CommandName(AetheriaRuntimeDaemonCommandKinds.SetMoveVector), ["lookCommand"] = CommandName(AetheriaRuntimeDaemonCommandKinds.SetLookDirection), + ["lookModel"] = "planar-yaw.v1", ["lookSensitivityRadians"] = "-0.001", ["focusCommand"] = CommandName(AetheriaRuntimeDaemonCommandKinds.TargetNearest), ["targetCommand"] = CommandName(AetheriaRuntimeDaemonCommandKinds.SetTarget),