<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40420 >

> [EMAIL PROTECTED] - Sat Aug 09 23:00:44 2008]:
> 
> Or it could bring the dead player back to life...could be desirable
> for scenario editing but is a bit more work to code I'm sure.

As far as I can see, all that is needed is to set
pplayer->is_alive to TRUE, and send the player info.
At least, I observed no immediate ill effects when
I added code to do this when units or cities are
created for already dead players (patch attached).


----------------------------------------------------------------------
信じてくれ!あの死体が動くのを自分の目で見たよ。
diff --git a/server/edithand.c b/server/edithand.c
index 6cae087..8f72fc3 100644
--- a/server/edithand.c
+++ b/server/edithand.c
@@ -429,6 +429,11 @@ void handle_edit_unit_create(struct connection *pc, int owner,
     return;
   }
 
+  if (count > 0 && !pplayer->is_alive) {
+    pplayer->is_alive = TRUE;
+    send_player_info(pplayer, NULL);
+  }
+
   /* FIXME: Make this more general? */
   coastal = is_sailing_unittype(punittype);
 
@@ -559,6 +564,11 @@ void handle_edit_city_create(struct connection *pc,
     return;
   }
 
+  if (!pplayer->is_alive) {
+    pplayer->is_alive = TRUE;
+    send_player_info(pplayer, NULL);
+  }
+
   conn_list_do_buffer(game.est_connections);
   map_show_tile(pplayer, ptile);
   create_city(pplayer, ptile, city_name_suggestion(pplayer, ptile));
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to