Ignore:
Timestamp:
May 20, 2012, 2:30:46 PM (11 years ago)
Author:
sam
Message:

orbital: fix uninitialised variables and allow to shoot with RCtrl.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/orbital/snake.h

    r1397 r1404  
    7373        if (!m_stick)
    7474            m_stick = Input::TrackStick();
    75         if (m_stick && m_stick->GetButtonCount() >= 4
    76              && m_stick->GetButton(12)
    77              && (int)m_steer != (int)(m_steer - 2.f * seconds))
     75        bool fire = m_stick && m_stick->GetButtonCount() >= 4
     76                            && m_stick->GetButton(12);
     77        fire = fire || Input::GetButtonState(305 /* Right Ctrl */);
     78        if (fire && (int)m_steer != (int)(m_steer - 2.f * seconds))
    7879        {
    7980            int tohit = (int)RandF(m_nodes.Count() - 2);
     
    128129
    129130            /* Apply damage */
    130             float damage = std::min(m_nodes[i].m4, 30.f * seconds);
     131            float damage = std::min(m_nodes[i].m4, 80.f * seconds);
    131132            m_nodes[i].m3 -= damage;
    132133            m_nodes[i].m4 -= damage;
Note: See TracChangeset for help on using the changeset viewer.