Changeset 1362


Ignore:
Timestamp:
May 10, 2012, 1:37:00 PM (8 years ago)
Author:
sam
Message:

orbital: use both thumb sticks to pilot ships.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/orbital/player.h

    r1360 r1362  
    1414public:
    1515    Player(int type)
    16       : m_stick(0),
     16      : m_type(type),
     17        m_stick(0),
    1718        m_ready(false)
    1819    {
     
    7273        if (m_stick && m_stick->GetAxisCount() >= 4)
    7374        {
    74             rightleft += 1.f * m_stick->GetAxis(2);
    75             updown += -1.f * m_stick->GetAxis(3);
     75            rightleft += 1.f * m_stick->GetAxis(m_type * 2 + 0);
     76            updown += -1.f * m_stick->GetAxis(m_type * 2 + 1);
    7677        }
    7778
     
    130131
    131132private:
     133    int m_type;
    132134    Mesh m_ship_mesh, m_option_mesh, m_exhaust_mesh;
    133135    Stick *m_stick;
  • trunk/src/camera.cpp

    r1353 r1362  
    8686                             - Input::GetButtonState('f'));
    8787
     88#if 0
    8889    /* Hackish stick support */
    8990    static Stick *stick = NULL;
     
    9596        updown += -2.f * stick->GetAxis(1) * std::abs(stick->GetAxis(1));
    9697    }
     98#endif
    9799
    98100    m_position += vec3(rightleft, pgupdown, -updown) * 200.f * seconds;
Note: See TracChangeset for help on using the changeset viewer.