LateStart¶
LateStart is a method that is only called on the first LateUpdate cycle of the entity. This is tracked using the setup field which is only set to true at the end of this method.
- Check the tag of the entity
- For
Follower,PFollower,Player,NPCandEnemy,movesmokeis initialised unless it is an item. Either way, theanim's cullingMode is set to CullCompletely which disabled animations when not visible - For
FollowerandPFollower, CreateDetector is called with a size of (0.0, 0.7, 0.3) and a center of (0.0, 0.5, 0.65). Collisions betweendetectand thefollowingentity are ignored before settingisfollowerto true. - For
Player,isplayeris set to true and CreateShield called if it is the battle entity version of the player which initializesbubbleshieldif it hasn't been already
- For
- If it's an item entity, set
overrideanimandoverrridejumpas well asoldstateto -1 (None) and callCreateFeetwhich will initialisefeetand set this entity as its parent - Set
originalmapto the current map - If there is an
npcdata- Set
npcdata'scurrentdialogueindexto NPCControl.GetDialogueIndex which is a very cut down version of GetDialogue that only supportsnpcdata.overridediagand will only return the first applicable dialogue line id or -1 if none applied - If the map entity is a PushRock with
internalcolliderpresent, ensurefeetis initialised and callCreateFeetif not while also ignoring all collisions betweenfeetand eachinternalcollider
- Set
- If by this point,
feethasn't been initialised and the entity is aFollower,PFollower,isplayer,NPC,Enemyor annpcdataof type PushRock or Item,CreateFeetis called - Set the
transform's position tostartposif it was assigned before or setstartposto thetransform's position if it wasn't - Set
startbf,startbsandtruescaletobobrange,bobspeedandstartscalerespectively - Call UpdateMoveSmoke
- Set
oldstateto -1 (None) - Set
setupto true which will prevent the game from calling this method again for this entity