You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, limbo trigger the event and update the lastRespawnTick variable same time.
Means other areas will never respawn and makes this bundle unusable.
So I change the logic.
No count in millisecond anymore, it should be counted in ticks = Config.get(entityTickFrequency)
Since entityTickFrequency is hardcoded in main process, so I just use magic number 100 & 10 here.
updateTick: state => {
let serverStartTime = Math.trunc(Date.now() / 100);
return function (config) {
const respawnInterval = config.interval || 30;
const upTime = Math.trunc(Date.now() / 100 - serverStartTime);
if (upTime % (respawnInterval * 10) == 0) {
console.log(this.name + " is respawning" + "\n");
for (const [id, room] of this.rooms) {
room.emit('respawnTick', state);
}
}
};
},
First time using github and English is not my native language(JavaScript neither).
Hope this post will not offend anybody.
At last, thanks you guys making this awesome software, have a nice day!
The text was updated successfully, but these errors were encountered:
@galaxian85 thanks for your fix, I had the same issue, the area with lower respan interval resets counter for other areas then just the area with lowest respawn interval was respawned, with this fix every area respawn correctly.
Thanks.
I hope @shawncplus will consider your fix and approve its merge.
I have 3 areas (limbo, mapped and myarea) in my ranvier starter kit.
The manifest settings are:
And I noticed only limbo will trigger the event correctly.
I insert some code try to find out why.
And here is the console log.
As you can see, limbo trigger the event and update the lastRespawnTick variable same time.
Means other areas will never respawn and makes this bundle unusable.
So I change the logic.
No count in millisecond anymore, it should be counted in ticks = Config.get(entityTickFrequency)
Since entityTickFrequency is hardcoded in main process, so I just use magic number 100 & 10 here.
First time using github and English is not my native language(JavaScript neither).
Hope this post will not offend anybody.
At last, thanks you guys making this awesome software, have a nice day!
The text was updated successfully, but these errors were encountered: