* Some stuff

* Fix NaN angular velocity

* Optimise a bit

* Give throwing a bit of a spin

* Reality can be whatever I want

* Biffing it

* Cleanup

* Update submodule

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2021-03-30 21:43:03 +11:00
committed by GitHub
parent 72292a98eb
commit d1e4bb0304
56 changed files with 286 additions and 246 deletions

View File

@@ -32,9 +32,8 @@ using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Collision.Shapes;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Physics.Dynamics.Shapes;
using Robust.UnitTesting;
namespace Content.IntegrationTests.Tests.Physics
{

View File

@@ -31,8 +31,8 @@ using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Collision.Shapes;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Physics.Dynamics.Shapes;
using Robust.Shared.Timing;
#nullable enable
@@ -275,8 +275,9 @@ namespace Content.Server.Commands.Physics
new Fixture(box, shape) {
CollisionLayer = (int) CollisionGroup.Impassable,
CollisionMask = (int) CollisionGroup.Impassable,
Hard = true});
box.Mass = 5.0f;
Hard = true,
Mass = 5.0f,
});
y += deltaY;
}

View File

@@ -12,6 +12,8 @@ namespace Content.Server.GameObjects.Components.Items
{
internal static class ThrowHelper
{
private const float ThrowAngularImpulse = 3.0f;
/// <summary>
/// Tries to throw the entity if it has a physics component, otherwise does nothing.
/// </summary>
@@ -41,6 +43,8 @@ namespace Content.Server.GameObjects.Components.Items
if (entity.HasComponent<ItemComponent>())
{
entity.EnsureComponent<ThrownItemComponent>().Thrower = user;
// Give it a l'il spin.
physicsComponent.ApplyAngularImpulse(ThrowAngularImpulse);
if (user != null)
EntitySystem.Get<InteractionSystem>().ThrownInteraction(user, entity);

View File

@@ -1,22 +1,16 @@
#nullable enable
using Content.Server.GameObjects.Components.Observer;
using System.Collections.Generic;
using System.Linq;
using Content.Server.GameObjects.Components.StationEvents;
using Content.Shared.Physics;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Collision;
using Robust.Shared.Physics.Dynamics.Shapes;
using Robust.Shared.Random;
using Robust.Server.GameObjects;
using Content.Shared.GameObjects.Components.Singularity;
using Robust.Shared.Physics.Collision.Shapes;
using Robust.Shared.Player;
using Robust.Shared.Players;
using Robust.Shared.Timing;
@@ -27,9 +21,6 @@ namespace Content.Server.GameObjects.Components.Singularity
[RegisterComponent]
public class ServerSingularityComponent : SharedSingularityComponent, IStartCollide
{
[Dependency] private readonly IRobustRandom _random = default!;
public int Energy
{
get => _energy;

View File

@@ -2,7 +2,6 @@
using System.Collections.Generic;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.Components.Mobs;
using Content.Server.GameObjects.Components.Movement;
using Content.Server.GameObjects.Components.Sound;
using Content.Shared.Audio;
@@ -10,9 +9,7 @@ using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.GameObjects.Components.Movement;
using Content.Shared.GameObjects.Components.Tag;
using Content.Shared.Maps;
using Content.Shared.Physics;
using Content.Shared.Physics.Controllers;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
@@ -20,7 +17,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Collision.Shapes;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
@@ -90,7 +87,6 @@ namespace Content.Server.Physics.Controllers
{
physics = gridEntity.AddComponent<PhysicsComponent>();
physics.BodyStatus = BodyStatus.InAir;
physics.Mass = 1;
physics.CanCollide = true;
physics.AddFixture(new Fixture(physics, new PhysShapeGrid(grid)));
}

View File

@@ -48,43 +48,80 @@ namespace Content.Shared.Physics.Controllers
foreach (var body in map.AwakeBodies)
{
if (prediction && !body.Predict) continue;
var speed = body.LinearVelocity.Length;
if (speed <= 0.0f || body.BodyStatus == BodyStatus.InAir) continue;
// This is the *actual* amount that speed will drop by, we just do some multiplication around it to be easier.
var drop = 0.0f;
float control;
// Only apply friction when it's not a mob (or the mob doesn't have control).
if (SharedMoverController.UseMobMovement(_broadPhaseSystem, body, _physicsManager)) continue;
// Only apply friction when it's not a mob (or the mob doesn't have control)
if (prediction && !body.Predict ||
body.BodyStatus == BodyStatus.InAir ||
SharedMoverController.UseMobMovement(_broadPhaseSystem, body, _physicsManager)) continue;
var surfaceFriction = GetTileFriction(body);
var bodyModifier = body.Owner.GetComponentOrNull<SharedTileFrictionModifier>()?.Modifier ?? 1.0f;
var friction = _frictionModifier * surfaceFriction * bodyModifier;
if (friction > 0.0f)
{
// TBH I can't really tell if this makes a difference.
if (!prediction)
{
control = speed < _stopSpeed ? _stopSpeed : speed;
}
else
{
control = speed;
}
ReduceLinearVelocity(prediction, body, friction, frameTime);
ReduceAngularVelocity(prediction, body, friction, frameTime);
}
}
drop += control * friction * frameTime;
private void ReduceLinearVelocity(bool prediction, PhysicsComponent body, float friction, float frameTime)
{
var speed = body.LinearVelocity.Length;
if (speed <= 0.0f) return;
// This is the *actual* amount that speed will drop by, we just do some multiplication around it to be easier.
var drop = 0.0f;
float control;
if (friction > 0.0f)
{
// TBH I can't really tell if this makes a difference.
if (!prediction)
{
control = speed < _stopSpeed ? _stopSpeed : speed;
}
else
{
control = speed;
}
var newSpeed = MathF.Max(0.0f, speed - drop);
newSpeed /= speed;
body.LinearVelocity *= newSpeed;
drop += control * friction * frameTime;
}
var newSpeed = MathF.Max(0.0f, speed - drop);
newSpeed /= speed;
body.LinearVelocity *= newSpeed;
}
private void ReduceAngularVelocity(bool prediction, PhysicsComponent body, float friction, float frameTime)
{
var speed = MathF.Abs(body.AngularVelocity);
if (speed <= 0.0f) return;
// This is the *actual* amount that speed will drop by, we just do some multiplication around it to be easier.
var drop = 0.0f;
float control;
if (friction > 0.0f)
{
// TBH I can't really tell if this makes a difference.
if (!prediction)
{
control = speed < _stopSpeed ? _stopSpeed : speed;
}
else
{
control = speed;
}
drop += control * friction * frameTime;
}
var newSpeed = MathF.Max(0.0f, speed - drop);
newSpeed /= speed;
body.AngularVelocity *= newSpeed;
}
[Pure]

View File

@@ -24,11 +24,11 @@
- state: panel_open
map: ["enum.WiresVisualLayers.MaintenancePanel"]
- type: Physics
mass: 100
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close
mass: 100
mask:
- MobImpassable
layer:
@@ -91,11 +91,11 @@
sprite: Constructible/Structures/Doors/Standard/basic.rsi
state: "assembly"
- type: Physics
mass: 100
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.49,-0.49,0.49,0.49"
mass: 100
mask:
- MobImpassable
layer:

View File

@@ -110,7 +110,7 @@
fixtures:
- shape:
!type:PhysShapeRect
bounds: "0.49,-0.49,-0.49,-0.2" # don't want this colliding with walls or they won't close
bounds: "0.49,-0.49,-0.49,-0.2" # don't want this colliding with walls or they won't close
mask:
- MobImpassable
layer:

View File

@@ -23,11 +23,11 @@
acts: ["Destruction"]
- type: Physics
bodyType: Dynamic
mass: 50
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.49,-0.49,0.49,0.49"
mass: 50
layer:
- SmallImpassable
mask:

View File

@@ -9,12 +9,12 @@
- type: PlaceableSurface
placeCentered: true
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.45, -0.45, 0.05, 0.45"
mass: 25
mask:
- SmallImpassable
- type: Sprite

View File

@@ -5,12 +5,12 @@
components:
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5, -0.2, 0.5, 0.2"
mass: 25
mask:
- MobImpassable
layer:
@@ -55,12 +55,12 @@
- type: Sprite
state: plant-25
- type: Physics
mass: 25
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.47,-0.25,0.05,0.25"
mass: 25
layer:
- SmallImpassable
mask:

View File

@@ -12,12 +12,12 @@
sprite: Constructible/Misc/furniture.rsi
state: rack
- type: Physics
mass: 50
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.3,-0.3,0.3,0.3"
mass: 50
layer:
- MobImpassable
mask:

View File

@@ -9,19 +9,19 @@
- type: Sprite
- type: Damageable
- type: Physics
mass: 25
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
mask:
- MobImpassable
layer:
- Opaque
- MobImpassable
- SmallImpassable
- VaultImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
mass: 25
mask:
- MobImpassable
layer:
- Opaque
- MobImpassable
- SmallImpassable
- VaultImpassable
- type: Destructible
thresholds:
- trigger:

View File

@@ -5,12 +5,12 @@
description: "A computer under construction. It needs a circuit board."
components:
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
mass: 25
mask:
- MobImpassable
layer:

View File

@@ -8,12 +8,12 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.4,0.4,0.4"
mass: 25
mask:
- Impassable
- VaultImpassable

View File

@@ -7,21 +7,21 @@
mode: SnapgridCenter
components:
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
layer:
- Impassable
- MobImpassable
- VaultImpassable
- Opaque
mask:
- Impassable
- MobImpassable
- VaultImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
mass: 25
layer:
- Impassable
- MobImpassable
- VaultImpassable
- Opaque
mask:
- Impassable
- MobImpassable
- VaultImpassable
- type: Clickable
- type: InteractionOutline
- type: Anchorable
@@ -54,21 +54,21 @@
mode: SnapgridCenter
components:
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
layer:
- Impassable
- MobImpassable
- VaultImpassable
- Opaque
mask:
- Impassable
- MobImpassable
- VaultImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
mass: 25
layer:
- Impassable
- MobImpassable
- VaultImpassable
- Opaque
mask:
- Impassable
- MobImpassable
- VaultImpassable
- type: Clickable
- type: InteractionOutline
- type: Anchorable

View File

@@ -9,12 +9,12 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5, -0.4, 0.3, 0.4"
mass: 25
mask:
- Impassable
- MobImpassable
@@ -54,11 +54,11 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 25
mask:
- Impassable
- MobImpassable
@@ -113,11 +113,11 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 25
mask:
- Impassable
- MobImpassable
@@ -228,11 +228,11 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 100
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 100
mask:
- Impassable
- MobImpassable
@@ -285,11 +285,11 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 75
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 75
mask:
- VaultImpassable
layer:
@@ -323,11 +323,11 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 100
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 100
mask:
- Impassable
- MobImpassable

View File

@@ -11,17 +11,17 @@
sprite: Constructible/Hydroponics/machines.rsi
state: seedextractor
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.25,0.4,0.25"
layer:
- Opaque
- Impassable
- MobImpassable
- VaultImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.25,0.4,0.25"
mass: 25
layer:
- Opaque
- Impassable
- MobImpassable
- VaultImpassable
- type: SnapGrid
offset: Center
- type: Anchorable

View File

@@ -7,12 +7,12 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.3,-0.4,0.3,0.4"
mass: 25
mask:
- Impassable
- MobImpassable

View File

@@ -11,11 +11,11 @@
sprite: Constructible/Power/ame_controller.rsi
state: control
- type: Physics
mass: 25
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.45, -0.45, 0.45, 0.45"
mass: 25
layer:
- Opaque
- Impassable

View File

@@ -8,12 +8,12 @@
- type: Anchorable
snap: true
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.49,-0.49,0.49,0.49"
mass: 25
mask:
- Opaque
- Impassable

View File

@@ -9,11 +9,11 @@
- type: InteractionOutline
- type: Physics
bodyType: Static
mass: 25
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5, -0.5, 0.5, 0.5"
mass: 25
layer:
- Impassable
- MobImpassable

View File

@@ -9,11 +9,11 @@
- type: Clickable
- type: Physics
bodyType: Static
mass: 25
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5, -0.5, 0.5, 0.5"
mass: 25
layer:
- Impassable
- MobImpassable

View File

@@ -6,12 +6,12 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 100
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25, -0.25, 0.25, 0.25"
mass: 100
layer:
- Impassable
- MobImpassable

View File

@@ -13,11 +13,11 @@
- type: Clickable
- type: Physics
bodyType: Static
mass: 25
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5, -0.5, 0.5, 0.5"
mass: 25
layer:
- Opaque
mask:

View File

@@ -10,10 +10,11 @@
- shape:
!type:PhysShapeCircle
radius: 0.5
layer: [Impassable]
mass: 5
layer:
- Impassable
mask:
- AllMask
mass: 5
- type: Singularity
- type: RadiationPulse
range: 15

View File

@@ -16,17 +16,17 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
layer:
- Opaque
- Impassable
- MobImpassable
- VaultImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
mass: 25
layer:
- Opaque
- Impassable
- MobImpassable
- VaultImpassable
- type: SnapGrid
offset: Center
- type: CloningPod

View File

@@ -18,11 +18,11 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 25
layer:
- Impassable
- VaultImpassable

View File

@@ -9,11 +9,11 @@
state: server
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 25
mask:
- SmallImpassable
layer:
@@ -40,11 +40,11 @@
map: ["enum.PowerDeviceVisualLayers.Powered"]
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 25
mask:
- SmallImpassable
layer:

View File

@@ -6,12 +6,12 @@
components:
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.45, -0.45, 0.00, 0.45"
mass: 25
layer:
- Passable
- type: Sprite

View File

@@ -22,11 +22,11 @@
snap: true
- type: Physics
bodyType: Static
mass: 25
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.25,0.4,0.25"
mass: 25
mask:
- SmallImpassable
layer:
@@ -69,12 +69,12 @@
state: mixer_broken
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.25,0.4,0.25"
mass: 25
mask:
- SmallImpassable
layer:

View File

@@ -7,12 +7,12 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5, -0.5, 0.1, 0.5"
mass: 25
hard: false
mask:
- Impassable
@@ -58,10 +58,10 @@
description: An interstellar-grade space farmplot allowing for rapid growth and selective breeding of crops. Just... keep in mind the space weeds.
components:
- type: Physics
mass: 25
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 25
hard: true
mask:
- Impassable

View File

@@ -14,11 +14,11 @@
- type: InteractionOutline
- type: Physics
bodyType: Static
mass: 1
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mass: 1
layer:
- Clickable
- type: TraitorDeathMatchRedemption

View File

@@ -19,11 +19,11 @@
soundHit: /Audio/Effects/bang.ogg
- type: InteractionOutline
- type: Physics
mass: 25
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.48,-0.25,0.48,0.25"
mass: 70
mask:
- Impassable
- VaultImpassable

View File

@@ -17,11 +17,11 @@
map: ["enum.StorageVisualLayers.Welded"]
- type: InteractionOutline
- type: Physics
mass: 25
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.4, -0.4, 0.29, 0.4"
mass: 25
mask:
- Impassable
- VaultImpassable

View File

@@ -7,11 +7,11 @@
components:
- type: InteractionOutline
- type: Physics
mass: 100
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.4,0.4,0.4"
mass: 100
mask:
- Impassable
- MobImpassable

View File

@@ -6,10 +6,10 @@
components:
- type: Physics
bodyType: Static
mass: 50
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 50
layer:
- SmallImpassable
mask:

View File

@@ -9,10 +9,10 @@
- type: Clickable
- type: Physics
bodyType: Static
mass: 50
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 50
layer:
- SmallImpassable
mask:
@@ -33,10 +33,10 @@
- type: Clickable
- type: Physics
bodyType: Dynamic
mass: 50
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 50
layer:
- SmallImpassable
mask:

View File

@@ -15,11 +15,11 @@
sprite: Mobs/Animals/monkey.rsi
- type: Physics
bodyType: Dynamic
mass: 50
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.30,-0.25,0.40,0.25"
mass: 50
mask:
- Impassable
- VaultImpassable
@@ -49,11 +49,11 @@
sprite: Mobs/Animals/gorilla.rsi
- type: Physics
bodyType: Dynamic
mass: 90
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.90,-0.50,0.05,0.50"
mass: 90
mask:
- Impassable
- VaultImpassable
@@ -80,11 +80,11 @@
sprite: Mobs/Animals/chicken.rsi
- type: Physics
bodyType: Dynamic
mass: 20
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.20,0.10,0.20"
mass: 20
mask:
- Impassable
- VaultImpassable
@@ -114,11 +114,11 @@
sprite: Mobs/Animals/butterfly.rsi
- type: Physics
bodyType: Dynamic
mass: 5
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.20,-0.20,0.20,0.20"
mass: 5
mask:
- Impassable
- VaultImpassable
@@ -158,11 +158,11 @@
sprite: Mobs/Animals/bat.rsi
- type: Physics
bodyType: Dynamic
mass: 5
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.20,-0.20,0.20,0.20"
mass: 5
mask:
- Impassable
- VaultImpassable
@@ -193,11 +193,11 @@
sprite: Mobs/Animals/bee.rsi
- type: Physics
bodyType: Dynamic
mass: 5
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.10,-0.10,0.10,0.10"
mass: 5
mask:
- Impassable
- VaultImpassable
@@ -224,11 +224,11 @@
sprite: Mobs/Animals/goat.rsi
- type: Physics
bodyType: Dynamic
mass: 20
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.60,-0.50,0.05,0.50"
mass: 20
mask:
- Impassable
- VaultImpassable
@@ -256,11 +256,11 @@
sprite: Mobs/Animals/goose.rsi
- type: Physics
bodyType: Dynamic
mass: 20
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.35,0.45,0.35"
mass: 20
mask:
- Impassable
- VaultImpassable
@@ -291,11 +291,11 @@
sprite: Mobs/Animals/parrot.rsi
- type: Physics
bodyType: Dynamic
mass: 20
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.30,-0.35,0.35,0.35"
mass: 20
mask:
- Impassable
- VaultImpassable
@@ -322,11 +322,11 @@
sprite: Mobs/Animals/snake.rsi
- type: Physics
bodyType: Dynamic
mass: 10
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.30,-0.30,0.25,0.30"
mass: 10
mask:
- Impassable
- VaultImpassable
@@ -356,11 +356,11 @@
sprite: Mobs/Animals/spider.rsi
- type: Physics
bodyType: Dynamic
mass: 10
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.30,-0.40,0.45,0.40"
mass: 10
mask:
- Impassable
- VaultImpassable
@@ -387,11 +387,11 @@
sprite: Mobs/Animals/crab.rsi
- type: Physics
bodyType: Dynamic
mass: 10
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.40,-0.35,0.20,0.35"
mass: 10
mask:
- Impassable
- VaultImpassable
@@ -418,11 +418,11 @@
sprite: Mobs/Animals/penguin.rsi
- type: Physics
bodyType: Dynamic
mass: 10
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.50,-0.30,0.35,0.30"
mass: 10
mask:
- Impassable
- VaultImpassable
@@ -463,11 +463,11 @@
- Helmet
- type: Physics
bodyType: KinematicController
mass: 10
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.50,-0.30,0.35,0.30"
mass: 10
mask:
- Impassable
- VaultImpassable

View File

@@ -19,15 +19,14 @@
sprite: Mobs/Aliens/Carps/space.rsi
- type: Physics
bodyType: Dynamic
mass: 50
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.35,-0.35,0.35,0.35"
mass: 50
mask:
- Impassable
- MobImpassable
- VaultImpassable
- SmallImpassable
layer:
- Opaque
@@ -55,8 +54,6 @@
- map: ["enum.DamageStateVisualLayers.Base"]
state: alive
sprite: Mobs/Aliens/Carps/magic.rsi
- type: Physics
mass: 60
- type: entity
name: holocarp
@@ -71,4 +68,15 @@
state: alive
sprite: Mobs/Aliens/Carps/holo.rsi
- type: Physics
mass: 5
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.35,-0.35,0.35,0.35"
mass: 5
mask:
- Impassable
- MobImpassable
- SmallImpassable
layer:
- Opaque

View File

@@ -23,11 +23,11 @@
state: normal
- type: Physics
bodyType: Dynamic
mass: 85
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.35,-0.35,0.35,0.35"
mass: 100
mask:
- Impassable
- MobImpassable

View File

@@ -14,11 +14,11 @@
- map: ["enum.DamageStateVisualLayers.Base"]
state: corgi
- type: Physics
mass: 10
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.50,-0.25,0.30,0.25"
mass: 10
mask:
- Impassable
- VaultImpassable
@@ -62,11 +62,11 @@
- map: ["enum.DamageStateVisualLayers.Base"]
state: cat
- type: Physics
mass: 10
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.20,0.30,0.20"
mass: 10
mask:
- Impassable
- VaultImpassable
@@ -131,11 +131,11 @@
- map: ["enum.DamageStateVisualLayers.Base"]
state: sloth
- type: Physics
mass: 10
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.35,0.15,0.35"
mass: 10
mask:
- Impassable
- VaultImpassable

View File

@@ -45,10 +45,10 @@
- type: InteractionOutline
- type: Physics
bodyType: Dynamic
mass: 50
fixtures:
- shape:
!type:PhysShapeAabb {}
mass: 50
mask:
- Impassable
# - MobImpassable Turns these off for now since humans don't have collisions either.

View File

@@ -21,11 +21,11 @@
sprite: Mobs/Aliens/Xenos/xeno.rsi
- type: Physics
bodyType: Dynamic
mass: 85
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-1,-0.4,-0.2,0.4"
mass: 85
mask:
- Impassable
- MobImpassable

View File

@@ -8,12 +8,12 @@
- type: PlayerInputMover
- type: Physics
bodyType: Kinematic
mass: 5
# TODO: Even need these? Don't think so but CBF checking right now.
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.35,-0.35,0.35,0.35"
mask:
- GhostImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.35,-0.35,0.35,0.35"
mass: 5
mask:
- GhostImpassable
status: InAir

View File

@@ -10,11 +10,11 @@
- type: InteractionOutline
- type: Physics
bodyType: KinematicController
mass: 5
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.35,-0.35,0.35,0.35"
mass: 5
mask:
- GhostImpassable
status: InAir

View File

@@ -135,11 +135,11 @@
- map: [ "enum.Slots.HEAD" ]
- type: Physics
bodyType: KinematicController
mass: 70
fixtures: # TODO: This needs a second fixture just for mob collisions.
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 70
restitution: 0.0
mask:
- Impassable
@@ -319,11 +319,12 @@
- map: ["hand-right"]
- type: Physics
bodyType: Dynamic
mass: 85
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.35,-0.35,0.35,0.35"
mass: 70
restitution: 0.0
mask:
- Impassable
- MobImpassable

View File

@@ -115,17 +115,17 @@
- map: [ "enum.Slots.HEAD" ]
- type: Physics
bodyType: Dynamic
mass: 85
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.35,-0.35,0.35,0.35"
mask:
- Impassable
- MobImpassable
- VaultImpassable
layer:
- Opaque
- shape:
!type:PhysShapeAabb
bounds: "-0.35,-0.35,0.35,0.35"
mass: 85
mask:
- Impassable
- MobImpassable
- VaultImpassable
layer:
- Opaque
- type: PlayerInputMover
- type: AtmosExposed
- type: Flammable

View File

@@ -186,13 +186,13 @@
enabled: false
- type: Physics
bodyType: KinematicController
mass: 5
fixtures: # TODO: Make a second fixture. One should be for slipping, and the other for collisions.
- shape:
!type:PhysShapeAabb
bounds: "-0.2,-0.2,0.2,0.2"
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.2,-0.2,0.2,0.2"
mass: 5
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable

View File

@@ -89,17 +89,17 @@
enabled: false
- type: Physics
bodyType: KinematicController
mass: 2.5
fixtures: # TODO: Make a second fixture.
- shape:
!type:PhysShapeAabb
bounds: "-0.3,-0.4,0.3,0.4"
hard: false
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.3,-0.4,0.3,0.4"
mass: 2.5
hard: false
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable
- type: entity
name: Mime PDA

View File

@@ -322,11 +322,11 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 5
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mass: 5
mask: [Impassable]
layer: [Clickable]
@@ -351,11 +351,11 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 5
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mass: 5
mask: [Impassable]
layer: [Clickable]
@@ -379,10 +379,10 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 5
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mass: 5
mask: [Impassable]
layer: [Clickable]

View File

@@ -19,12 +19,12 @@
- type: InteractionOutline
- type: MovedByPressure
- type: Physics
mass: 5
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.5,0.1,0.5"
mass: 5
layer:
- Clickable
- type: BodyBagEntityStorage
@@ -73,12 +73,12 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5, -0.5, 0.5, 0.5"
mass: 25
mask:
- Impassable
- MobImpassable
@@ -119,12 +119,12 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 15
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5, -0.5, 0.5, 0.5"
mass: 15
layer:
- Clickable
- type: MorgueTray
@@ -148,12 +148,12 @@
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5, -0.5, 0.5, 0.5"
mass: 25
mask:
- Impassable
- MobImpassable

View File

@@ -39,12 +39,12 @@
Quantity: 500
- type: Physics
mass: 5
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.40,-0.25,0.25,0.25"
mass: 5
mask:
- Impassable
- Opaque
@@ -70,12 +70,12 @@
- type: SolutionContainer
maxVol: 500
- type: Physics
mass: 5
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mass: 5
mask:
- Impassable
- type: Spillable
@@ -110,16 +110,16 @@
enabled: false
- type: Physics
bodyType: KinematicController
mass: 2.5
fixtures: # TODO: Make a second fixture. One should be for slipping, and the other for collisions.
- shape:
!type:PhysShapeAabb
bounds: "-0.3,-0.4,0.3,0.4"
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.3,-0.4,0.3,0.4"
mass: 2.5
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable
- type: entity
name: soap

View File

@@ -27,17 +27,17 @@
enabled: false
- type: Physics
bodyType: KinematicController
mass: 2.5
fixtures: # TODO: Make a second fixture.
- shape:
!type:PhysShapeAabb
bounds: "-0.3,-0.4,0.3,0.4"
hard: false
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.3,-0.4,0.3,0.4"
mass: 2.5
hard: false
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable
- type: entity
parent: PlushieCarp
@@ -66,14 +66,14 @@
enabled: false
- type: Physics
bodyType: KinematicController
mass: 2.5
fixtures: # TODO: Make a second fixture.
- shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.4,0.4,0.4"
hard: false
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.4,0.4,0.4"
mass: 2.5
hard: false
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable

View File

@@ -14,11 +14,12 @@
modifier: 0.5
- type: Physics
bodyType: Dynamic
mass: 5
fixedRotation: false
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mass: 5
layer:
- Clickable
mask:
@@ -28,4 +29,5 @@
friction: 0.2
- type: Sprite
drawdepth: Items
noRot: false
- type: Pullable