Physics Shapes (#306)
* Removed BoundingBoxComponent. * Updated prototypes to use refactored CollidableComponent. * Renamed ICollidable to IPhysBody. Moved ICollidable to the Shared/Physics namespace. * Migrated more yaml files to use PhysShapes. * Updated YAML to use the new list-of-bodies system. * Updated the new prototypes. * Update submodule * Update submodule again, whoops
This commit is contained in:
committed by
Pieter-Jan Briers
parent
5aafe89d95
commit
9353a060f2
@@ -39,9 +39,9 @@ namespace Content.Server.GameObjects.Components
|
||||
// after impacting the first object.
|
||||
// For realism this should actually be changed when the velocity of the object is less than a threshold.
|
||||
// This would allow ricochets off walls, and weird gravity effects from slowing the object.
|
||||
if (collidedwith.Count > 0 && Owner.TryGetComponent(out CollidableComponent body))
|
||||
if (collidedwith.Count > 0 && Owner.TryGetComponent(out CollidableComponent body) && body.PhysicsShapes.Count >= 1)
|
||||
{
|
||||
body.CollisionMask &= (int)~CollisionGroup.Mob;
|
||||
body.PhysicsShapes[0].CollisionMask &= (int)~CollisionGroup.Mob;
|
||||
body.IsScrapingFloor = true;
|
||||
|
||||
// KYS, your job is finished. Trigger ILand as well.
|
||||
|
||||
Reference in New Issue
Block a user