[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/action action_repair.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/action action_repair.c |
Date: |
17 Dec 2003 16:40:37 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 03/12/17 16:40:37
Modified files:
src/action : action_repair.c
Log message:
Fixed repair
Patches:
Index: stratagus/src/action/action_repair.c
diff -u stratagus/src/action/action_repair.c:1.62
stratagus/src/action/action_repair.c:1.63
--- stratagus/src/action/action_repair.c:1.62 Sat Dec 13 19:32:09 2003
+++ stratagus/src/action/action_repair.c Wed Dec 17 16:40:37 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: action_repair.c,v 1.62 2003/12/13 08:32:09 wizzard Exp $
+// $Id: action_repair.c,v 1.63 2003/12/17 05:40:37 jsalmon3 Exp $
//@{
@@ -120,6 +120,11 @@
// Subtract the resources
//
PlayerSubCosts(player, goal->Type->RepairCosts);
+
+ goal->HP += goal->Type->RepairHP;
+ if (goal->HP > goal->Stats->HitPoints) {
+ goal->HP = goal->Stats->HitPoints;
+ }
} else {
// hp is the current damage taken by the unit.
hp = (goal->Data.Builded.Progress * goal->Stats->HitPoints) /