Преглед изворни кода

tiny bracket cleanup

tags/v0.8.0
Shaun пре 4 година
родитељ
комит
4165cf140e
1 измењених фајлова са 8 додато и 7 уклоњено
  1. +8
    -7
      src/server/world/map.js

+ 8
- 7
src/server/world/map.js Прегледај датотеку

@@ -435,14 +435,15 @@ module.exports = {
if (!mapFile.properties.isRandom)
spawners.register(blueprint, blueprint.spawnCd || mapFile.properties.spawnCd);
else {
let room = this.rooms.find(function (r) {
return (!(
(blueprint.x < r.x) ||
(blueprint.y < r.y) ||
(blueprint.x >= r.x + r.width) ||
(blueprint.y >= r.y + r.height)
));
let room = this.rooms.find(r => {
return !(
blueprint.x < r.x ||
blueprint.y < r.y ||
blueprint.x >= r.x + r.width ||
blueprint.y >= r.y + r.height
);
});

room.objects.push(blueprint);
}
} else {


Loading…
Откажи
Сачувај