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

orbital: use both thumb sticks to pilot ships.

File:
1 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;
Note: See TracChangeset for help on using the changeset viewer.