Author: sveinung
Date: Tue Sep  1 13:33:11 2015
New Revision: 29754

URL: http://svn.gna.org/viewcvs/freeciv?rev=29754&view=rev
Log:
Stop teleportation related ghost units

Make unit_move() inform players that the unit they saw at the dest tile now
is gone when the move is non adjacent.

See bug #23831

Modified:
    branches/S2_5/server/unittools.c

Modified: branches/S2_5/server/unittools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/unittools.c?rev=29754&r1=29753&r2=29754&view=diff
==============================================================================
--- branches/S2_5/server/unittools.c    (original)
+++ branches/S2_5/server/unittools.c    Tue Sep  1 13:33:11 2015
@@ -3587,6 +3587,12 @@
         BV_SET(pmove_data->can_see_unit, player_index(pplayer));
         BV_SET(pmove_data->can_see_move, player_index(pplayer));
       }
+      if (can_player_see_unit_at(pplayer, pmove_data->punit, psrctile,
+                                 pmove_data != pdata)) {
+        /* The unit was seen with its source tile even if it was
+         * teleported. */
+        BV_SET(pmove_data->can_see_unit, player_index(pplayer));
+      }
     } players_iterate_end;
   } unit_move_data_list_iterate_end;
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to