mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 14:53:24 +02:00
stop makeHouses.js gracefully
remove exit cleanup
This commit is contained in:
parent
eb46a4b647
commit
72f1f5ba62
1 changed files with 2 additions and 11 deletions
|
@ -152,20 +152,11 @@
|
|||
|
||||
// max 20 per second
|
||||
Script.setTimeout(addHouses, 50);
|
||||
} else {
|
||||
Script.stop();
|
||||
}
|
||||
};
|
||||
|
||||
addHouses();
|
||||
|
||||
function cleanup() {
|
||||
while (houses.length > 0) {
|
||||
if (!houses[0].isKnownID) {
|
||||
houses[0] = Entities.identifyEntity(houses[0]);
|
||||
}
|
||||
Entities.deleteEntity(houses.shift());
|
||||
Script.setTimeout(addHouses, 50);
|
||||
}
|
||||
}
|
||||
|
||||
Script.scriptEnding.connect(cleanup);
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue