diff server/cityhand.c server/cityhand.c --- server/cityhand.c Tue Jan 9 03:13:07 2001 +++ server/cityhand.c Tue Jan 9 03:30:31 2001 @@ -42,6 +42,7 @@ #include "plrhand.h" #include "sernet.h" #include "settlers.h" +#include "spacerace.h" #include "srv_main.h" #include "unithand.h" #include "unittools.h" @@ -404,6 +405,7 @@ if (!is_wonder(id)) { pcity->improvements[id]=0; pplayer->economic.gold += improvement_value(id); + building_lost(pcity, id); } } @@ -431,6 +433,21 @@ city_refresh(pcity); send_city_info(0, pcity); /* If we sold the walls the other players should see it */ send_player_info(pplayer, pplayer); +} + +/************************************************************************** +... +**************************************************************************/ +void building_lost(struct city *pcity, int id) +{ + struct player *owner = city_owner(pcity); + + pcity->improvements[id]=0; + if (id == B_PALACE && + ((owner->spaceship.state == SSHIP_STARTED) || + (owner->spaceship.state == SSHIP_LAUNCHED))) { + spaceship_lost(owner); + } } /************************************************************************** diff server/cityhand.h server/cityhand.h --- server/cityhand.h Mon Jan 1 15:59:11 2001 +++ server/cityhand.h Tue Jan 9 03:30:31 2001 @@ -30,6 +30,7 @@ struct city *pcity, int x, int y); void do_sell_building(struct player *pplayer, struct city *pcity, int id); +void building_lost(struct city *pcity, int id); void handle_city_change_specialist(struct player *pplayer, struct packet_city_request *preq); diff server/diplomats.c server/diplomats.c --- server/diplomats.c Tue Jan 9 01:44:33 2001 +++ server/diplomats.c Tue Jan 9 03:35:43 2001 @@ -1024,8 +1024,6 @@ } } - /* Do it. */ - pcity->improvements[target] = 0; /* Report it. */ notify_player_ex (pplayer, pcity->x, pcity->y, E_MY_DIPLOMAT, _("Game: Your %s destroyed the %s in %s."), @@ -1037,6 +1035,9 @@ get_improvement_name (target), pcity->name); freelog (LOG_DEBUG, "sabotage: sabotaged improvement: %d (%s)", target, get_improvement_name (target)); + + /* Do it. */ + building_lost(pcity, target); } /* Update clients. */ diff server/spacerace.c server/spacerace.c --- server/spacerace.c Tue Dec 26 22:52:35 2000 +++ server/spacerace.c Tue Jan 9 03:30:31 2001 @@ -156,6 +156,11 @@ struct player_spaceship *ship = &pplayer->spaceship; int arrival; + if (!find_palace(pplayer)) { + notify_player(pplayer, + _("Game: You need capital in order to launch spaceship.")); + return; + } if (ship->state >= SSHIP_LAUNCHED) { notify_player(pplayer, _("Game: Your spaceship is already launched!")); return; @@ -330,9 +335,8 @@ void spaceship_lost(struct player *pplayer) { notify_player_ex(0, -1, -1, E_SPACESHIP, - _("Game: With the capture of %s's capital, the %s" - " spaceship is lost!"), pplayer->name, - get_nation_name(pplayer->nation)); + _("Game: Without guidance from capital, the %s " + "spaceship is lost!"), get_nation_name(pplayer->nation)); spaceship_init(&pplayer->spaceship); send_spaceship_info(pplayer, 0); }