Author: sveinung
Date: Sun Aug 30 11:22:05 2015
New Revision: 29731

URL: http://svn.gna.org/viewcvs/freeciv?rev=29731&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_6/server/unittools.c

Modified: branches/S2_6/server/unittools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unittools.c?rev=29731&r1=29730&r2=29731&view=diff
==============================================================================
--- branches/S2_6/server/unittools.c    (original)
+++ branches/S2_6/server/unittools.c    Sun Aug 30 11:22:05 2015
@@ -3494,6 +3494,12 @@
         BV_SET(pmove_data->can_see_unit, player_index(oplayer));
         BV_SET(pmove_data->can_see_move, player_index(oplayer));
       }
+      if (can_player_see_unit_at(oplayer, 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(oplayer));
+      }
     } 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