actor update control by chunkAnchoring flag

This commit is contained in:
minjaesong
2024-09-07 19:01:03 +09:00
parent ab31986cf2
commit 11cdcbe2fc
5 changed files with 45 additions and 6 deletions

View File

@@ -320,7 +320,9 @@ open class ActorWithBody : Actor {
var isChronostasis = false
/**
* if set to TRUE, the ingame will not move the actor into the active list
* if set to TRUE, the ingame will not move the actor into the active list.
*
* This flag will override `chunkAnchoring` flag (in this case, the chunk will be anchored but the actor will be dormant)
*/
var forceDormant = false
@@ -410,12 +412,14 @@ open class ActorWithBody : Actor {
* ...
* n: (2n-1)x(2n-1)
*/
@Transient val chunkAnchorRange: Int = 0
@Transient open val chunkAnchorRange: Int = 0
/**
* Should nearby chunks be kept in the chunk pool even if the player is far away.
*
* `ActorWithBody.forceDormant` will IGNORE this flag.
*/
@Transient var chunkAnchoring = false
@Transient open var chunkAnchoring = false
init {
// some initialiser goes here...