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:
Aaron Kimbrell
2022-09-02 13:49:19 -05:00
committed by GitHub
parent 1af3e59348
commit 26f2eb409f
22 changed files with 480 additions and 245 deletions

View File

@@ -20,14 +20,24 @@ public:
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
/**
* Sets the possessor of this entity
* @brief mounts the Entity
*/
void Mount();
/**
* @brief dismounts the Entity
*/
void Dismount();
/**
* Sets the possessor of this Entity
* @param value the ID of the possessor to set
*/
void SetPossessor(LWOOBJID value) { m_Possessor = value; m_DirtyPossessable = true; };
/**
* Returns the possessor of this entity
* @return the possessor of this entity
* Returns the possessor of this Entity
* @return the possessor of this Entity
*/
LWOOBJID GetPossessor() const { return m_Possessor; };
@@ -38,19 +48,19 @@ public:
void SetAnimationFlag(eAnimationFlags value) { m_AnimationFlag = value; m_DirtyPossessable = true; };
/**
* Returns the possession type of this entity
* @return the possession type of this entity
* Returns the possession type of this Entity
* @return the possession type of this Entity
*/
ePossessionType GetPossessionType() const { return m_PossessionType; };
/**
* Returns if the entity should deposses on hit
* @return if the entity should deposses on hit
* Returns if the Entity should deposses on hit
* @return if the Entity should deposses on hit
*/
bool GetDepossessOnHit() const { return m_DepossessOnHit; };
/**
* Forcibly depossess the entity
* Forcibly depossess the Entity
*/
void ForceDepossess() { m_ImmediatelyDepossess = true; m_DirtyPossessable = true; };
@@ -58,13 +68,13 @@ public:
* Set if the parent entity was spawned from an item
* @param value if the parent entity was spawned from an item
*/
void SetItemSpawned(bool value) { m_ItemSpawned = value; };
void SetIsItemSpawned(bool value) { m_ItemSpawned = value; };
/**
* Returns if the parent entity was spawned from an item
* @return if the parent entity was spawned from an item
*/
LWOOBJID GetItemSpawned() const { return m_ItemSpawned; };
LWOOBJID GetIsItemSpawned() const { return m_ItemSpawned; };
/**
* Handles an OnUsed event by some other entity, if said entity has a Possessor it becomes the possessor