Skip to content

Commit

Permalink
fix mothercell spawning
Browse files Browse the repository at this point in the history
  • Loading branch information
Tombez committed Sep 15, 2021
1 parent 3da96c4 commit 75409a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "MultiOgarII",
"version": "1.6.4",
"version": "1.6.5",
"description": "Open source multi-protocol Ogar server",
"author": "Megabyte918 (https://github.com/Megabyte918)",
"homepage": "https://github.com/Megabyte918/MultiOgarII",
Expand Down
11 changes: 5 additions & 6 deletions src/gamemodes/Experimental.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ class Experimental extends FFA {
this.motherAmount = 10;
}
// Gamemode Specific Functions
spawnMotherCell(server) {
spawnMotherCells(server) {
var mother = new Entity.MotherCell(server, null, server.randomPos(), 149);
server.safeSpawn(mother);
let diff = this.motherAmount - this.nodesMother.length;
while (--diff >= 0) server.safeSpawn(mother);
}
spawnCells(server) {
for (var i = 0; i < this.motherAmount; i++) {
this.spawnMotherCell(server);
}
this.spawnMotherCells(server);
}
// Override
onServerInit(server) {
Expand All @@ -37,7 +36,7 @@ class Experimental extends FFA {
};
Entity.MotherCell.prototype.onRemove = function () {
self.nodesMother.removeUnsorted(this);
self.spawnMotherCell(server);
self.spawnMotherCells(server);
};
self.spawnCells(server);
}
Expand Down

0 comments on commit 75409a6

Please sign in to comment.