RefreshEntities¶
This method performs some reset on some entity fields. It belongs to MainManager.
public static void RefreshEntities(bool forceanim, bool refreshmap, bool onlyplayer)
Parameters:¶
forceanim
: Tells if ForceAnim will be called on each entity which will call Play on the entity'sanim
using its the current animstate (f
is appended if the entity'sheight
is aboe 0.1 and it has the same meaning than its normal argument)refreshmap
: Tells if the NPCControl specific logic will applyonlyplayer
: Tells if only theplayerdata
entities part will have their fields reset
There are 3 overloads: one where onlyplayer
is ommited and false is sent, one without parameter where all the parameters will have false sent and one where the only parameter is onlyplayer
and the other 2 will have false sent.
Procedure¶
- All
playerdata
entities have theirhitwall
set to false and their animid set to their corresponding BattleData.animid
. If forceanim is true, ForceAnim is called which will call Play on the entity'sanim
using its the current animstate (f
is appended if the entity'sheight
is aboe 0.1 and it has the same meaning than its normal argument). Finally, all player party members gets UpdateSpriteMat called on their entity which updates theirsprite
material according to theirhologram
- We return immediately if
onlyplayer
is true - All EntityControl have the following happen:
oldid
is set to -1oldstate
is set to -1emoticoncooldown
is set to 0.0hitwall
is set to false- If
height
is above 0.1,oldfly
is set toflyinganim
- If it's an item entity, UpdateItem is called
- If forceanim is true, ForceAnim is called which will call Play on the entity's
anim
using its the current animstate (f
is appended if the entity'sheight
is aboe 0.1 and it has the same meaning than its normal argument) - If refreshmap is true and the entity has an
npcdata
, further logic are done about the corresponding NPCControl for the following: - If refreshmap is true and the map exists, all TrailRenderer has Clear called on them which clears all the wind trails currently active