Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/CCmpObstruction.cpp
Show First 20 Lines • Show All 513 Lines • ▼ Show 20 Lines | public: | ||||
virtual entity_pos_t GetSize() const | virtual entity_pos_t GetSize() const | ||||
{ | { | ||||
if (m_Type == UNIT) | if (m_Type == UNIT) | ||||
return m_Clearance; | return m_Clearance; | ||||
else | else | ||||
return CFixedVector2D(m_Size0 / 2, m_Size1 / 2).Length(); | return CFixedVector2D(m_Size0 / 2, m_Size1 / 2).Length(); | ||||
} | } | ||||
virtual CFixedVector2D GetStaticSize() const | |||||
{ | |||||
return m_Type == STATIC ? CFixedVector2D(m_Size0, m_Size1) : CFixedVector2D(); | |||||
Stan: ternary ? | |||||
} | |||||
virtual void SetUnitClearance(const entity_pos_t& clearance) | virtual void SetUnitClearance(const entity_pos_t& clearance) | ||||
{ | { | ||||
if (m_Type == UNIT) | if (m_Type == UNIT) | ||||
m_Clearance = clearance; | m_Clearance = clearance; | ||||
} | } | ||||
virtual bool IsControlPersistent() const | virtual bool IsControlPersistent() const | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 308 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
ternary ?