mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Mounts v2 (#726)
* Mounts -v2 * fix stun state and make comments a bit nicer * remove extra serilization * update the char position a bit more correctly * make vehicles face thr player's direction * address feedback * fix compiling for real this time * removed uneeded check
This commit is contained in:
@@ -25,35 +25,63 @@ public:
|
||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
|
||||
|
||||
/**
|
||||
* Sets the entity that this entity is possessing
|
||||
* @param value the ID of the entity this ID should posess
|
||||
* @brief Mounts the entity
|
||||
*
|
||||
* @param mount Entity to be mounted
|
||||
*/
|
||||
void Mount(Entity* mount);
|
||||
|
||||
/**
|
||||
* @brief Dismounts the entity
|
||||
*
|
||||
* @param mount Entity to be dismounted
|
||||
* @param forceDismount Should we forcibly dismount the entity
|
||||
*/
|
||||
void Dismount(Entity* mount, bool forceDismount = false);
|
||||
|
||||
/**
|
||||
* Sets the ID that this entity is possessing
|
||||
* @param value The ID that this entity is possessing
|
||||
*/
|
||||
void SetPossessable(LWOOBJID value) { m_Possessable = value; m_DirtyPossesor = true; }
|
||||
|
||||
/**
|
||||
* Returns the entity that this entity is currently posessing
|
||||
* @return the entity that this entity is currently posessing
|
||||
* @return The entity that this entity is currently posessing
|
||||
*/
|
||||
LWOOBJID GetPossessable() const { return m_Possessable; }
|
||||
|
||||
/**
|
||||
* Sets if we are busy mounting or dismounting
|
||||
* @param value if we are busy mounting or dismounting
|
||||
* Sets if we are busy dismounting
|
||||
* @param value If we are busy dismounting
|
||||
*/
|
||||
void SetIsBusy(bool value) { m_IsBusy = value; }
|
||||
void SetIsDismounting(bool value) { m_IsDismounting = value; }
|
||||
|
||||
/**
|
||||
* Returns if we are busy mounting or dismounting
|
||||
* @return if we are busy mounting or dismounting
|
||||
* Returns if we are busy dismounting
|
||||
* @return If we are busy dismounting
|
||||
*/
|
||||
bool GetIsBusy() const { return m_IsBusy; }
|
||||
bool GetIsDismounting() const { return m_IsDismounting; }
|
||||
|
||||
/**
|
||||
* Sets the possesible type that's currently used, merely used by the shooting gallery if it's 0
|
||||
* @param value the possesible type to set
|
||||
* @param value The possesible type to set
|
||||
*/
|
||||
void SetPossessableType(ePossessionType value) { m_PossessableType = value; m_DirtyPossesor = true; }
|
||||
|
||||
|
||||
/**
|
||||
* Gets the object ID of the mount item that is being used
|
||||
* @return The object ID of the mount item that is being used
|
||||
*/
|
||||
LWOOBJID GetMountItemID() const { return m_MountItemID; }
|
||||
|
||||
/**
|
||||
* Sets the object ID of the mount item that is being used
|
||||
* @param m_MountItemID The object ID of the mount item that is being used
|
||||
*/
|
||||
void SetMountItemID(LWOOBJID mountItemID) { m_MountItemID = mountItemID; }
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
@@ -68,14 +96,19 @@ private:
|
||||
ePossessionType m_PossessableType = ePossessionType::NO_POSSESSION;
|
||||
|
||||
/**
|
||||
* @brief if the possessor is dirty
|
||||
* @brief If the possessor is dirty
|
||||
*
|
||||
*/
|
||||
bool m_DirtyPossesor = false;
|
||||
|
||||
/**
|
||||
* @brief if the possessor is busy mounting or dismounting
|
||||
* @brief If the possessor is busy dismounting
|
||||
*
|
||||
*/
|
||||
bool m_IsBusy = false;
|
||||
bool m_IsDismounting = false;
|
||||
|
||||
/**
|
||||
* Mount Item ID
|
||||
*/
|
||||
LWOOBJID m_MountItemID = LWOOBJID_EMPTY;
|
||||
};
|
||||
|
Reference in New Issue
Block a user