From 350ec8f595f80a01c2f500d3f423715f05afc4fa Mon Sep 17 00:00:00 2001 From: Ashwath V A Date: Tue, 1 Mar 2022 21:58:31 +0530 Subject: [PATCH] fix #617 (ii): Added Health component to the created rubble --- .../destinationsol/rubble/systems/RubbleCreationSystem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/main/java/org/destinationsol/rubble/systems/RubbleCreationSystem.java b/engine/src/main/java/org/destinationsol/rubble/systems/RubbleCreationSystem.java index af3e8cc3a..b4fa242f0 100644 --- a/engine/src/main/java/org/destinationsol/rubble/systems/RubbleCreationSystem.java +++ b/engine/src/main/java/org/destinationsol/rubble/systems/RubbleCreationSystem.java @@ -145,7 +145,8 @@ private void buildRubblePieces(Position pos, Velocity vel, Angle angle, Size siz velocityComponent.velocity = velocity; EntityRef entityRef = entitySystemManager.getEntityManager().createEntity(graphicsComponent, positionComponent, - velocityComponent, angle, sizeComponent, new RubbleMesh()); + sizeComponent, angle, velocityComponent, new RubbleMesh(), health); + SolMath.free(velocity); entityRef.setComponent(new BodyLinked()); }