Skip to content

Commit

Permalink
scavfact.js: Remove useless conversions to world coordinates. Closes …
Browse files Browse the repository at this point in the history
…ticket:3356
  • Loading branch information
perim committed Mar 23, 2012
1 parent f20d737 commit d408c6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/mp/multiplay/script/scavfact.js
Expand Up @@ -85,7 +85,7 @@ function eventGameInit()
makeComponentAvailable("BabaFlame", me);
makeComponentAvailable("BaBaMG", me);
attackGroup = newGroup(); // allocate a new group
groupAddArea(attackGroup, 0, 0, (mapWidth * 128), (mapHeight * 128));
groupAddArea(attackGroup, 0, 0, mapWidth, mapHeight);
}

function eventStartLevel()
Expand Down Expand Up @@ -125,7 +125,7 @@ function eventAttacked(victim, attacker)
for (var i = 0; i < droidlist.length; i++)
{
var droid = droidlist[i];
if (distBetweenTwoPoints(victim.x, victim.y, attacker.x, attacker.y) < (24 * 128))
if (distBetweenTwoPoints(victim.x, victim.y, attacker.x, attacker.y) < 24)
{
orderDroidLoc(droid, DORDER_MOVE, attacker.x, attacker.y);
}
Expand Down

0 comments on commit d408c6a

Please sign in to comment.