[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/action actions.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/action actions.c |
Date: |
30 Jan 2004 17:02:44 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/30 17:02:44
Modified files:
src/action : actions.c
Log message:
Fixed crash when a unit was destroyed in HandleBuffs
Patches:
Index: stratagus/src/action/actions.c
diff -u stratagus/src/action/actions.c:1.117
stratagus/src/action/actions.c:1.118
--- stratagus/src/action/actions.c:1.117 Fri Jan 30 04:36:50 2004
+++ stratagus/src/action/actions.c Fri Jan 30 17:02:43 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: actions.c,v 1.117 2004/01/29 17:36:50 nobody_ Exp $
+// $Id: actions.c,v 1.118 2004/01/30 06:02:43 wizzard Exp $
//@{
@@ -532,6 +532,10 @@
if (buffsthiscycle) {
for (i = 0; i < tabsize; ++i) {
HandleBuffs(table[i], CYCLES_PER_SECOND);
+ if (table[i]->Destroyed) {
+ table[i] = table[--tabsize];
+ --i;
+ }
}
}
@@ -554,7 +558,7 @@
HandleUnitAction(unit);
-#ifdef DEBUG_ACTIONS
+#ifdef DEBUG
//
// Dump the unit to find the network sync bugs.
//