Militarysites warn about allies
Bug #1637386 reported by
GunChleoc
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.
Related branches
lp://staging/~widelands-dev/widelands/bug-1637386
- GunChleoc: Approve
-
Diff: 27 lines (+8/-2)1 file modifiedsrc/logic/map_objects/tribes/soldier.cc (+8/-2)
Changed in widelands: | |
importance: | Undecided → Low |
status: | New → In Progress |
assignee: | nobody → TiborB (tiborb95) |
Changed in widelands: | |
status: | In Progress → Fix Committed |
assignee: | TiborB (tiborb95) → nobody |
To post a comment you must log in.
I just looked at:
bool FindBobEnemySol dier::accept( Bob* const imm) const { >is_on_ battlefield( ) && (!player || soldier- >owner( ).is_hostile( *player) ) && >get_current_ health( ))
if (upcast(Soldier, soldier, imm))
if (soldier-
soldier-
return true;
return false;
}
and wonder what is the logic for "!player" .... ?