]> ruin.nu Git - hbs.git/blobdiff - bs/fleet.cpp
Fixed a bug in the shipstealing code..
[hbs.git] / bs / fleet.cpp
index 19bc3860ef51af974aee0f3c60b14542f58ecb42..85304bb2bfcb6e642826764749ca1bad9a2ea4be 100644 (file)
@@ -801,3 +801,21 @@ void Fleet::calculateSalvage()
                }
        }
 }
+
+//////////////////////////////////////////////////////////////////////////
+//
+void Fleet::resetTicks()
+{
+       for (FleetList::iterator i = m_Fleet.begin(); i != m_Fleet.end(); ++i)
+       {
+               if ( i->second.size() < 2)
+                       continue;
+
+               int temp = i->second[0];
+               i->second.clear();
+
+               if (temp > 0)
+                       i->second.push_back(temp);
+       }
+       resetResources();
+}