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
parent
9e6b7c31cb
commit
a4a10cf6ec
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue