diff --git a/main/source/mod/AvHOrder.cpp b/main/source/mod/AvHOrder.cpp index 905e277..e6abadd 100644 --- a/main/source/mod/AvHOrder.cpp +++ b/main/source/mod/AvHOrder.cpp @@ -280,6 +280,19 @@ bool AvHOrder::GetOrderCancelled() const return (this->mOrderStatus == kOrderStatusCancelled); } +// puzl: 1050 +// Need to sync the order status as it is only manipulated by the serverside state machine +int AvHOrder::GetOrderStatus() const +{ + return this->mOrderStatus; +} +#ifndef AVH_SERVER +void AvHOrder::SetOrderStatus(int inOrderStatus) +{ + this->mOrderStatus=inOrderStatus; +} +#endif + bool AvHOrder::GetOrderCompleted() const { return (this->mOrderStatus == kOrderStatusComplete); diff --git a/main/source/mod/AvHOrder.h b/main/source/mod/AvHOrder.h index 15a5d8c..6942534 100644 --- a/main/source/mod/AvHOrder.h +++ b/main/source/mod/AvHOrder.h @@ -33,6 +33,10 @@ public: float GetTimeOrderCompleted() const; void SetTimeOrderCompleted(float inTime); #endif + +#ifndef AVH_SERVER + void SetOrderStatus(int inOrderStatus); +#endif // Shared AvHOrder(); @@ -41,6 +45,7 @@ public: EntityInfo GetReceiver() const; int GetTargetIndex() const; AvHOrderType GetOrderType() const; + int GetOrderStatus() const; AvHOrderTargetType GetOrderTargetType() const; AvHUser3 GetTargetUser3Type() const; void GetLocation(vec3_t& outPosition) const;