Fixed crash when invisibility cache wasn't cleared correctly

This commit is contained in:
Pauli Nieminen 2008-09-07 18:39:04 +00:00
parent d2e03709c4
commit 2229976653

View File

@ -3007,7 +3007,7 @@ void unit::apply_modifications()
void unit::ambush(const gamemap::location& loc) const
{
invisibility_cache_.find(loc);
clear_visibility_cache();
std::vector<const unit *>::iterator itor =
std::find(units_with_cache.begin(), units_with_cache.end(), this);