diff options
author | pacien | 2018-02-04 17:29:25 +0100 |
---|---|---|
committer | pacien | 2018-02-04 17:29:25 +0100 |
commit | 8c81e97b69b582a17ba80bac694004591a4d1939 (patch) | |
tree | 933ee7f6a2863f40e261369f17354b8a36a8f76f | |
parent | 466faf36b54019cb345c7d0193e6cc318ea39da6 (diff) | |
download | wallj-8c81e97b69b582a17ba80bac694004591a4d1939.tar.gz |
Fix blast impulse
Signed-off-by: pacien <pacien.trangirard@pacien.net>
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/block/GarbageBlock.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/block/GarbageBlock.java b/src/main/java/fr/umlv/java/wallj/block/GarbageBlock.java index 362e680..080a739 100644 --- a/src/main/java/fr/umlv/java/wallj/block/GarbageBlock.java +++ b/src/main/java/fr/umlv/java/wallj/block/GarbageBlock.java | |||
@@ -39,7 +39,7 @@ public class GarbageBlock extends JBoxBlock { | |||
39 | Events.filter(context.getEvents(), BombExplosionEvent.class).forEach(explosion -> { | 39 | Events.filter(context.getEvents(), BombExplosionEvent.class).forEach(explosion -> { |
40 | Vec2 source = explosion.getSource().toVec2(); | 40 | Vec2 source = explosion.getSource().toVec2(); |
41 | context.getGame().getCurrentStage().getWorld().raycast((fixture, point, normal, fraction) -> { | 41 | context.getGame().getCurrentStage().getWorld().raycast((fixture, point, normal, fraction) -> { |
42 | if (isSelf(fixture)) getBody().applyForceToCenter(computeBlastForce(source)); | 42 | if (isSelf(fixture)) getBody().applyLinearImpulse(computeBlastForce(source), getBody().getWorldCenter()); |
43 | return STOP_RAYCAST; | 43 | return STOP_RAYCAST; |
44 | }, source, getPos()); | 44 | }, source, getPos()); |
45 | }); | 45 | }); |