This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 308 for ps


Ignore:
Timestamp:
05/29/04 22:58:11 (21 years ago)
Author:
notpete
Message:

Minor changes to use CUnit::GetModel() and CUnit::GetObject() instead of m_Model and m_Object, as these are no longer public.

Location:
ps/trunk/source/simulation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/simulation/BaseEntityCollection.cpp

    r260 r308  
    3030    // He's so annoyingly slow...
    3131    CBaseEntity* dude = getTemplate( "Prometheus Dude" );
    32     dude->m_actorObject->m_WalkAnim->m_FrameTime /= 10.0f;
    3332    dude->m_speed *= 10.0f;
    3433
  • ps/trunk/source/simulation/Entity.cpp

    r284 r308  
    1616
    1717    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());
    2219
    2320    // Register the actor with the renderer.
     
    5956    if( m_actor )
    6057    {
    61         if( m_actor->m_Model ) delete( m_actor->m_Model );
    6258        g_UnitMan.RemoveUnit( m_actor );
    6359        delete( m_actor );
     
    8076    m._41 = 0.0f;       m._42 = 0.0f;   m._43 = 0.0f;       m._44 = 1.0f;
    8177
    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
    9082    */
    9183
    92     m_actor->m_Model->SetTransform( m );
     84    m_actor->GetModel()->SetTransform( m );
    9385}
    9486
     
    162154        }
    163155    }
    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 );
    166158}
    167159
  • ps/trunk/source/simulation/EntityStateProcessing.cpp

    r284 r308  
    116116    CVector2D path_to = current->m_data[0].location;
    117117    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 )
    119119    {
    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 );
    122122    }
    123123    g_Pathfinder.requestPath( me, path_to );
Note: See TracChangeset for help on using the changeset viewer.