1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Players will be always able to see their owned heroes and other objects. Fixes #1959.

This commit is contained in:
DjWarmonger
2014-12-21 13:56:32 +01:00
parent af02655b30
commit c538370c5d
4 changed files with 9 additions and 4 deletions

View File

@ -2240,6 +2240,10 @@ bool CGameState::isVisible( const CGObjectInstance *obj, boost::optional<PlayerC
if(!player)
return true;
//we should always see our own heroes - but sometimes not visible heroes cause crash :?
if (player == obj->tempOwner)
return true;
if(*player == PlayerColor::NEUTRAL) //-> TODO ??? needed?
return false;
//object is visible when at least one blocked tile is visible