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'sanimusing its the current animstate (fis appended if the entity'sheightis 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 theplayerdataentities 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
playerdataentities have theirhitwallset 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'sanimusing its the current animstate (fis appended if the entity'sheightis 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 theirspritematerial according to theirhologram - We return immediately if
onlyplayeris true - All EntityControl have the following happen:
oldidis set to -1oldstateis set to -1emoticoncooldownis set to 0.0hitwallis set to false- If
heightis above 0.1,oldflyis 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
animusing its the current animstate (fis appended if the entity'sheightis 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