# CSimulation cleanup and optimization (1)

moved some fields (e.g. size of health bar) out of CEntity and into
BaseEntity so they can be shared between entities (instead of duplicated
in each).

TODO: is it ok to remove AddProperty for those properties in CEntity?
(BaseEntity is still adding them)

This was SVN commit r4078.
This commit is contained in:
janwas
2006-07-12 14:36:59 +00:00
parent 77b6565f7c
commit e4ed1d52b9
8 changed files with 126 additions and 104 deletions
+3 -2
View File
@@ -143,8 +143,9 @@ uint CEntity::processGotoHelper( CEntityOrder* current, size_t timestep_millis,
while( targetXZ.y > PI ) targetXZ.y -= 2 * PI;
while( targetXZ.y < -PI ) targetXZ.y += 2 * PI;
m_orientation.X = clamp( targetXZ.x, -m_anchorConformX, m_anchorConformX );
m_orientation.Z = clamp( targetXZ.y, -m_anchorConformZ, m_anchorConformZ );
float cX = m_base->m_anchorConformX, cZ = m_base->m_anchorConformZ;
m_orientation.X = clamp( targetXZ.x, -cX, cX );
m_orientation.Z = clamp( targetXZ.y, -cZ, cZ );
m_orientation_unclamped.x = targetXZ.x;
m_orientation_unclamped.y = targetXZ.y;