[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/action action_attack.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/action action_attack.c |
Date: |
24 Jan 2004 21:16:52 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/24 21:16:51
Modified files:
src/action : action_attack.c
Log message:
Fix Crash when Checking for Dead Goal, Can't use ->Type as it's NULL
Patches:
Index: stratagus/src/action/action_attack.c
diff -u stratagus/src/action/action_attack.c:1.93
stratagus/src/action/action_attack.c:1.94
--- stratagus/src/action/action_attack.c:1.93 Thu Jan 15 09:31:01 2004
+++ stratagus/src/action/action_attack.c Sat Jan 24 21:16:51 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: action_attack.c,v 1.93 2004/01/14 22:31:01 nobody_ Exp $
+// $Id: action_attack.c,v 1.94 2004/01/24 10:16:51 wizzard Exp $
//@{
@@ -123,14 +123,15 @@
if (!UnitVisibleAsGoal(goal, unit->Player)) {
//
// Goal is destroyed
+ // Cannot use type as it's NULL
//
- unit->Orders[0].X = goal->X + goal->Type->TileWidth / 2;
- unit->Orders[0].Y = goal->Y + goal->Type->TileHeight /
2;
+ unit->Orders[0].X = goal->X;
+ unit->Orders[0].Y = goal->Y;
unit->Orders[0].MinRange = 0;
unit->Orders[0].Range = 0;
- DebugLevel3Fn("attack target %d(%s) gone for %d(%s)\n"
_C_
- UnitNumber(goal) _C_ goal->Type->Name _C_
+ DebugLevel3Fn("attack target %d gone for %d(%s)\n" _C_
+ UnitNumber(goal) _C_
UnitNumber(unit) _C_ unit->Type->Name);
RefsDecrease(goal);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/action action_attack.c,
address@hidden <=