Npc Avatar Details
An internal class holding the state of NPC's avatar, containing everything that is sent during the movement from low to high resolution.
Constructors
Properties
the current coordinate of the npc
whether the npc is inaccessible to all players, meaning it will not be added to high resolution for anyone, even though it is still within the zone. This is intended to be used with static npcs that respawn. After death, inaccessible should be set to true, and when the npc respawns, it should be set back to false. This allows us to not re-allocate avatars which furthermore requires cleanup and micromanaging.
the bitpacked flag of all the movement typed the npc has utilized this cycle
the direction of the second step that the npc has taken this cycle, or -2
the game cycle on which the npc was originally spawned into the world
Functions
Whether the npc is teleporting. This means the npc will render as jumping if the destination is 2 tiles away, and normal walk/run/in-between if the distance is 2 tiles or less.
Whether the npc is teleporting, but not explicitly jumping.
Updates the current direction of the npc, allowing the server to sync up the current faced coordinate of npcs during movement, face angle and such.