Fixes soap and banana peels going through walls when thrown.
This commit is contained in:
@@ -123,6 +123,8 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
tile.HotspotExpose(700, 50, true);
|
||||
|
||||
var physics = Owner.GetComponent<IPhysBody>();
|
||||
|
||||
foreach (var uid in _collided.ToArray())
|
||||
{
|
||||
if (!uid.IsValid() || !Owner.EntityManager.EntityExists(uid))
|
||||
@@ -132,7 +134,6 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
}
|
||||
|
||||
var entity = Owner.EntityManager.GetEntity(uid);
|
||||
var physics = Owner.GetComponent<IPhysBody>();
|
||||
var otherPhysics = entity.GetComponent<IPhysBody>();
|
||||
|
||||
if (!physics.GetWorldAABB().Intersects(otherPhysics.GetWorldAABB()))
|
||||
|
||||
@@ -200,6 +200,8 @@ namespace Content.Shared.GameObjects.Components.Movement
|
||||
if (!Slippery)
|
||||
return;
|
||||
|
||||
var physics = Owner.GetComponent<IPhysBody>();
|
||||
|
||||
foreach (var uid in _colliding.ToArray())
|
||||
{
|
||||
if (!uid.IsValid() || !Owner.EntityManager.EntityExists(uid))
|
||||
@@ -211,7 +213,6 @@ namespace Content.Shared.GameObjects.Components.Movement
|
||||
}
|
||||
|
||||
var entity = Owner.EntityManager.GetEntity(uid);
|
||||
var physics = Owner.GetComponent<IPhysBody>();
|
||||
var otherPhysics = entity.GetComponent<IPhysBody>();
|
||||
|
||||
if (!physics.GetWorldAABB().Intersects(otherPhysics.GetWorldAABB()))
|
||||
|
||||
4
Resources/Changelog/Parts/soap.yml
Normal file
4
Resources/Changelog/Parts/soap.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
author: Zumorica
|
||||
changes:
|
||||
- type: Fix
|
||||
message: Fixes soap and banana peels going through walls when thrown.
|
||||
@@ -183,9 +183,14 @@
|
||||
- type: Slippery
|
||||
intersectPercentage: 0.2
|
||||
- type: Physics
|
||||
bodyType: KinematicController
|
||||
mass: 5
|
||||
fixtures:
|
||||
- shape:
|
||||
!type:PhysShapeAabb
|
||||
bounds: "-0.2,-0.2,0.2,0.2"
|
||||
bounds: "-0.3,-0.4,0.3,0.4"
|
||||
layer:
|
||||
- SmallImpassable
|
||||
mask:
|
||||
- Impassable
|
||||
- MobImpassable
|
||||
|
||||
@@ -104,10 +104,11 @@
|
||||
- type: Item
|
||||
sprite: Objects/Specific/Janitorial/soap.rsi
|
||||
- type: Slippery
|
||||
paralyzeTime: 2.5
|
||||
paralyzeTime: 2
|
||||
intersectPercentage: 0.2
|
||||
- type: Physics
|
||||
bodyType: Dynamic
|
||||
mass: 5
|
||||
bodyType: KinematicController
|
||||
mass: 2.5
|
||||
fixtures:
|
||||
- shape:
|
||||
!type:PhysShapeAabb
|
||||
@@ -115,9 +116,8 @@
|
||||
layer:
|
||||
- SmallImpassable
|
||||
mask:
|
||||
- SmallImpassable
|
||||
- Impassable
|
||||
- MobImpassable
|
||||
hard: false
|
||||
|
||||
- type: entity
|
||||
name: soap
|
||||
|
||||
Reference in New Issue
Block a user