Changeset 1391


Ignore:
Timestamp:
May 14, 2012, 9:01:36 PM (11 years ago)
Author:
sam
Message:

orbital: fix off-by-one error in snake destruction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/orbital/snake.h

    r1390 r1391  
    7272        {
    7373            int tohit = (int)RandF(m_nodes.Count() - 2);
     74            m_nodes[tohit].m4 += 150.f;
    7475            m_nodes[tohit + 1].m4 += 150.f;
    75             m_nodes[tohit + 2].m4 += 150.f;
    7676        }
    7777
     
    8484
    8585        /* Remove dead nodes */
    86         for (int i = m_nodes.Count(); --i; )
     86        for (int i = m_nodes.Count(); i--; )
    8787        {
    8888            if (m_nodes[i].m3 < 0.f)
Note: See TracChangeset for help on using the changeset viewer.