TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ Dismount()

void Terraria.Mount.Dismount ( Player mountedPlayer)
inline

Definition at line 6357 of file Mount.cs.

6358 {
6359 //IL_0073: Unknown result type (might be due to invalid IL or missing references)
6360 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
6361 //IL_005d: Unknown result type (might be due to invalid IL or missing references)
6362 //IL_0062: Unknown result type (might be due to invalid IL or missing references)
6363 if (_active)
6364 {
6365 bool cart = Cart;
6366 _active = false;
6367 mountedPlayer.ClearBuff(_data.buff);
6368 bool skipDust = false;
6370 _mountSpecificData = null;
6371 _ = _type;
6372 if (cart)
6373 {
6374 mountedPlayer.ClearBuff(_data.extraBuff);
6375 mountedPlayer.cartFlip = false;
6376 mountedPlayer.lastBoost = Vector2.Zero;
6377 }
6378 mountedPlayer.fullRotation = 0f;
6379 mountedPlayer.fullRotationOrigin = Vector2.Zero;
6380 if (!skipDust)
6381 {
6383 }
6384 Reset();
6385 mountedPlayer.position.Y += mountedPlayer.height;
6386 mountedPlayer.height = 42;
6387 mountedPlayer.position.Y -= mountedPlayer.height;
6388 if (mountedPlayer.whoAmI == Main.myPlayer)
6389 {
6390 NetMessage.SendData(13, -1, -1, null, mountedPlayer.whoAmI);
6391 }
6392 }
6393 }
static void Dismount(Mount mount, Player player, ref bool skipDust)
Allows you to make things happen when this mount is de-spawned. Useful for player-specific cleanup,...
This serves as the central place from which mounts are stored and mount-related functions are carried...
bool _active
Definition Mount.cs:334
MountData _data
Definition Mount.cs:290
void DoSpawnDust(Player mountedPlayer, bool isDismounting)
Definition Mount.cs:6493
object _mountSpecificData
Definition Mount.cs:332
void Reset()
Definition Mount.cs:561

References Terraria.Mount._active, Terraria.Mount._data, Terraria.Mount._mountSpecificData, Terraria.Mount._type, Terraria.Mount.MountData.buff, Terraria.Mount.Cart, Terraria.ModLoader.MountLoader.Dismount(), Terraria.Mount.DoSpawnDust(), Terraria.Mount.MountData.extraBuff, Terraria.Main.myPlayer, Terraria.Mount.Reset(), and Terraria.NetMessage.SendData().

Referenced by Terraria.Mount.CheckMountBuff(), Terraria.Player.GrappleMovement(), Terraria.Player.Hurt(), Terraria.Player.ItemCheck_HandleMount(), Terraria.Player.KillMe(), Terraria.Player.PetAnimal(), Terraria.Player.QuickGrapple(), Terraria.Player.QuickMount(), Terraria.GameContent.PlayerSittingHelper.SitDown(), Terraria.GameContent.PlayerSleepingHelper.StartSleeping(), Terraria.Player.TileInteractionsUse(), and Terraria.Player.Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: