Binary files freeciv/goto-knows.sav.gz and codeciv/goto-knows.sav.gz differ diff -Nur -X/mnt/data/freeciv-dev/freeciv/diff_ignore freeciv/server/unithand.c codeciv/server/unithand.c --- freeciv/server/unithand.c Mon Apr 9 20:29:57 2001 +++ codeciv/server/unithand.c Mon Apr 9 22:05:38 2001 @@ -1473,8 +1473,15 @@ { struct unit *punit = player_find_unit_by_id(pplayer, req->unit_id); - if (punit) - do_paradrop(punit, req->x, req->y); + if (!punit) + return; + + if (unit_owner(punit) != pplayer) { + freelog(LOG_ERROR, "%s trying to paradrop a non-owner unit!\n"); + return; + } + + do_paradrop(punit, req->x, req->y); } /************************************************************************** diff -Nur -X/mnt/data/freeciv-dev/freeciv/diff_ignore freeciv/server/unittools.c codeciv/server/unittools.c --- freeciv/server/unittools.c Mon Apr 9 20:29:57 2001 +++ codeciv/server/unittools.c Mon Apr 9 21:52:59 2001 @@ -2614,8 +2614,7 @@ return 0; } - - if (map_get_terrain(dest_x, dest_y) == T_OCEAN) { + if (map_get_player_tile(dest_x, dest_y, punit->owner)->terrain == T_OCEAN) { notify_player_ex(unit_owner(punit), dest_x, dest_y, E_NOEVENT, _("Game: Cannot paradrop into ocean.")); return 0; @@ -2633,13 +2632,26 @@ } } - /* FIXME: this is a fog-of-war cheat. - You get to know if there is an enemy on the tile*/ + if (map_get_terrain(dest_x, dest_y) == T_OCEAN) { + int srange = get_unit_type(punit->type)->vision_range; + show_area(unit_owner(punit), dest_x, dest_y, srange); + + notify_player_ex(unit_owner(punit), dest_x, dest_y, E_UNIT_LOST, + _("Game: Your %s paradropped into the ocean and drowned"), + unit_types[punit->type].name); + server_remove_unit(punit); + return 1; + } + if (is_non_allied_unit_tile(map_get_tile(dest_x, dest_y), punit->owner)) { - notify_player_ex(unit_owner(punit), dest_x, dest_y, E_NOEVENT, - _("Game: Cannot paradrop because there are" - " enemy units on the destination location.")); - return 0; + int srange = get_unit_type(punit->type)->vision_range; + show_area(unit_owner(punit), dest_x, dest_y, srange); + notify_player_ex(unit_owner(punit), dest_x, dest_y, E_UNIT_LOST_ATT, + _("Game: Your %s was killed by enemy units at the " + "paradrop destination"), + unit_types[punit->type].name); + server_remove_unit(punit); + return 1; } /* All ok */