mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +03:00
feat(object): add CGUnit_C::GetPosition
This commit is contained in:
parent
1b90dcb09b
commit
3a876398a7
@ -1,5 +1,6 @@
|
|||||||
#include "object/client/CGUnit.hpp"
|
#include "object/client/CGUnit.hpp"
|
||||||
#include "object/client/CGObject.hpp"
|
#include "object/client/CGObject.hpp"
|
||||||
|
#include "object/client/CMovement_C.hpp"
|
||||||
|
|
||||||
uint32_t CGUnit::GetBaseOffset() {
|
uint32_t CGUnit::GetBaseOffset() {
|
||||||
return CGObject::TotalFields();
|
return CGObject::TotalFields();
|
||||||
@ -33,6 +34,10 @@ int32_t CGUnit::GetNativeDisplayID() const {
|
|||||||
return this->Unit()->nativeDisplayID;
|
return this->Unit()->nativeDisplayID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
C3Vector CGUnit::GetPosition() const {
|
||||||
|
return this->m_move->GetPosition();
|
||||||
|
}
|
||||||
|
|
||||||
CGUnitData* CGUnit::Unit() const {
|
CGUnitData* CGUnit::Unit() const {
|
||||||
return this->m_unit;
|
return this->m_unit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
#define OBJECT_CLIENT_CG_UNIT_HPP
|
#define OBJECT_CLIENT_CG_UNIT_HPP
|
||||||
|
|
||||||
#include "util/GUID.hpp"
|
#include "util/GUID.hpp"
|
||||||
|
#include <tempest/Vector.hpp>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
class CMovement_C;
|
class CMovement_C;
|
||||||
@ -89,6 +90,7 @@ class CGUnit {
|
|||||||
: m_move(&move) {};
|
: m_move(&move) {};
|
||||||
int32_t GetDisplayID() const;
|
int32_t GetDisplayID() const;
|
||||||
int32_t GetNativeDisplayID() const;
|
int32_t GetNativeDisplayID() const;
|
||||||
|
C3Vector GetPosition() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Protected member variables
|
// Protected member variables
|
||||||
|
|||||||
@ -175,6 +175,10 @@ int32_t CGUnit_C::GetModelFileName(const char*& name) const {
|
|||||||
return modelDataRec->m_modelName ? true : false;
|
return modelDataRec->m_modelName ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
C3Vector CGUnit_C::GetPosition() const {
|
||||||
|
return this->CGUnit::GetPosition();
|
||||||
|
}
|
||||||
|
|
||||||
void CGUnit_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
void CGUnit_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,8 @@ class CGUnit_C : public CGObject_C, public CGUnit {
|
|||||||
// Virtual public member functions
|
// Virtual public member functions
|
||||||
virtual ~CGUnit_C();
|
virtual ~CGUnit_C();
|
||||||
// TODO
|
// TODO
|
||||||
|
virtual C3Vector GetPosition() const;
|
||||||
|
// TODO
|
||||||
virtual int32_t GetModelFileName(const char*& name) const;
|
virtual int32_t GetModelFileName(const char*& name) const;
|
||||||
// TODO
|
// TODO
|
||||||
virtual int32_t CanHighlight();
|
virtual int32_t CanHighlight();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user