]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[Staging] Let admins ignore the laws of physics again. (#42221)
authorPrincess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
Sat, 3 Jan 2026 19:39:17 +0000 (11:39 -0800)
committerGitHub <noreply@github.com>
Sat, 3 Jan 2026 19:39:17 +0000 (20:39 +0100)
admin ignore physics

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Content.Shared/Movement/Systems/SharedMoverController.cs
Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml

index b3607b846339bb03ecf13b67616d9f8aa5cf426a..bda05da0195159ca07bbad6887bfe0b91f74434b 100644 (file)
@@ -218,11 +218,13 @@ public abstract partial class SharedMoverController : VirtualController
          * Physics simulation, which will cause issues for Dynamic bodies (Such as Friction being applied twice).
          * Kinematic bodies have even less Physics options and as such aren't suitable for a player, especially
          * when we move to Box2D v3 where there will be more support for players updating outside of simulation.
+         * However, Kinematic bodies are useful currently for mobs which explicitly ignore physics, you should use
+         * this type extremely sparingly and only for mobs which *explicitly* disobey the laws of physics (A-Ghosts).
          * Lastly, static bodies can't move so they shouldn't be updated. If a static body makes it here we're
          * doing unnecessary calculations.
          * Only a Kinematic Controller should be making it to this point.
          */
-        DebugTools.Assert(physicsComponent.BodyType == BodyType.KinematicController,
+        DebugTools.Assert(physicsComponent.BodyType == BodyType.KinematicController || physicsComponent.BodyType == BodyType.Kinematic,
             $"Input mover: {ToPrettyString(uid)} in HandleMobMovement is not the correct BodyType, BodyType found: {physicsComponent.BodyType}, expected: KinematicController.");
 
         // If the body is in air but isn't weightless then it can't move
index 088c0f3ba195ca99aa3a9c5b3e54d96860f6f6ad..ccfa2cec738afe06131a8da5647fdffedae6fcec 100644 (file)
@@ -36,6 +36,7 @@
     needsHands: false
   - type: CombatMode
   - type: Physics
+    bodyType: Kinematic # Admin ghosts should ignore the laws of physics.
     ignorePaused: true
   - type: Access
     groups: