- Timestamp:
- 05/29/04 22:58:11 (21 years ago)
- Location:
- ps/trunk/source/simulation
- Files:
-
- 3 edited
-
BaseEntityCollection.cpp (modified) (1 diff)
-
Entity.cpp (modified) (4 diffs)
-
EntityStateProcessing.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/simulation/BaseEntityCollection.cpp
r260 r308 30 30 // He's so annoyingly slow... 31 31 CBaseEntity* dude = getTemplate( "Prometheus Dude" ); 32 dude->m_actorObject->m_WalkAnim->m_FrameTime /= 10.0f;33 32 dude->m_speed *= 10.0f; 34 33 -
ps/trunk/source/simulation/Entity.cpp
r284 r308 16 16 17 17 m_base = base; 18 m_actor = new CUnit; 19 20 m_actor->m_Object = m_base->m_actorObject; 21 m_actor->m_Model = ( m_actor->m_Object->m_Model ) ? m_actor->m_Object->m_Model->Clone() : NULL; 18 m_actor = new CUnit(m_base->m_actorObject,m_base->m_actorObject->m_Model->Clone()); 22 19 23 20 // Register the actor with the renderer. … … 59 56 if( m_actor ) 60 57 { 61 if( m_actor->m_Model ) delete( m_actor->m_Model );62 58 g_UnitMan.RemoveUnit( m_actor ); 63 59 delete( m_actor ); … … 80 76 m._41 = 0.0f; m._42 = 0.0f; m._43 = 0.0f; m._44 = 1.0f; 81 77 82 /* Equivalent to: 83 84 m.SetYRotation( m_orientation ); 85 86 m.Translate( m_position ); 87 88 But the matrix multiplication seemed such a waste when we already have a forward vector 89 78 /* Equivalent to: 79 m.SetYRotation( m_orientation ); 80 m.Translate( m_position ); 81 But the matrix multiplication seemed such a waste when we already have a forward vector 90 82 */ 91 83 92 m_actor-> m_Model->SetTransform( m );84 m_actor->GetModel()->SetTransform( m ); 93 85 } 94 86 … … 162 154 } 163 155 } 164 if( m_actor-> m_Model->GetAnimation() != m_actor->m_Object->m_IdleAnim )165 m_actor-> m_Model->SetAnimation( m_actor->m_Object->m_IdleAnim );156 if( m_actor->GetModel()->GetAnimation() != m_actor->GetObject()->m_IdleAnim ) 157 m_actor->GetModel()->SetAnimation( m_actor->GetObject()->m_IdleAnim ); 166 158 } 167 159 -
ps/trunk/source/simulation/EntityStateProcessing.cpp
r284 r308 116 116 CVector2D path_to = current->m_data[0].location; 117 117 m_orderQueue.pop_front(); 118 if( m_actor-> m_Model->GetAnimation() != m_actor->m_Object->m_WalkAnim )118 if( m_actor->GetModel()->GetAnimation() != m_actor->GetObject()->m_WalkAnim ) 119 119 { 120 m_actor-> m_Model->SetAnimation( m_actor->m_Object->m_WalkAnim );121 m_actor-> m_Model->Update( ( rand() * 1000.0f ) / 1000.0f );120 m_actor->GetModel()->SetAnimation( m_actor->GetObject()->m_WalkAnim ); 121 m_actor->GetModel()->Update( ( rand() * 1000.0f ) / 1000.0f ); 122 122 } 123 123 g_Pathfinder.requestPath( me, path_to );
Note:
See TracChangeset
for help on using the changeset viewer.
