Author: sveinung Date: Wed Apr 5 16:22:01 2017 New Revision: 35200 URL: http://svn.gna.org/viewcvs/freeciv?rev=35200&view=rev Log: Diplrel action cache: non hostile isn't hostile.
Stop the diplrel utype action cache from saying that a diplrel allows a hostile action when it allows a non hostile action. See hrm Bug #649816 Modified: trunk/common/unittype.c Modified: trunk/common/unittype.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/unittype.c?rev=35200&r1=35199&r2=35200&view=diff ============================================================================== --- trunk/common/unittype.c (original) +++ trunk/common/unittype.c Wed Apr 5 16:22:01 2017 @@ -471,9 +471,11 @@ BV_SET(dipl_rel_action_cache[putype_id][enabler->action], requirement_diplrel_ereq(req.source.value.diplrel, REQ_RANGE_LOCAL, TRUE)); - BV_SET(dipl_rel_action_cache[putype_id][ACTION_HOSTILE], - requirement_diplrel_ereq(req.source.value.diplrel, - REQ_RANGE_LOCAL, TRUE)); + if (action_is_hostile(enabler->action)) { + BV_SET(dipl_rel_action_cache[putype_id][ACTION_HOSTILE], + requirement_diplrel_ereq(req.source.value.diplrel, + REQ_RANGE_LOCAL, TRUE)); + } BV_SET(dipl_rel_action_cache[putype_id][ACTION_ANY], requirement_diplrel_ereq(req.source.value.diplrel, REQ_RANGE_LOCAL, TRUE)); @@ -484,9 +486,11 @@ BV_SET(dipl_rel_action_cache[putype_id][enabler->action], requirement_diplrel_ereq(req.source.value.diplrel, REQ_RANGE_LOCAL, FALSE)); - BV_SET(dipl_rel_action_cache[putype_id][ACTION_HOSTILE], - requirement_diplrel_ereq(req.source.value.diplrel, - REQ_RANGE_LOCAL, FALSE)); + if (action_is_hostile(enabler->action)) { + BV_SET(dipl_rel_action_cache[putype_id][ACTION_HOSTILE], + requirement_diplrel_ereq(req.source.value.diplrel, + REQ_RANGE_LOCAL, FALSE)); + } BV_SET(dipl_rel_action_cache[putype_id][ACTION_ANY], requirement_diplrel_ereq(req.source.value.diplrel, REQ_RANGE_LOCAL, FALSE)); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits