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:
@ -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
|
||||
|
Reference in New Issue
Block a user