Remove separate "team play" game mode. We now have proper team play

functionality in the skirmish game mode, so it is not necessary.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2155 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2007-07-21 15:39:00 +00:00
parent 2cce50c2ad
commit ac131d745f
11 changed files with 32 additions and 141 deletions

View File

@ -1663,7 +1663,7 @@ BOOL stageThreeInitialise(void)
setAllPauseStates(FALSE);
/* decide if we have to create teams */
if(game.alliance == ALLIANCES_TEAMS && (game.type == TEAMPLAY || game.type == SKIRMISH))
if(game.alliance == ALLIANCES_TEAMS && game.type == SKIRMISH)
{
createTeamAlliances();

View File

@ -408,7 +408,6 @@ void formAlliance(UBYTE p1, UBYTE p2,BOOL prop,BOOL allowAudio,BOOL allowNotific
{
DROID *psDroid;
char tm1[128];
UBYTE i;
// dont add message if already allied,
if(bMultiPlayer && !(alliances[p1][p2] == ALLIANCE_FORMED) && allowNotification )
@ -436,36 +435,7 @@ void formAlliance(UBYTE p1, UBYTE p2,BOOL prop,BOOL allowAudio,BOOL allowNotific
}
}
// teamplay init others vis.
if(bMultiPlayer && game.type == TEAMPLAY && (p1 == selectedPlayer || p2== selectedPlayer))
{
// THIS BIT ADDED BY AJL 28th april
for(i=0;i<MAX_PLAYERS;i++)
{
//for each alliance with the selectedPlayer make a new one with the newly allied player
if(p2 == selectedPlayer)
{
if ( p1 != i && p2 != i && aiCheckAlliances(p1,i) )
{
if (!aiCheckAlliances(p2,i))
{
formAlliance(p2,i,TRUE,FALSE,TRUE);
}
}
}
else
{
if( p1 != i && p2 != i && aiCheckAlliances(p2,i) )
{
if (!aiCheckAlliances(p1,i))
{
formAlliance(p1,i,TRUE,FALSE,TRUE);
}
}
}
}
}
else if((bMultiPlayer || game.type == SKIRMISH) && game.alliance == ALLIANCES_TEAMS) //not campaign and alliances are transitive
if((bMultiPlayer || game.type == SKIRMISH) && game.alliance == ALLIANCES_TEAMS) //not campaign and alliances are transitive
{
giftRadar(p1,p2,FALSE);
giftRadar(p2,p1,FALSE);
@ -518,15 +488,6 @@ void sendAlliance(UBYTE from, UBYTE to, UBYTE state,SDWORD value)
m.type = NET_ALLIANCE;
NETbcast(&m,TRUE);
/*
// teamplay init others vis.
if(bMultiPlayer && state == ALLIANCE_FORMED && game.type == TEAMPLAY && (from == selectedPlayer || to== selectedPlayer))
{
giftRadar(from,to,FALSE);
giftRadar(to,from,FALSE);
}
*/
}
BOOL recvAlliance(NETMSG *pMsg,BOOL allowAudio)

View File

@ -776,16 +776,11 @@ static void addGameOptions(BOOL bRedo)
// _("Deathmatch Mode"), IMAGE_ARENA, IMAGE_ARENA_HI,TRUE); //arena
addMultiBut(psWScreen,MULTIOP_GAMETYPE,MULTIOP_CAMPAIGN,MCOL1, 2 , MULTIOP_BUTW,MULTIOP_BUTH,
_("Campaign Mode"),IMAGE_CAMPAIGN,IMAGE_CAMPAIGN_HI,TRUE); //camp
addMultiBut(psWScreen,MULTIOP_GAMETYPE,MULTIOP_TEAMPLAY,MCOL2, 2 , MULTIOP_BUTW,MULTIOP_BUTH,
_("Team Play"),IMAGE_TEAM,IMAGE_TEAM_HI,TRUE); //teamplay
addMultiBut(psWScreen,MULTIOP_GAMETYPE,MULTIOP_SKIRMISH,MCOL3, 2 , MULTIOP_BUTW,MULTIOP_BUTH,
addMultiBut(psWScreen,MULTIOP_GAMETYPE,MULTIOP_SKIRMISH,MCOL2, 2 , MULTIOP_BUTW,MULTIOP_BUTH,
_("Skirmish"),IMAGE_SKIRMISH,IMAGE_SKIRMISH_HI,TRUE); //skirmish
// widgSetButtonState(psWScreen, MULTIOP_ARENA, 0);
widgSetButtonState(psWScreen, MULTIOP_CAMPAIGN, 0);
widgSetButtonState(psWScreen, MULTIOP_TEAMPLAY, 0);
widgSetButtonState(psWScreen, MULTIOP_SKIRMISH, 0);
switch(game.type)
@ -796,9 +791,6 @@ static void addGameOptions(BOOL bRedo)
case CAMPAIGN:
widgSetButtonState(psWScreen,MULTIOP_CAMPAIGN,WBUT_LOCK);
break;
case TEAMPLAY:
widgSetButtonState(psWScreen,MULTIOP_TEAMPLAY,WBUT_LOCK);
break;
case SKIRMISH:
widgSetButtonState(psWScreen,MULTIOP_SKIRMISH,WBUT_LOCK);
break;
@ -808,7 +800,6 @@ static void addGameOptions(BOOL bRedo)
{
widgSetButtonState(psWScreen, MULTIOP_CAMPAIGN, WBUT_DISABLE);
// widgSetButtonState(psWScreen, MULTIOP_ARENA, WBUT_DISABLE);
widgSetButtonState(psWScreen, MULTIOP_TEAMPLAY, WBUT_DISABLE);
}
//just display the game options.
@ -830,9 +821,6 @@ static void addGameOptions(BOOL bRedo)
widgSetButtonState(psWScreen, MULTIOP_FOG_OFF,WBUT_LOCK);
}
if(game.type != TEAMPLAY)
{
// alliances
// if(game.type == DMATCH)
// {
@ -877,7 +865,6 @@ static void addGameOptions(BOOL bRedo)
widgSetButtonState(psWScreen, MULTIOP_ALLIANCE_TEAMS,WBUT_LOCK);
break;
}
}
/* if(game.type == DMATCH)
{
@ -914,7 +901,7 @@ static void addGameOptions(BOOL bRedo)
widgSetButtonState(psWScreen, MULTIOP_FNAME_ICON,WBUT_DISABLE);
}
if(game.type == CAMPAIGN || game.type == SKIRMISH || game.type == TEAMPLAY)
if(game.type == CAMPAIGN || game.type == SKIRMISH)
{
// pow levels
@ -966,7 +953,7 @@ static void addGameOptions(BOOL bRedo)
}
}
if(game.type == CAMPAIGN || game.type == TEAMPLAY)
if (game.type == CAMPAIGN)
{
//type opposition/no computer opposition
@ -1615,7 +1602,6 @@ static void disableMultiButs(void)
if(game.type != CAMPAIGN) widgSetButtonState(psWScreen, MULTIOP_CAMPAIGN, WBUT_DISABLE);
// if(game.type != DMATCH) widgSetButtonState(psWScreen, MULTIOP_ARENA, WBUT_DISABLE);
if(game.type != SKIRMISH) widgSetButtonState(psWScreen, MULTIOP_SKIRMISH, WBUT_DISABLE);
if(game.type != TEAMPLAY) widgSetButtonState(psWScreen, MULTIOP_TEAMPLAY, WBUT_DISABLE);
if(! NetPlay.bHost)
{
@ -1635,7 +1621,7 @@ static void disableMultiButs(void)
if(!game.bComputerPlayers) widgSetButtonState(psWScreen, MULTIOP_COMPUTER_Y,WBUT_DISABLE);
}
if( game.type == CAMPAIGN || game.type == TEAMPLAY || game.type == SKIRMISH)
if( game.type == CAMPAIGN || game.type == SKIRMISH)
{
if(game.base != CAMP_CLEAN) widgSetButtonState(psWScreen,MULTIOP_CLEAN ,WBUT_DISABLE); // camapign subtype.
if(game.base != CAMP_BASE) widgSetButtonState(psWScreen,MULTIOP_BASE ,WBUT_DISABLE);
@ -1802,7 +1788,6 @@ static void processMultiopWidgets(UDWORD id)
// widgSetButtonState(psWScreen, MULTIOP_ARENA, WBUT_LOCK);
// widgSetButtonState(psWScreen, MULTIOP_CAMPAIGN, 0);
// widgSetButtonState(psWScreen, MULTIOP_SKIRMISH,0);
// widgSetButtonState(psWScreen, MULTIOP_TEAMPLAY,0);
// game.type = DMATCH;
//
// widgSetString(psWScreen, MULTIOP_MAP, "DeadValley");
@ -1818,7 +1803,6 @@ static void processMultiopWidgets(UDWORD id)
// widgSetButtonState(psWScreen, MULTIOP_ARENA, 0);
widgSetButtonState(psWScreen, MULTIOP_CAMPAIGN, WBUT_LOCK);
widgSetButtonState(psWScreen, MULTIOP_SKIRMISH,0);
widgSetButtonState(psWScreen, MULTIOP_TEAMPLAY,0);
game.type = CAMPAIGN;
widgSetString(psWScreen, MULTIOP_MAP, DEFAULTCAMPAIGNMAP);
strcpy(game.map,widgGetString(psWScreen, MULTIOP_MAP));
@ -1831,7 +1815,6 @@ static void processMultiopWidgets(UDWORD id)
// widgSetButtonState(psWScreen, MULTIOP_ARENA, 0);
widgSetButtonState(psWScreen, MULTIOP_CAMPAIGN,0 );
widgSetButtonState(psWScreen, MULTIOP_SKIRMISH,WBUT_LOCK);
widgSetButtonState(psWScreen, MULTIOP_TEAMPLAY,0);
game.type = SKIRMISH;
widgSetString(psWScreen, MULTIOP_MAP, DEFAULTSKIRMISHMAP);
@ -1840,23 +1823,6 @@ static void processMultiopWidgets(UDWORD id)
addGameOptions(FALSE);
break;
case MULTIOP_TEAMPLAY:
// widgSetButtonState(psWScreen, MULTIOP_ARENA, 0);
widgSetButtonState(psWScreen, MULTIOP_CAMPAIGN,0 );
widgSetButtonState(psWScreen, MULTIOP_SKIRMISH,0);
widgSetButtonState(psWScreen, MULTIOP_TEAMPLAY,WBUT_LOCK);
widgSetString(psWScreen, MULTIOP_MAP, DEFAULTCAMPAIGNMAP);
strcpy(game.map,widgGetString(psWScreen, MULTIOP_MAP));
game.type = TEAMPLAY;
game.maxPlayers = 4;
game.alliance = ALLIANCES;
addGameOptions(FALSE);
break;
}
}
@ -3502,10 +3468,6 @@ void displayRemoteGame(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD
{
iV_DrawImage(FrontImages,IMAGE_CAMPAIGN_OVER,x+59,y+3);
}
else if( NETgetGameFlagsUnjoined(i,1) == TEAMPLAY)
{
iV_DrawImage(FrontImages,IMAGE_TEAM_OVER,x+62,y+3);
}
else
{
iV_DrawImage(FrontImages,IMAGE_SKIRMISH_OVER,x+62,y+3); // SKIRMISH

View File

@ -249,7 +249,7 @@ void loadMapPreview(void);
//#define MULTIOP_ARENA 10260
#define MULTIOP_CAMPAIGN 10261
#define MULTIOP_TEAMPLAY 10262
//#define MULTIOP_TEAMPLAY 10262
#define MULTIOP_SKIRMISH 10263

View File

@ -212,7 +212,7 @@ static BOOL enumerateMultiMaps(char *found, UDWORD *players,BOOL first, UBYTE ca
return TRUE;
}
}
else // campaign, teamplay
else // campaign
{
// 'service pack 1'
if(lev->type == MULTI_CAMPAIGN2)
@ -1366,8 +1366,7 @@ static BOOL intCheckAllianceValid( UBYTE player1, UBYTE player2 )
{
UBYTE i, iAlliances, iHumanPlayers;
/* only interested in teamplay */
if ( bMultiPlayer && game.type != TEAMPLAY )
if ( bMultiPlayer )
{
return TRUE;
}
@ -1449,10 +1448,7 @@ void intProcessMultiMenu(UDWORD id)
break;
case ALLIANCE_FORMED:
if(game.type != TEAMPLAY) // cant break state in teamplay..
{
breakAlliance((UBYTE)selectedPlayer,i,TRUE,TRUE); // break an alliance
}
breakAlliance((UBYTE)selectedPlayer,i,TRUE,TRUE); // break an alliance
break;
default:
break;

View File

@ -619,7 +619,6 @@ BOOL multiTemplateSetup(void)
// }
// break;
case TEAMPLAY:
case CAMPAIGN:
for(player=0;player<game.maxPlayers;player++)
{
@ -979,9 +978,7 @@ static BOOL campInit(void)
}
// optionally remove other computer players.
if( ( (game.type == TEAMPLAY || game.type == CAMPAIGN) && !game.bComputerPlayers )
|| (game.type == SKIRMISH)
)
if ((game.type == CAMPAIGN && !game.bComputerPlayers) || game.type == SKIRMISH)
{
for(player=game.maxPlayers;player<MAX_PLAYERS;player++)
{

View File

@ -800,9 +800,7 @@ BOOL SendResearch(UBYTE player,UDWORD index)
m.size =5;
m.type = NET_RESEARCH;
// teamplay games share research....
if(game.type == TEAMPLAY || game.type == SKIRMISH)
if (game.type == SKIRMISH)
{
pPlayerRes = asPlayerResList[player];
pPlayerRes += index;
@ -847,8 +845,7 @@ static BOOL recvResearch(NETMSG *m)
usePower(player, pResearch->researchPower);
}
// teamplay games share research....
if(game.type == TEAMPLAY || game.type == SKIRMISH)
if (game.type == SKIRMISH)
{
for(i=0;i<MAX_PLAYERS;i++)
{

View File

@ -173,7 +173,7 @@ extern UBYTE bDisplayMultiJoiningStatus; // draw load progress?
//#define DMATCH 11 // to easily distinguish game types when joining.
#define CAMPAIGN 12
#define TEAMPLAY 13
//#define TEAMPLAY 13
#define SKIRMISH 14
#define MULTI_SKIRMISH2 18

View File

@ -768,11 +768,10 @@ static void DrawRadarObjects(UBYTE *screen,UDWORD Modulus,UWORD boxSizeH,UWORD b
for(psDroid = apsDroidLists[clan]; psDroid != NULL;
psDroid = psDroid->psNext)
{
if(psDroid->visible[selectedPlayer]
|| godMode
|| (bMultiPlayer && (game.type == TEAMPLAY || game.alliance == ALLIANCES_TEAMS)
&& aiCheckAlliances(selectedPlayer,psDroid->player))
)
if (psDroid->visible[selectedPlayer]
|| godMode
|| (bMultiPlayer && game.alliance == ALLIANCES_TEAMS
&& aiCheckAlliances(selectedPlayer,psDroid->player)))
{
x=(psDroid->x/TILE_UNITS)-RadarScrollX;
y=(psDroid->y/TILE_UNITS)-RadarScrollY;
@ -848,11 +847,10 @@ static void DrawRadarObjects(UBYTE *screen,UDWORD Modulus,UWORD boxSizeH,UWORD b
for(psStruct = apsStructLists[clan]; psStruct != NULL;
psStruct = psStruct->psNext)
{
if(psStruct->visible[selectedPlayer]
|| godMode
|| (bMultiPlayer && (game.type == TEAMPLAY || game.alliance == ALLIANCES_TEAMS)
&& aiCheckAlliances(selectedPlayer,psStruct->player))
)
if (psStruct->visible[selectedPlayer]
|| godMode
|| (bMultiPlayer && game.alliance == ALLIANCES_TEAMS
&& aiCheckAlliances(selectedPlayer,psStruct->player)))
{
x=(psStruct->x/TILE_UNITS)-RadarScrollX;
y=(psStruct->y/TILE_UNITS)-RadarScrollY;

View File

@ -1896,7 +1896,7 @@ CONST_SYMBOL asConstantTable[] =
// { "DMATCH", VAL_INT, FALSE, DMATCH, NULL, NULL, 0.0f },
{ "CAMPAIGN", VAL_INT, FALSE, CAMPAIGN, NULL, NULL, 0.0f },
{ "TEAMPLAY", VAL_INT, FALSE, TEAMPLAY, NULL, NULL, 0.0f },
// { "TEAMPLAY", VAL_INT, FALSE, TEAMPLAY, NULL, NULL, 0.0f },
{ "SKIRMISH", VAL_INT, FALSE, SKIRMISH, NULL, NULL, 0.0f },
{ "CAMP_CLEAN", VAL_INT, FALSE, CAMP_CLEAN, NULL, NULL, 0.0f },

View File

@ -220,26 +220,21 @@ static BOOL rayTerrainCallback(SDWORD x, SDWORD y, SDWORD dist)
psTile->inRange = UBYTE_MAX;
}
// new - ask alex M
if( (selectedPlayer!=rayPlayer) &&
(bMultiPlayer && (game.type == TEAMPLAY || game.alliance == ALLIANCES_TEAMS)
&& aiCheckAlliances(selectedPlayer,rayPlayer)) )
if (selectedPlayer != rayPlayer && bMultiPlayer && game.alliance == ALLIANCES_TEAMS
&& aiCheckAlliances(selectedPlayer, rayPlayer))
{
SET_TILE_VISIBLE(selectedPlayer,psTile); //reveal radar
}
// new - ask Alex M
/* Not true visibility - done on sensor range */
/* Not true visibility - done on sensor range */
if(getRevealStatus())
{
if( ((UDWORD)rayPlayer == selectedPlayer) ||
// new - ask AM
(bMultiPlayer && (game.type == TEAMPLAY || game.alliance == ALLIANCES_TEAMS)
&& aiCheckAlliances(selectedPlayer,rayPlayer)) // can see opponent moving
// new - ask AM
)
if ((UDWORD)rayPlayer == selectedPlayer
|| (bMultiPlayer && game.alliance == ALLIANCES_TEAMS
&& aiCheckAlliances(selectedPlayer, rayPlayer)))
{
// can see opponent moving
avInformOfChange(x>>TILE_SHIFT,y>>TILE_SHIFT); //reveal map
}
}
@ -516,21 +511,6 @@ BOOL visibleObject(BASE_OBJECT *psViewer, BASE_OBJECT *psTarget)
break;
}
// fix to see units and structures of your ally in teamplay mode
/*
if(bMultiPlayer && game.type == TEAMPLAY && aiCheckAlliances(psViewer->player,psTarget->player))
{
if( (psViewer->type == OBJ_DROID) || (psViewer->type == OBJ_STRUCTURE) )
{
if( (psTarget->type == OBJ_DROID) || (psTarget->type == OBJ_STRUCTURE) )
{
return(TRUE);
}
}
}
*/
/* First see if the target is in sensor range */
x = (SDWORD)psViewer->x;
xdiff = x - (SDWORD)psTarget->x;
@ -721,7 +701,7 @@ void processVisibility(BASE_OBJECT *psObj)
gridStartIterate((SDWORD)psObj->x, (SDWORD)psObj->y);
// Make sure allies can see us
if( bMultiPlayer && (game.type == TEAMPLAY || game.alliance == ALLIANCES_TEAMS) )
if (bMultiPlayer && game.alliance == ALLIANCES_TEAMS)
{
for(player=0; player<MAX_PLAYERS; player++)
{
@ -778,7 +758,7 @@ void processVisibility(BASE_OBJECT *psObj)
}
//forward out vision to our allies
if (bMultiPlayer && (game.type == TEAMPLAY || game.alliance == ALLIANCES_TEAMS))
if (bMultiPlayer && game.alliance == ALLIANCES_TEAMS)
{
for(player = 0; player < MAX_PLAYERS; player++)
{