forked from DevotedMC/Citadel
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Instead of a single global timer I want localized decay.
Keep a bitmap of the map with a resolution of 512x512 blocks to one pixel. Values in the bitmap are timestamps used for decay.
Players will update the timestamp for their own 512x512 region and all adjacent ones (3x3 field of 512x512 sections) whenever they login or cross a 512-border (make sure to exit moveevent listener early).
Use HashMap for in memory storage, assume most groups have no time stamps for most regions. Standard db table for persisting.
Also add a config value to use as fallback for when no timer is known to avoid all reinforcements initially being fully decayed when this is put on the live server.
Gjum and okx-code