Militarysites warn about allies

Bug #1637386 reported by GunChleoc
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Low
Unassigned

Bug Description

When allied soldiers approach one of the player's militarysites, the "Your XX discovered an aggressor." is triggered. This message should only be triggered for soldiers of players who aren't in the same team.

Tags: ui

Related branches

Revision history for this message
TiborB (tiborb95) wrote :

I just looked at:

bool FindBobEnemySoldier::accept(Bob* const imm) const {
 if (upcast(Soldier, soldier, imm))
  if (soldier->is_on_battlefield() && (!player || soldier->owner().is_hostile(*player)) &&
      soldier->get_current_health())
   return true;

 return false;
}

and wonder what is the logic for "!player" .... ?

Revision history for this message
GunChleoc (gunchleoc) wrote :

!player is true if the calling object (warehouse, soldier, militarysite or bob) has no owner.

TiborB (tiborb95)
Changed in widelands:
importance: Undecided → Low
status: New → In Progress
assignee: nobody → TiborB (tiborb95)
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: TiborB (tiborb95) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.