[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src action/command.c unit/unit.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src action/command.c unit/unit.c |
Date: |
24 Jan 2004 03:00:52 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/24 03:00:51
Modified files:
src/action : command.c
src/unit : unit.c
Log message:
Fix crash when casting spell on destroyed unit.
Patches:
Index: stratagus/src/action/command.c
diff -u stratagus/src/action/command.c:1.130
stratagus/src/action/command.c:1.131
--- stratagus/src/action/command.c:1.130 Fri Jan 23 16:14:46 2004
+++ stratagus/src/action/command.c Sat Jan 24 03:00:50 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: command.c,v 1.130 2004/01/23 05:14:46 jsalmon3 Exp $
+// $Id: command.c,v 1.131 2004/01/23 16:00:50 nobody_ Exp $
//@{
@@ -1202,8 +1202,9 @@
//
if (dest->Destroyed) {
// FIXME: where check if spell needs an unit as
destination?
- order->X = dest->X + dest->Type->TileWidth / 2
- order->Range;
- order->Y = dest->Y + dest->Type->TileHeight / 2
- order->Range;
+ // FIXME: dest->Type is now set to 0. maybe we
shouldn't bother.
+ order->X = dest->X /*+ dest->Type->TileWidth /
2*/ - order->Range;
+ order->Y = dest->Y /*+ dest->Type->TileHeight /
2*/ - order->Range;
order->Goal = NoUnitP;
order->Range <<= 1;
order->Range <<= 1;
Index: stratagus/src/unit/unit.c
diff -u stratagus/src/unit/unit.c:1.369 stratagus/src/unit/unit.c:1.370
--- stratagus/src/unit/unit.c:1.369 Fri Jan 23 05:12:29 2004
+++ stratagus/src/unit/unit.c Sat Jan 24 03:00:50 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unit.c,v 1.369 2004/01/22 18:12:29 nobody_ Exp $
+// $Id: unit.c,v 1.370 2004/01/23 16:00:50 nobody_ Exp $
//@{
@@ -221,7 +221,7 @@
unit->Refs = GameCycle + NetworkMaxLag; // could be reuse after
this time
DebugLevel2Fn("%lu:No more references, only wait for network lag, unit
%d\n" _C_
GameCycle _C_ UnitNumber(unit));
- unit->Type = NULL; // for
debugging.
+ unit->Type = 0; // for
debugging.
#ifdef NEW_UNIT_CACHE
free(unit->CacheLinks);
#endif
@@ -3749,7 +3749,7 @@
int j;
CLprintf(file, "\n--- -----------------------------------------\n");
- CLprintf(file, "--- MODULE: units $Id: unit.c,v 1.369 2004/01/22
18:12:29 nobody_ Exp $\n\n");
+ CLprintf(file, "--- MODULE: units $Id: unit.c,v 1.370 2004/01/23
16:00:50 nobody_ Exp $\n\n");
#if 0
//
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src action/command.c unit/unit.c,
address@hidden <=