Fix broken CALL_*_SEEN.

clustObjectSeen() now checks using hasSharedVision(), since clustObjectSeen() is called before DROID::visible is set.

Also, remove the backup of this bug, in scrCBObjectSeen().

Fixes ticket:1855.
master
Cyp 2012-01-04 20:03:02 +01:00
parent 9e6b7c31cb
commit a4a10cf6ec
2 changed files with 2 additions and 6 deletions

View File

@ -520,11 +520,9 @@ void clustObjectSeen(BASE_OBJECT *psObj, BASE_OBJECT *psViewer)
{
ASSERT(psObj->cluster != (UBYTE)~0, "object not in a cluster");
if ( (player != (SDWORD)psObj->player) &&
psObj->visible[player] &&
hasSharedVision(psViewer->player, player) &&
!(aClusterVisibility[psObj->cluster] & (1 << player)))
{
// DBPRINTF(("cluster %d (player %d) seen by player %d\n",
// clustGetClusterID(psObj), psObj->player, player));
aClusterVisibility[psObj->cluster] |= 1 << player;
psScrCBObjSeen = psObj;

View File

@ -523,9 +523,7 @@ static bool scrCBObjectSeen(SDWORD callback)
}
*ppsObj = NULL;
if (((psScrCBObjViewer != NULL) &&
(psScrCBObjViewer->player != player)) ||
!psScrCBObjSeen->visible[player])
if (psScrCBObjViewer != NULL && psScrCBObjViewer->player != player)
{
retval = false;
}