From 46f14c22c68e46f4a679d56fbcbb5e7842965c53 Mon Sep 17 00:00:00 2001 From: Jeena Date: Thu, 2 Apr 2015 21:27:13 +0200 Subject: [PATCH] made fast objects bullets, fixes #126 --- app/Game/Config/ItemSettings.js | 2 +- app/Game/Core/GameObjects/Item.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Game/Config/ItemSettings.js b/app/Game/Config/ItemSettings.js index 5706819..92331ab 100644 --- a/app/Game/Config/ItemSettings.js +++ b/app/Game/Config/ItemSettings.js @@ -265,7 +265,7 @@ function () { "category": "kitchen", "image": "banana.gif", - "weight": "1", + "weight": "3", "width": "5", "height": "9", diff --git a/app/Game/Core/GameObjects/Item.js b/app/Game/Core/GameObjects/Item.js index d848fa3..b766a6f 100644 --- a/app/Game/Core/GameObjects/Item.js +++ b/app/Game/Core/GameObjects/Item.js @@ -37,6 +37,9 @@ function (Parent, Box2D, Options, Settings, Exception, Nc, Assert) { this.createFixture(); this.body.ResetMassData(); this.flipDirection = 1; + if (this.body.GetMass() < 1) { + this.body.SetBullet(true); + } Nc.trigger(Nc.ns.core.game.gameObject.add, "animated", this); }