Revert allied visibility patch. It needs more testing.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@573 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
e0c93aec7d
commit
e4c4f4be6f
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include "lib/framework/frame.h"
|
||||
#include "objects.h"
|
||||
#include "map.h"
|
||||
#include "loop.h"
|
||||
|
@ -205,15 +204,22 @@ static BOOL rayTerrainCallback(SDWORD x, SDWORD y, SDWORD dist)
|
|||
}
|
||||
|
||||
// new - ask alex M
|
||||
if (selectedPlayer != rayPlayer && bMultiPlayer && aiCheckAlliances(selectedPlayer, rayPlayer))
|
||||
if( (selectedPlayer!=rayPlayer) AND
|
||||
(bMultiPlayer && game.type == TEAMPLAY && aiCheckAlliances(selectedPlayer,rayPlayer)) )
|
||||
{
|
||||
SET_TILE_VISIBLE(selectedPlayer,psTile);
|
||||
}
|
||||
|
||||
/* Not true visibility - done on sensor range */
|
||||
// new - ask Alex M
|
||||
/* Not true visibility - done on sensor range */
|
||||
|
||||
if(getRevealStatus())
|
||||
{
|
||||
if (rayPlayer == selectedPlayer || (bMultiPlayer && aiCheckAlliances(selectedPlayer, rayPlayer)))
|
||||
if( ((UDWORD)rayPlayer == selectedPlayer) OR
|
||||
// new - ask AM
|
||||
(bMultiPlayer && game.type == TEAMPLAY && aiCheckAlliances(selectedPlayer,rayPlayer)) // can see opponent moving
|
||||
// new - ask AM
|
||||
)
|
||||
{
|
||||
avInformOfChange(x>>TILE_SHIFT,y>>TILE_SHIFT);
|
||||
// SET_TILE_SENSOR(psTile);
|
||||
|
@ -225,8 +231,9 @@ static BOOL rayTerrainCallback(SDWORD x, SDWORD y, SDWORD dist)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* The los ray callback */
|
||||
BOOL rayLOSCallback(SDWORD x, SDWORD y, SDWORD dist)
|
||||
static BOOL rayLOSCallback(SDWORD x, SDWORD y, SDWORD dist)
|
||||
{
|
||||
SDWORD newG; // The new gradient
|
||||
// MAPTILE *psTile;
|
||||
|
@ -516,10 +523,9 @@ BOOL visibleObject(BASE_OBJECT *psViewer, BASE_OBJECT *psTarget)
|
|||
break;
|
||||
}
|
||||
|
||||
// fix to see units and structures of your ally
|
||||
// FIXME: needed? - Per
|
||||
// fix to see units and structures of your ally in teamplay mode
|
||||
/*
|
||||
if(bMultiPlayer && aiCheckAlliances(psViewer->player,psTarget->player))
|
||||
if(bMultiPlayer && game.type == TEAMPLAY && aiCheckAlliances(psViewer->player,psTarget->player))
|
||||
{
|
||||
if( (psViewer->type == OBJ_DROID) OR (psViewer->type == OBJ_STRUCTURE) )
|
||||
{
|
||||
|
@ -843,8 +849,8 @@ void processVisibility(BASE_OBJECT *psObj)
|
|||
|
||||
gridStartIterate((SDWORD)psObj->x, (SDWORD)psObj->y);
|
||||
|
||||
// Allow allies to see your droids
|
||||
if (bMultiPlayer)
|
||||
// Fix for ally vis
|
||||
if( bMultiPlayer && (game.type == TEAMPLAY) )
|
||||
{
|
||||
for(player=0; player<MAX_PLAYERS; player++)
|
||||
{
|
||||
|
@ -897,7 +903,7 @@ void processVisibility(BASE_OBJECT *psObj)
|
|||
}
|
||||
|
||||
// jiggle the visibility for team play
|
||||
if (bMultiPlayer)
|
||||
if (bMultiPlayer && (game.type == TEAMPLAY))
|
||||
{
|
||||
for(player = 0; player < MAX_PLAYERS; player++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue