Ticket #1711: deep_forest2012-11-4.diff

File deep_forest2012-11-4.diff, 786 bytes (added by FeXoR, 12 years ago)

Patch in SVN .diff format

  • binaries/data/mods/public/maps/random/deep_forest.js

     
    222222    for (var z = 0;z < mapSize;z++)
    223223    {
    224224        // Some variables
    225         var radius = Math.pow(Math.pow(mapCenterX - x, 2) + Math.pow(mapCenterZ - z, 2), 1/2);
     225        var radius = Math.pow(Math.pow(mapCenterX - x - 0.5, 2) + Math.pow(mapCenterZ - z - 0.5, 2), 1/2); // The 0.5 is a correction for the entities placed on the center of tiles
    226226        var minDistToSL = mapSize;
    227227        for (var i=0; i < numPlayers; i++)
    228228            minDistToSL = min(minDistToSL, getDistance(playerStartLocX[i], playerStartLocZ[i], x, z))