Complete.Org: Mailing Lists: Archives: freeciv-dev: July 1999:
[Freeciv-Dev] [PATCH] debug battle more
Home

[Freeciv-Dev] [PATCH] debug battle more

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] [PATCH] debug battle more
From: Markus Linnala <maage@xxxxxxxxx>
Date: 05 Jul 1999 01:35:30 +0300
Reply-to: Markus Linnala <maage@xxxxxxxxx>

More debug info about battle.

diff -u --ignore-space-change --recursive --new-file --exclude-from=.diffignore 
freeciv-cvs/server/unithand.c m/freeciv/server/unithand.c
--- freeciv-cvs/server/unithand.c       Sun Jul  4 13:18:53 1999
+++ m/freeciv/server/unithand.c Sun Jul  4 02:48:27 1999
@@ -484,6 +484,11 @@
   struct city *incity, *nearcity1, *nearcity2;
   incity = map_get_city(pdefender->x, pdefender->y);
   
+  freelog(LOG_DEBUG, "Start attack: %s's %s against %s's %s.",
+         pplayer->name, unit_types[punit->type].name, 
+         game.players[pdefender->owner].name, 
+         unit_types[pdefender->type].name);
+
   if(unit_flag(punit->type, F_NUCLEAR)) {
     struct packet_nuke_tile packet;
     
@@ -543,6 +548,11 @@
   
   if(punit==plooser) {
     /* The attacker lost */
+    freelog(LOG_DEBUG, "Attacker lost: %s's %s against %s's %s.",
+           pplayer->name, unit_types[punit->type].name, 
+           game.players[pdefender->owner].name, 
+           unit_types[pdefender->type].name);
+
     notify_player_ex(get_player(pwinner->owner),
                     pwinner->x, pwinner->y, E_UNIT_WIN, 
                     "Game: Your %s%s survived the pathetic attack"
@@ -565,6 +575,11 @@
   }
   else {
     /* The defender lost, the attacker punit lives! */
+    freelog(LOG_DEBUG, "Defender lost: %s's %s against %s's %s.",
+           pplayer->name, unit_types[punit->type].name, 
+           game.players[pdefender->owner].name, 
+           unit_types[pdefender->type].name);
+
     punit->moved=1; /* We moved */
 
     notify_player_ex(get_player(pwinner->owner), 

-- 
//Markus

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] [PATCH] debug battle more, Markus Linnala <=