From 355282ca08893efbaa904c30560cf55ff553244b Mon Sep 17 00:00:00 2001 From: logsol Date: Sat, 7 Jun 2014 19:48:17 +0200 Subject: [PATCH] trying to fix dangerousness and added a cheat script #72 --- app/Game/Channel/GameObjects/Doll.js | 5 +++-- app/Game/Channel/Player.js | 2 +- snippets/cheats/flyOnE.js | 13 +++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 snippets/cheats/flyOnE.js diff --git a/app/Game/Channel/GameObjects/Doll.js b/app/Game/Channel/GameObjects/Doll.js index 4387f22..ed5022b 100755 --- a/app/Game/Channel/GameObjects/Doll.js +++ b/app/Game/Channel/GameObjects/Doll.js @@ -55,8 +55,9 @@ function (Parent, Item, Box2D, Nc) { if(item.lastMoved && item.lastMoved.player != this.player) { var damageVector = b2Math.SubtractVV(itemVelocity, ownVelocity); damageVector.Abs(); - damageVector.Multiply(itemMass); - var damage = damageVector.Length() * 2; + damageVector.Multiply(0.7); + damageVector.Multiply(itemMass * 1.3); + var damage = damageVector.Length(); damage *= item.options.danger ? item.options.danger : 1; var player = item.lastMoved.player; diff --git a/app/Game/Channel/Player.js b/app/Game/Channel/Player.js index 6fbe770..00f806a 100755 --- a/app/Game/Channel/Player.js +++ b/app/Game/Channel/Player.js @@ -66,7 +66,7 @@ function (Parent, Nc) { if(this.stats.health < 0) this.stats.health = 0; if(this.stats.health <= 0) { - /*if(enemy != this) self killing scores for testing! */ enemy.score(); + if(enemy != this) enemy.score(); this.kill(enemy); } else { this.broadcastStats(); diff --git a/snippets/cheats/flyOnE.js b/snippets/cheats/flyOnE.js new file mode 100644 index 0000000..0964939 --- /dev/null +++ b/snippets/cheats/flyOnE.js @@ -0,0 +1,13 @@ + +var kd = window.onkeydown; +window.onkeydown = function (e) { + if(e.keyCode != 69) { + kd(e); + return; + } + var body = inspector.networker.gameController.me.doll.body + body.SetPosition({ + x: body.GetPosition().x + 1, + y: body.GetPosition().y + }) +} \ No newline at end of file