trying to fix dangerousness and added a cheat script #72

This commit is contained in:
logsol 2014-06-07 19:48:17 +02:00
parent 4bf4eb8b35
commit 355282ca08
3 changed files with 17 additions and 3 deletions

View file

@ -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;