Author: sveinung
Date: Fri Aug 15 11:37:15 2014
New Revision: 25917

URL: http://svn.gna.org/viewcvs/freeciv?rev=25917&view=rev
Log:
Bribing or sabotaging your own units should not be allowed.

See bug #22469

Modified:
    trunk/common/unit.c

Modified: trunk/common/unit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.c?rev=25917&r1=25916&r2=25917&view=diff
==============================================================================
--- trunk/common/unit.c (original)
+++ trunk/common/unit.c Fri Aug 15 11:37:15 2014
@@ -158,6 +158,7 @@
 
     if ((action == SPY_SABOTAGE_UNIT || action == DIPLOMAT_ANY_ACTION)
         && can_player_see_unit(unit_owner(pdiplomat), punit)
+        && unit_owner(pdiplomat) != unit_owner(punit)
         && is_action_enabled_unit_on_unit(ACTION_SPY_SABOTAGE_UNIT,
                                           pdiplomat, punit)) {
       return TRUE;
@@ -165,6 +166,7 @@
 
     if ((action == DIPLOMAT_BRIBE || action == DIPLOMAT_ANY_ACTION)
         && can_player_see_unit(unit_owner(pdiplomat), punit)
+        && unit_owner(pdiplomat) != unit_owner(punit)
         && is_action_enabled_unit_on_unit(ACTION_SPY_BRIBE_UNIT,
                                           pdiplomat, punit)) {
       return TRUE;


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

Reply via email to