mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
Merged Multi Player Project into main branch
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2144 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4153,14 +4153,12 @@ void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget )
|
||||
{
|
||||
iImpact = HTHImpact( pAttacker->pSoldier, pTarget->pSoldier, ubAccuracy, (BOOLEAN)(fKnife || fClaw) );
|
||||
}
|
||||
|
||||
// WANNE: Why is impact here always set to 0? The impact was calculated a few lines before!
|
||||
//iImpact = 0;
|
||||
|
||||
// WANNE: Just for safty.
|
||||
if (iImpact < 0)
|
||||
iImpact = 0;
|
||||
|
||||
iNewLife = pTarget->pSoldier->stats.bLife - iImpact;
|
||||
|
||||
if( pAttacker->uiFlags & CELL_MERC )
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "Tactical Save.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
extern BOOLEAN InitStrategicMovementCosts();
|
||||
void InitKnowFacilitiesFlags( );
|
||||
|
||||
@@ -386,6 +388,7 @@ void TrashUndergroundSectorInfo()
|
||||
void BuildUndergroundSectorInfoList()
|
||||
{
|
||||
UNDERGROUND_SECTORINFO *curr;
|
||||
SECTORINFO *pSector = NULL;
|
||||
|
||||
TrashUndergroundSectorInfo();
|
||||
|
||||
@@ -582,8 +585,9 @@ void InitNewCampaign()
|
||||
|
||||
BuildUndergroundSectorInfoList();
|
||||
|
||||
// allow overhead view of omerta A9 on game onset
|
||||
SetSectorFlag( 9, 1, 0, SF_ALREADY_VISITED );
|
||||
if (!is_networked)
|
||||
// allow overhead view of omerta A9 on game onset
|
||||
SetSectorFlag( 9, 1, 0, SF_ALREADY_VISITED ); //hayden
|
||||
|
||||
//Generates the initial forces in a new campaign. The idea is to randomize numbers and sectors
|
||||
//so that no two games are the same.
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "Map Information.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
BOOLEAN gfClearCreatureQuest = FALSE;
|
||||
extern UINT32 uiMeanWhileFlags;
|
||||
@@ -933,7 +936,13 @@ void CreatureAttackTown( UINT8 ubSectorID, BOOLEAN fOverrideTest )
|
||||
InitPreBattleInterface( NULL, TRUE );
|
||||
break;
|
||||
case CREATURE_BATTLE_CODE_TACTICALLYADD:
|
||||
PrepareCreaturesForBattle();
|
||||
if (is_networked)
|
||||
{
|
||||
if(is_server && CREATURE_ENABLED)
|
||||
PrepareCreaturesForBattle();
|
||||
}
|
||||
else
|
||||
PrepareCreaturesForBattle();
|
||||
break;
|
||||
}
|
||||
InterruptTime();
|
||||
|
||||
+19
-2
@@ -63,7 +63,8 @@
|
||||
#include "Interface Panels.h"
|
||||
#endif
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
#include "text.h"
|
||||
#include "connect.h"
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
|
||||
@@ -418,7 +419,7 @@ BOOLEAN InitNewGame( BOOLEAN fReset )
|
||||
ClearTacticalMessageQueue( );
|
||||
|
||||
// clear mapscreen messages
|
||||
FreeGlobalMessageList();
|
||||
if(!is_networked)FreeGlobalMessageList(); //hayden
|
||||
|
||||
// IF our first time, go into laptop!
|
||||
if ( gubScreenCount == 0 )
|
||||
@@ -435,6 +436,8 @@ BOOLEAN InitNewGame( BOOLEAN fReset )
|
||||
// this is for the "mercs climbing down from a rope" animation, NOT Skyrider!!
|
||||
ResetHeliSeats( );
|
||||
|
||||
if(!is_networked)
|
||||
{
|
||||
// Setup two new messages!
|
||||
AddPreReadEmail(OLD_ENRICO_1,OLD_ENRICO_1_LENGTH,MAIL_ENRICO, GetWorldTotalMin() );
|
||||
AddPreReadEmail(OLD_ENRICO_2,OLD_ENRICO_2_LENGTH,MAIL_ENRICO, GetWorldTotalMin() );
|
||||
@@ -446,6 +449,7 @@ BOOLEAN InitNewGame( BOOLEAN fReset )
|
||||
{
|
||||
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -509,8 +513,21 @@ BOOLEAN InitNewGame( BOOLEAN fReset )
|
||||
#endif
|
||||
|
||||
|
||||
if(is_networked)
|
||||
{
|
||||
SetLaptopExitScreen( MAP_SCREEN ); //hayden
|
||||
SetPendingNewScreen( MAP_SCREEN );
|
||||
ScreenMsg( MSG_FONT_WHITE, MSG_CHAT, L"------------------------------------------------------");
|
||||
ScreenMsg( MSG_FONT_WHITE, MSG_CHAT, MPHelp[0]);
|
||||
ScreenMsg( MSG_FONT_WHITE, MSG_CHAT, L"------------------------------------------------------");
|
||||
ScreenMsg( MSG_FONT_WHITE, MSG_CHAT, MPHelp[1]);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLaptopExitScreen( INIT_SCREEN );
|
||||
SetPendingNewScreen(LAPTOP_SCREEN);
|
||||
}
|
||||
gubScreenCount = 1;
|
||||
|
||||
//Set the fact the game is in progress
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "Dialogue Control.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
void HourlyQuestUpdate( void );
|
||||
void HourlyLarryUpdate( void );
|
||||
|
||||
@@ -42,6 +43,8 @@ void HandleHourlyUpdate()
|
||||
//if the game hasnt even started yet ( we havent arrived in the sector ) dont process this
|
||||
if ( DidGameJustStart() )
|
||||
return;
|
||||
if(is_networked)
|
||||
return;
|
||||
|
||||
// hourly update of town loyalty
|
||||
HandleTownLoyalty();
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
#include "SaveLoadScreen.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
/* CHRISL: Adjusted settings to allow new Map_Screen_Bottom_800x600.sti to work. This is needed if we
|
||||
want to have the new inventory panel not overlap the message text area. */
|
||||
#define MAP_BOTTOM_X 0
|
||||
@@ -292,13 +294,15 @@ void RenderMapScreenInterfaceBottom( BOOLEAN fForceMapscreenFullRender )
|
||||
|
||||
// render whole panel
|
||||
// HEADROCK Changed this line to accept outside influence through the new boolean:
|
||||
if ( fForceMapscreenFullRender == TRUE || fMapScreenBottomDirty == TRUE )
|
||||
if ( fForceMapscreenFullRender == TRUE || fMapScreenBottomDirty == TRUE)
|
||||
{
|
||||
// get and blt panel
|
||||
GetVideoObject(&hHandle, guiMAPBOTTOMPANEL );
|
||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0, MAP_BOTTOM_X, MAP_BOTTOM_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
GetVideoObject(&hHandle, guiMAPBOTTOMPANEL );
|
||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0, MAP_BOTTOM_X, MAP_BOTTOM_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
|
||||
if( GetSectorFlagStatus( sSelMapX, sSelMapY, ( UINT8 )iCurrentMapSectorZ, SF_ALREADY_VISITED ) == TRUE )
|
||||
// WANNE - MP: Radarmap image should be displayed on every sector in multiplayer game
|
||||
if( GetSectorFlagStatus( sSelMapX, sSelMapY, ( UINT8 )iCurrentMapSectorZ, SF_ALREADY_VISITED ) == TRUE
|
||||
|| is_networked)
|
||||
{
|
||||
GetMapFileName( sSelMapX, sSelMapY, ( UINT8 )iCurrentMapSectorZ, bFilename, TRUE, TRUE );
|
||||
LoadRadarScreenBitmap( bFilename );
|
||||
@@ -1286,6 +1290,12 @@ void EnableDisAbleMapScreenOptionsButton( BOOLEAN fEnable )
|
||||
|
||||
BOOLEAN AllowedToTimeCompress( void )
|
||||
{
|
||||
// WANNE - MP: In multiplayer mode we do not allow compress time, for now.
|
||||
if (is_networked)
|
||||
{
|
||||
return ( FALSE );
|
||||
}
|
||||
|
||||
// if already leaving, disallow any other attempts to exit
|
||||
if ( fLeavingMapScreen )
|
||||
{
|
||||
@@ -1759,6 +1769,10 @@ BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
if ( (( sSelMapX != gWorldSectorX ) || ( sSelMapY != gWorldSectorY ) || (( UINT8 )iCurrentMapSectorZ ) != gbWorldSectorZ ) && is_client) //hayden (PBI only)
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
//if we are map screen sector inventory
|
||||
@@ -1768,6 +1782,13 @@ BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
//hayden
|
||||
if( bExitToWhere == MAP_EXIT_TO_LAPTOP && !allowlaptop && is_networked /*&& (is_client || is_server)*/)
|
||||
{
|
||||
//dont allow it
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// OK to go there, passed all the checks
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
@@ -589,7 +589,6 @@ void CreateDestroyMapInventoryPoolButtons( BOOLEAN fExitFromMapScreen )
|
||||
{
|
||||
DeleteItemDescriptionBox();
|
||||
}
|
||||
|
||||
//DEF: added to remove the 'item blip' from staying on the radar map
|
||||
iCurrentlyHighLightedItem = -1;
|
||||
|
||||
@@ -840,16 +839,16 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if(OK_CONTROLLABLE_MERC( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] ))
|
||||
{
|
||||
if(ItemSlotLimit( &twItem->object, STACK_SIZE_LIMIT ) == 1)
|
||||
{
|
||||
fShowInventoryFlag = TRUE;
|
||||
MAPInternalInitItemDescriptionBox( &twItem->object, 0, MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] );
|
||||
}
|
||||
else if(gpItemPointer == NULL || gpItemPointer->usItem == twItem->object.usItem || ValidAttachment(gpItemPointer->usItem, twItem->object.usItem) == TRUE || ValidAmmoType(twItem->object.usItem, gpItemPointer->usItem) == TRUE)
|
||||
{
|
||||
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
|
||||
fTeamPanelDirty=TRUE;
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
if(ItemSlotLimit( &twItem->object, STACK_SIZE_LIMIT ) == 1)
|
||||
{
|
||||
fShowInventoryFlag = TRUE;
|
||||
MAPInternalInitItemDescriptionBox( &twItem->object, 0, MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] );
|
||||
}
|
||||
else if(gpItemPointer == NULL || gpItemPointer->usItem == twItem->object.usItem || ValidAttachment(gpItemPointer->usItem, twItem->object.usItem) == TRUE || ValidAmmoType(twItem->object.usItem, gpItemPointer->usItem) == TRUE)
|
||||
{
|
||||
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
|
||||
fTeamPanelDirty=TRUE;
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
#include "Air Raid.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
// zoom x and y coords for map scrolling
|
||||
INT32 iZoomX = 0;
|
||||
INT32 iZoomY = 0;
|
||||
@@ -756,41 +758,44 @@ UINT32 DrawMap( void )
|
||||
for ( cnt2 = 1; cnt2 < MAP_WORLD_Y - 1; cnt2++ )
|
||||
{
|
||||
// LATE DESIGN CHANGE: darken sectors not yet visited, instead of those under known enemy control
|
||||
if( GetSectorFlagStatus( cnt, cnt2, ( UINT8 ) iCurrentMapSectorZ, SF_ALREADY_VISITED ) == FALSE )
|
||||
// if ( IsTheSectorPerceivedToBeUnderEnemyControl( cnt, cnt2, ( INT8 )( iCurrentMapSectorZ ) ) )
|
||||
if(!is_networked) //hayden - dont darken anything
|
||||
{
|
||||
if( fShowAircraftFlag && !iCurrentMapSectorZ )
|
||||
if( GetSectorFlagStatus( cnt, cnt2, ( UINT8 ) iCurrentMapSectorZ, SF_ALREADY_VISITED ) == FALSE )
|
||||
// if ( IsTheSectorPerceivedToBeUnderEnemyControl( cnt, cnt2, ( INT8 )( iCurrentMapSectorZ ) ) )
|
||||
{
|
||||
if( !StrategicMap[ cnt + cnt2 * WORLD_MAP_X ].fEnemyAirControlled )
|
||||
if( fShowAircraftFlag && !iCurrentMapSectorZ )
|
||||
{
|
||||
// sector not visited, not air controlled
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_DK_GREEN );
|
||||
if( !StrategicMap[ cnt + cnt2 * WORLD_MAP_X ].fEnemyAirControlled )
|
||||
{
|
||||
// sector not visited, not air controlled
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_DK_GREEN );
|
||||
}
|
||||
else
|
||||
{
|
||||
// sector not visited, controlled and air not
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_DK_RED );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// sector not visited, controlled and air not
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_DK_RED );
|
||||
// not visited
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_BLACK );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// not visited
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_BLACK );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( fShowAircraftFlag && !iCurrentMapSectorZ )
|
||||
{
|
||||
if( !StrategicMap[ cnt + cnt2 * WORLD_MAP_X ].fEnemyAirControlled )
|
||||
if( fShowAircraftFlag && !iCurrentMapSectorZ )
|
||||
{
|
||||
// sector visited and air controlled
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_LT_GREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
// sector visited but not air controlled
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_LT_RED );
|
||||
if( !StrategicMap[ cnt + cnt2 * WORLD_MAP_X ].fEnemyAirControlled )
|
||||
{
|
||||
// sector visited and air controlled
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_LT_GREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
// sector visited but not air controlled
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_LT_RED );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "Render Dirty.h"
|
||||
#include "Font Control.h"
|
||||
#include "Assignments.h"
|
||||
|
||||
#include "Soldier Control.h"
|
||||
#include "Overhead.h"
|
||||
#include "Squads.h"
|
||||
#include "Sound Control.h"
|
||||
@@ -55,6 +55,8 @@
|
||||
#include "Render Fun.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
@@ -5593,20 +5595,38 @@ BOOLEAN HandleTimeCompressWithTeamJackedInAndGearedToGo( void )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// select starting sector (A9 - Omerta)
|
||||
ChangeSelectedMapSector( 9, 1, 0 );
|
||||
|
||||
// load starting sector
|
||||
if ( !SetCurrentWorldSector( 9, 1, 0 ) )
|
||||
if (!is_networked)
|
||||
// select starting sector (A9 - Omerta)
|
||||
ChangeSelectedMapSector( 9, 1, 0 );
|
||||
|
||||
if (is_networked)
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
// load starting sector
|
||||
if ( !SetCurrentWorldSector( gsMercArriveSectorX, gsMercArriveSectorY, 0 ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
//Setup variables in the PBI for this first battle. We need to support the
|
||||
gubPBSectorX = (UINT8)gsMercArriveSectorX;
|
||||
gubPBSectorY = (UINT8)gsMercArriveSectorY;
|
||||
}
|
||||
else
|
||||
{
|
||||
// load starting sector
|
||||
if ( !SetCurrentWorldSector( 9, 1, 0 ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
gubPBSectorX = 9;
|
||||
gubPBSectorY = 1;
|
||||
}
|
||||
|
||||
|
||||
//Setup variables in the PBI for this first battle. We need to support the
|
||||
//non-persistant PBI in case the user goes to mapscreen.
|
||||
gfBlitBattleSectorLocator = TRUE;
|
||||
gubPBSectorX = 9;
|
||||
gubPBSectorY = 1;
|
||||
|
||||
gubPBSectorZ = 0;
|
||||
gubEnemyEncounterCode = ENTERING_ENEMY_SECTOR_CODE;
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#include "email.h"
|
||||
#endif
|
||||
|
||||
#include "GameSettings.h"
|
||||
#include "connect.h"
|
||||
|
||||
void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier );
|
||||
void NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( SOLDIERTYPE *pSoldier, BOOLEAN fAddRehireButton );
|
||||
@@ -1488,7 +1490,16 @@ UINT32 GetHourWhenContractDone( SOLDIERTYPE *pSoldier )
|
||||
UINT32 uiArriveHour;
|
||||
|
||||
// Get the arrival hour - that will give us when they arrived....
|
||||
uiArriveHour = ( ( pSoldier->uiTimeSoldierWillArrive ) - ( ( ( pSoldier->uiTimeSoldierWillArrive ) / 1440 ) * 1440 ) ) / 60;
|
||||
if (!is_networked)
|
||||
{
|
||||
uiArriveHour = ( ( pSoldier->uiTimeSoldierWillArrive ) - ( ( ( pSoldier->uiTimeSoldierWillArrive ) / 1440 ) * 1440 ) ) / 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
// WANNE - MP: For multiplayer game, the merc arrive hour is always the game starting time which is now in multiplayer = GameStartingTime + FirstArrivalDelay
|
||||
// Default value: 07:00
|
||||
uiArriveHour = (gGameExternalOptions.iGameStartingTime + gGameExternalOptions.iFirstArrivalDelay - NUM_SEC_IN_DAY) / 3600;
|
||||
}
|
||||
|
||||
return( uiArriveHour );
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "Tactical Save.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
#include "MilitiaSquads.h"
|
||||
#include "Reinforcement.h"
|
||||
|
||||
@@ -765,10 +766,18 @@ void DoMilitiaHelpFromAdjacentSectors( INT16 sMapX, INT16 sMapY )
|
||||
}
|
||||
}
|
||||
|
||||
// If militia have been moved here, no reason to reset--just add them. If militia have not moved, then no strategic
|
||||
// changes were made. Either case, this flag should be false.
|
||||
gfStrategicMilitiaChangesMade = FALSE;
|
||||
if (is_networked)
|
||||
{
|
||||
if (gfStrategicMilitiaChangesMade)
|
||||
{
|
||||
RemoveMilitiaFromTactical();
|
||||
if(is_server && MILITIA_ENABLED)
|
||||
PrepareMilitiaForTactical(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
gfStrategicMilitiaChangesMade = FALSE;
|
||||
}
|
||||
|
||||
void MSCallBack( UINT8 ubResult )
|
||||
{
|
||||
|
||||
@@ -58,6 +58,7 @@ extern BOOLEAN gfExitViewer;
|
||||
extern BOOLEAN fZoomFlag;
|
||||
extern BOOLEAN fMapScreenBottomDirty;
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
BOOLEAN gfTacticalTraversal = FALSE;
|
||||
GROUP *gpTacticalTraversalGroup = NULL;
|
||||
@@ -696,7 +697,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
||||
if( gfAutomaticallyStartAutoResolve || !fRetreatAnOption ||
|
||||
gubEnemyEncounterCode == ENEMY_AMBUSH_CODE ||
|
||||
gubEnemyEncounterCode == BLOODCAT_AMBUSH_CODE ||
|
||||
gubEnemyEncounterCode == CREATURE_ATTACK_CODE )
|
||||
gubEnemyEncounterCode == CREATURE_ATTACK_CODE || is_client)
|
||||
{
|
||||
DisableButton( iPBButton[ 2 ] );
|
||||
SetButtonFastHelpText( iPBButton[ 2 ], gzNonPersistantPBIText[ 9 ] );
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
extern BOOLEAN gfClearCreatureQuest;
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
#include "Reinforcement.h"
|
||||
#include "MilitiaSquads.h"
|
||||
|
||||
@@ -200,6 +201,9 @@ UINT8 NumEnemiesInSector( INT16 sSectorX, INT16 sSectorY )
|
||||
|
||||
pSector = &SectorInfo[ SECTOR( sSectorX, sSectorY ) ];
|
||||
ubNumTroops = (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites);
|
||||
|
||||
if (is_networked)
|
||||
ubNumTroops += numenemyLAN((UINT8)sSectorX,(UINT8)sSectorY ); //hayden
|
||||
|
||||
pGroup = gpGroupList;
|
||||
while( pGroup )
|
||||
@@ -885,7 +889,12 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"QueenCommand");
|
||||
if( pGroup->ubGroupSize <= iMaxEnemyGroupSize && pGroup->pEnemyGroup->ubNumTroops != pGroup->pEnemyGroup->ubTroopsInBattle && !gfPendingEnemies ||
|
||||
pGroup->ubGroupSize > iMaxEnemyGroupSize || pGroup->pEnemyGroup->ubNumTroops > 50 || pGroup->pEnemyGroup->ubTroopsInBattle > 50 )
|
||||
{
|
||||
DoScreenIndependantMessageBox( L"Group troop counters are bad. What were the last 2-3 things to die, and how? Save game and send to KM with info!!!", MSG_BOX_FLAG_OK, NULL );
|
||||
// haydent
|
||||
if (!is_client)
|
||||
{
|
||||
DoScreenIndependantMessageBox( L"Group troop counters are bad. What were the last 2-3 things to die, and how? Save game and send to KM with info!!!", MSG_BOX_FLAG_OK, NULL );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -986,7 +995,8 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"QueenCommand");
|
||||
!pSector->ubNumTroops || !pSector->ubTroopsInBattle ||
|
||||
pSector->ubNumTroops > 100 || pSector->ubTroopsInBattle > 32 )
|
||||
{
|
||||
DoScreenIndependantMessageBox( L"Sector troop counters are bad. What were the last 2-3 things to die, and how? Save game and send to KM with info!!!", MSG_BOX_FLAG_OK, NULL );
|
||||
if(!is_client)DoScreenIndependantMessageBox( L"Sector troop counters are bad. What were the last 2-3 things to die, and how? Save game and send to KM with info!!!", MSG_BOX_FLAG_OK, NULL );
|
||||
//disabled: hayden.
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1195,6 +1205,12 @@ void AddPossiblePendingEnemiesToBattle()
|
||||
GROUP **pGroupInSectorList;
|
||||
static UINT8 ubPredefinedInsertionCode = 255;
|
||||
|
||||
// haydent
|
||||
if ((is_client && !is_server) || !ENEMY_ENABLED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// check if no world is loaded
|
||||
if ( !gWorldSectorX && !gWorldSectorY && (gbWorldSectorZ == -1) )
|
||||
return;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "Inventory Choosing.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
#include "Reinforcement.h"
|
||||
#include "MilitiaSquads.h"
|
||||
|
||||
@@ -391,6 +392,12 @@ void AddPossiblePendingMilitiaToBattle()
|
||||
static UINT8 ubPredefinedInsertionCode = 255;
|
||||
static UINT8 ubPredefinedRank = 255;
|
||||
|
||||
// Haydent
|
||||
if ((is_client && !is_server) || !MILITIA_ENABLED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// if( !PlayerMercsInSector( (UINT8)gWorldSectorX, (UINT8)gWorldSectorY, 0 ) || !CountAllMilitiaInSector( gWorldSectorX, gWorldSectorY )
|
||||
// || !NumEnemiesInSector( gWorldSectorX, gWorldSectorY ) ) return;
|
||||
if( !PlayerMercsInSector( (UINT8)gWorldSectorX, (UINT8)gWorldSectorY, 0 )
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#endif
|
||||
#include "BobbyRMailOrder.h"
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
@@ -75,6 +77,14 @@ void BobbyRayPurchaseEventCallback( UINT8 ubOrderID )
|
||||
|
||||
sStandardMapPos = BOBBYR_SHIPPING_DEST_GRIDNO;
|
||||
|
||||
// Haydent
|
||||
if(gpNewBobbyrShipments[ ubOrderID ].fActive && is_client)
|
||||
{
|
||||
DropOffItemsInSector( ubOrderID );//hayden
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// if the delivery is for meduna, drop the items off there instead
|
||||
if( gpNewBobbyrShipments[ ubOrderID ].fActive && gpNewBobbyrShipments[ ubOrderID ].ubDeliveryLoc == BR_MEDUNA )
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#endif
|
||||
|
||||
#include "MilitiaSquads.h"
|
||||
|
||||
#include "connect.h"
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
@@ -922,7 +922,7 @@ void PrepareForPreBattleInterface( GROUP *pPlayerDialogGroup, GROUP *pInitiating
|
||||
pSoldier = pPlayer->pSoldier;
|
||||
|
||||
if ( pSoldier->stats.bLife >= OKLIFE && !( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) &&
|
||||
!AM_A_ROBOT( pSoldier ) && !AM_AN_EPC( pSoldier ) )
|
||||
!AM_A_ROBOT( pSoldier ) && !AM_AN_EPC( pSoldier ) && !is_client )
|
||||
{
|
||||
ubMercsInGroup[ ubNumMercs ] = pSoldier->ubID;
|
||||
ubNumMercs++;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""..\Standard Gaming Platform";..\TileEngine;..\;..\Tactical;..\Utils;..\tacticalai;..\Editor;..\lua;..\Laptop;.\"
|
||||
AdditionalIncludeDirectories="..\Multiplayer;"..\Standard Gaming Platform";..\TileEngine;..\;..\Tactical;..\Utils;..\tacticalai;..\Editor;..\lua;..\Laptop;.\"
|
||||
PreprocessorDefinitions="PRECOMPILEDHEADERS;_DEBUG;WIN32;_WINDOWS;JA2;_VTUNE_PROFILING;XML_STATIC;CINTERFACE"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
@@ -390,7 +390,7 @@
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForProcessor="3"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
AdditionalIncludeDirectories=""..\Standard Gaming Platform";..\TileEngine;..\;..\Tactical;..\Utils;..\tacticalai;..\Editor;..\Laptop;.\"
|
||||
AdditionalIncludeDirectories="..\Multiplayer;"..\Standard Gaming Platform";..\TileEngine;..\;..\Tactical;..\Utils;..\tacticalai;..\Editor;..\Laptop;.\"
|
||||
PreprocessorDefinitions="PRECOMPILEDHEADERS;NDEBUG;WIN32;_WINDOWS;JA2;XML_STATIC;CINTERFACE"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Version="8.00"
|
||||
Name="Strategic_2005Express"
|
||||
ProjectGUID="{AB8837DB-0435-40C7-916A-0AACF5CFF1C4}"
|
||||
RootNamespace="Strategic_2005Express"
|
||||
@@ -41,6 +41,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\Multiplayer"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -104,6 +105,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
AdditionalIncludeDirectories="..\Multiplayer"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="false"
|
||||
|
||||
+185
-73
@@ -113,8 +113,8 @@
|
||||
#include "Animation Control.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#include "connect.h" //hayden
|
||||
#include "fresh_header.h"
|
||||
// DEFINES
|
||||
|
||||
|
||||
@@ -1078,22 +1078,22 @@ void BeginSellAllCallBack( UINT8 bExitValue )
|
||||
if(pInventoryPoolList[wItem].object.exists() == true && (pInventoryPoolList[wItem].usFlags & WORLD_ITEM_REACHABLE))
|
||||
{
|
||||
if(0 == pInventoryPoolList[wItem].object.MoveThisObjectTo(gItemPointer,-1,0,NUM_INV_SLOTS,MAX_OBJECTS_PER_SLOT))
|
||||
{
|
||||
if (pInventoryPoolList[wItem].object.exists() == false) {
|
||||
pInventoryPoolList[wItem].object.initialize();
|
||||
}
|
||||
// Dirty interface
|
||||
fMapPanelDirty = TRUE;
|
||||
gpItemPointer = &gItemPointer;
|
||||
// Sell Item
|
||||
iPrice += SellItem( gItemPointer );
|
||||
gpItemPointer = NULL;
|
||||
fMapInventoryItem = FALSE;
|
||||
if (iPrice == 0) {
|
||||
iPrice = 1;
|
||||
}
|
||||
anythingSold = true;
|
||||
HandleButtonStatesWhileMapInventoryActive();
|
||||
{
|
||||
if (pInventoryPoolList[wItem].object.exists() == false) {
|
||||
pInventoryPoolList[wItem].object.initialize();
|
||||
}
|
||||
// Dirty interface
|
||||
fMapPanelDirty = TRUE;
|
||||
gpItemPointer = &gItemPointer;
|
||||
// Sell Item
|
||||
iPrice += SellItem( gItemPointer );
|
||||
gpItemPointer = NULL;
|
||||
fMapInventoryItem = FALSE;
|
||||
if (iPrice == 0) {
|
||||
iPrice = 1;
|
||||
}
|
||||
anythingSold = true;
|
||||
HandleButtonStatesWhileMapInventoryActive();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5495,6 +5495,10 @@ UINT32 HandleMapUI( )
|
||||
|
||||
// update destination column for any mercs in transit
|
||||
fTeamPanelDirty = TRUE;
|
||||
|
||||
// added by haydent
|
||||
if (is_networked)
|
||||
ChangeSelectedMapSector( sMapX, sMapY, ( INT8 )iCurrentMapSectorZ );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5902,8 +5906,19 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
StopAnyCurrentlyTalkingSpeech( );
|
||||
break;
|
||||
|
||||
// multiplayer: Roman: Should be changed, because the keys are already bount to another feature
|
||||
case F1:
|
||||
if (is_networked)
|
||||
{
|
||||
mp_help();
|
||||
break;
|
||||
}
|
||||
case F2:
|
||||
if (is_networked)
|
||||
{
|
||||
mp_help2();
|
||||
break;
|
||||
}
|
||||
case F3:
|
||||
case F4:
|
||||
case F5:
|
||||
@@ -6030,6 +6045,11 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (fAlt)
|
||||
{
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case '\\':
|
||||
@@ -6075,13 +6095,53 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
break;
|
||||
|
||||
|
||||
// ROMAN:0 multiplayer: Maybe we need to change the keys, because they are bound to other functions
|
||||
case '1':
|
||||
{
|
||||
if (is_networked)
|
||||
{
|
||||
// haydent
|
||||
start_server();
|
||||
break;
|
||||
}
|
||||
}
|
||||
case '2':
|
||||
{
|
||||
if (is_networked)
|
||||
{
|
||||
// haydent
|
||||
connect_client();
|
||||
break;
|
||||
}
|
||||
}
|
||||
case '3':
|
||||
{
|
||||
if (is_networked)
|
||||
{
|
||||
// haydent
|
||||
start_battle();
|
||||
break;
|
||||
}
|
||||
}
|
||||
case '4':
|
||||
{
|
||||
if (is_networked)
|
||||
{
|
||||
// haydent
|
||||
server_disconnect();
|
||||
client_disconnect();
|
||||
break;
|
||||
}
|
||||
}
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
if (is_networked)
|
||||
{
|
||||
// haydent
|
||||
manual_overide();
|
||||
break;
|
||||
}
|
||||
case '8':
|
||||
case '9':
|
||||
// multi-selects all characters in that squad. SHIFT key and 1-0 for squads 11-20
|
||||
@@ -6223,7 +6283,6 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
if( gfPreBattleInterfaceActive )
|
||||
{ //activate enter sector in prebattle interface.
|
||||
@@ -6236,65 +6295,65 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
SOLDIERTYPE *pSoldier = MercPtrs[ gCharactersList[ bSelectedInfoChar ].usSolID ];
|
||||
if(OK_CONTROLLABLE_MERC( pSoldier ))
|
||||
{
|
||||
if(!fShowMapInventoryPool)
|
||||
if(!fShowMapInventoryPool)
|
||||
{
|
||||
fShowMapInventoryPool = TRUE;
|
||||
CreateDestroyMapInventoryPoolButtons( TRUE );
|
||||
}
|
||||
if(!fShowInventoryFlag)
|
||||
{
|
||||
fShowInventoryFlag = TRUE;
|
||||
}
|
||||
if( fCtrl )
|
||||
{
|
||||
//CHRISL: pickup all items to vehicle
|
||||
if ( UsingNewInventorySystem() == true && fShowInventoryFlag && fShowMapInventoryPool && !(gTacticalStatus.fEnemyInSector) && gGameExternalOptions.fVehicleInventory && (pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE))
|
||||
{
|
||||
fShowMapInventoryPool = TRUE;
|
||||
CreateDestroyMapInventoryPoolButtons( TRUE );
|
||||
}
|
||||
if(!fShowInventoryFlag)
|
||||
{
|
||||
fShowInventoryFlag = TRUE;
|
||||
}
|
||||
if( fCtrl )
|
||||
{
|
||||
//CHRISL: pickup all items to vehicle
|
||||
if ( UsingNewInventorySystem() == true && fShowInventoryFlag && fShowMapInventoryPool && !(gTacticalStatus.fEnemyInSector) && gGameExternalOptions.fVehicleInventory && (pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE))
|
||||
for(unsigned int i = 0; i<pInventoryPoolList.size(); i++)
|
||||
{
|
||||
for(unsigned int i = 0; i<pInventoryPoolList.size(); i++)
|
||||
if(pInventoryPoolList[i].fExists == TRUE && (pInventoryPoolList[i].usFlags & WORLD_ITEM_REACHABLE))
|
||||
{
|
||||
if(pInventoryPoolList[i].fExists == TRUE && (pInventoryPoolList[i].usFlags & WORLD_ITEM_REACHABLE))
|
||||
for(int x = 0; x<NUM_INV_SLOTS; x++)
|
||||
{
|
||||
for(int x = 0; x<NUM_INV_SLOTS; x++)
|
||||
if(vehicleInv[x] == FALSE)
|
||||
continue;
|
||||
if(pSoldier->inv[x].exists() == true)
|
||||
{
|
||||
if(vehicleInv[x] == FALSE)
|
||||
if(pSoldier->inv[x].usItem != pInventoryPoolList[i].object.usItem)
|
||||
continue;
|
||||
if(pSoldier->inv[x].exists() == true)
|
||||
{
|
||||
if(pSoldier->inv[x].usItem != pInventoryPoolList[i].object.usItem)
|
||||
continue;
|
||||
else
|
||||
pInventoryPoolList[i].object.AddObjectsToStack(pSoldier->inv[x], -1, pSoldier, x);
|
||||
}
|
||||
else
|
||||
pInventoryPoolList[i].object.MoveThisObjectTo(pSoldier->inv[x], -1, pSoldier, x);
|
||||
if(pInventoryPoolList[i].object.ubNumberOfObjects < 0)
|
||||
{
|
||||
//RemoveItemFromWorld(i);
|
||||
break;
|
||||
}
|
||||
pInventoryPoolList[i].object.AddObjectsToStack(pSoldier->inv[x], -1, pSoldier, x);
|
||||
}
|
||||
else
|
||||
pInventoryPoolList[i].object.MoveThisObjectTo(pSoldier->inv[x], -1, pSoldier, x);
|
||||
if(pInventoryPoolList[i].object.ubNumberOfObjects < 0)
|
||||
{
|
||||
//RemoveItemFromWorld(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fTeamPanelDirty = TRUE;
|
||||
fMapPanelDirty = TRUE;
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
}
|
||||
fTeamPanelDirty = TRUE;
|
||||
fMapPanelDirty = TRUE;
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
//CHRISL: drop all items
|
||||
if ( bSelectedInfoChar != -1 && fShowInventoryFlag && fShowMapInventoryPool && !(gTacticalStatus.fEnemyInSector) )
|
||||
{
|
||||
//CHRISL: drop all items
|
||||
if ( bSelectedInfoChar != -1 && fShowInventoryFlag && fShowMapInventoryPool && !(gTacticalStatus.fEnemyInSector) )
|
||||
for(int i = BODYPOSFINAL; i<NUM_INV_SLOTS; i++)
|
||||
{
|
||||
for(int i = BODYPOSFINAL; i<NUM_INV_SLOTS; i++)
|
||||
if(pSoldier->inv[i].exists() == true)
|
||||
{
|
||||
if(pSoldier->inv[i].exists() == true)
|
||||
{
|
||||
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo);
|
||||
DeleteObj(&pSoldier->inv[i]);
|
||||
}
|
||||
fTeamPanelDirty = TRUE;
|
||||
fMapPanelDirty = TRUE;
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo);
|
||||
DeleteObj(&pSoldier->inv[i]);
|
||||
}
|
||||
fTeamPanelDirty = TRUE;
|
||||
fMapPanelDirty = TRUE;
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6406,6 +6465,15 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
break;
|
||||
|
||||
// haydent
|
||||
case 'k':
|
||||
if (fAlt)
|
||||
{
|
||||
if (is_networked)
|
||||
kick_player();
|
||||
}
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
if( fAlt )
|
||||
{
|
||||
@@ -7281,11 +7349,26 @@ void PollLeftButtonInMapView( UINT32 *puiNewEvent )
|
||||
|
||||
// ignore left clicks in the map screen if:
|
||||
// game just started or we're in the prebattle interface or if we are about to hit pre-battle
|
||||
if ( ( gTacticalStatus.fDidGameJustStart == TRUE ) ||
|
||||
( gfPreBattleInterfaceActive == TRUE ) ||
|
||||
( fDisableMapInterfaceDueToBattle == TRUE ) )
|
||||
|
||||
|
||||
if (is_networked)
|
||||
{
|
||||
return;
|
||||
if ( /*( gTacticalStatus.fDidGameJustStart == TRUE ) || */
|
||||
// commented out to allow heli drop off change @/b4 start ;)
|
||||
( gfPreBattleInterfaceActive == TRUE ) ||
|
||||
( fDisableMapInterfaceDueToBattle == TRUE ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ( gTacticalStatus.fDidGameJustStart == TRUE ) ||
|
||||
( gfPreBattleInterfaceActive == TRUE ) ||
|
||||
( fDisableMapInterfaceDueToBattle == TRUE ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7642,9 +7725,10 @@ void BltCharInvPanel()
|
||||
}
|
||||
else
|
||||
{
|
||||
InitInventorySoldier(gMapScreenInvPocketXY, MAPInvMoveCallback, MAPInvClickCallback, FALSE, FALSE);
|
||||
//InitializeInvPanelCoordsOld();
|
||||
InitInventorySoldier(gMapScreenInvPocketXY, MAPInvMoveCallback, MAPInvClickCallback, FALSE, FALSE);
|
||||
}
|
||||
|
||||
Blt8BPPDataTo16BPPBufferTransparent( pDestBuf, uiDestPitchBYTES, hCharListHandle, PLAYER_INFO_X, PLAYER_INFO_Y, disOpt);
|
||||
UnLockVideoSurface( guiSAVEBUFFER );
|
||||
|
||||
@@ -11813,6 +11897,11 @@ void TellPlayerWhyHeCantCompressTime( void )
|
||||
// no mercs hired, ever
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapScreenJustStartedHelpText[ 0 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
|
||||
}
|
||||
// WANNE - MP: It is forbidden to compress time in multiplayer
|
||||
else if (is_networked)
|
||||
{
|
||||
ScreenMsg( FONT_LTGREEN, MSG_CHAT, L"You cannot compress time in multiplayer game. Press '3' to start the battle.");
|
||||
}
|
||||
else if ( !AnyUsableRealMercenariesOnTeam() )
|
||||
{
|
||||
// no usable mercs left on team
|
||||
@@ -13515,13 +13604,36 @@ BOOLEAN CanMoveBullseyeAndClickedOnIt( INT16 sMapX, INT16 sMapY )
|
||||
// if in airspace mode, and not plotting paths
|
||||
if( ( fShowAircraftFlag == TRUE ) && ( bSelectedDestChar == -1 ) && ( fPlotForHelicopter == FALSE ) )
|
||||
{
|
||||
// don't allow moving bullseye until after initial arrival
|
||||
if ( gTacticalStatus.fDidGameJustStart == FALSE )
|
||||
if (is_networked)
|
||||
{
|
||||
// if he clicked on the bullseye, and we're on the surface level
|
||||
if ( ( sMapX == gsMercArriveSectorX ) && ( sMapY == gsMercArriveSectorY ) && ( iCurrentMapSectorZ == 0 ) )
|
||||
// haydent
|
||||
if (!is_server && !is_client)
|
||||
{
|
||||
return( TRUE );
|
||||
// if he clicked on the bullseye, and we're on the surface level
|
||||
if ( ( sMapX == gsMercArriveSectorX ) && ( sMapY == gsMercArriveSectorY ) && ( iCurrentMapSectorZ == 0 ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
// haydent
|
||||
else if(is_server)
|
||||
{
|
||||
ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPServerMessage[9] );
|
||||
}
|
||||
else if(is_client)
|
||||
ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[38] );
|
||||
}
|
||||
else
|
||||
{
|
||||
// don't allow moving bullseye until after initial arrival
|
||||
if ( gTacticalStatus.fDidGameJustStart == FALSE )
|
||||
{
|
||||
// if he clicked on the bullseye, and we're on the surface level
|
||||
if ( ( sMapX == gsMercArriveSectorX ) && ( sMapY == gsMercArriveSectorY ) && ( iCurrentMapSectorZ == 0 ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+81
-11
@@ -17,7 +17,7 @@
|
||||
#include <time.h>
|
||||
#include "jascreens.h"
|
||||
#include "worlddef.h"
|
||||
|
||||
#include "Soldier Control.h"
|
||||
#include "overhead.h"
|
||||
#include "interface panels.h"
|
||||
#include "isometric utils.h"
|
||||
@@ -106,6 +106,7 @@
|
||||
#include "cursors.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h" //hayden added alot ""'s to get around client spawing random/different placed AI
|
||||
#include "SaveLoadGame.h"
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
@@ -1746,7 +1747,15 @@ BOOLEAN SetCurrentWorldSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
||||
SetPendingNewScreen(GAME_SCREEN);
|
||||
if( !NumEnemyInSector( ) )
|
||||
{
|
||||
PrepareEnemyForSectorBattle();
|
||||
if (is_networked)
|
||||
{
|
||||
if(is_server && ENEMY_ENABLED)
|
||||
PrepareEnemyForSectorBattle();
|
||||
}
|
||||
else
|
||||
{
|
||||
PrepareEnemyForSectorBattle();
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<TOTAL_SOLDIERS; i++)
|
||||
@@ -1757,7 +1766,15 @@ BOOLEAN SetCurrentWorldSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
||||
if( gubNumCreaturesAttackingTown && !gbWorldSectorZ &&
|
||||
gubSectorIDOfCreatureAttack == SECTOR( gWorldSectorX, gWorldSectorY ) )
|
||||
{
|
||||
PrepareCreaturesForBattle();
|
||||
if (is_networked)
|
||||
{
|
||||
if(is_server && CREATURE_ENABLED)
|
||||
PrepareCreaturesForBattle();
|
||||
}
|
||||
else
|
||||
{
|
||||
PrepareCreaturesForBattle();
|
||||
}
|
||||
}
|
||||
if( gfGotoSectorTransition )
|
||||
{
|
||||
@@ -2054,13 +2071,25 @@ void PrepareLoadedSector()
|
||||
}
|
||||
}
|
||||
}
|
||||
if( fAddCivs )
|
||||
|
||||
if (is_networked)
|
||||
{
|
||||
if( is_server && fAddCivs && CIV_ENABLED)//hayden its around here we apply .ini choices for Ai
|
||||
{
|
||||
AddSoldierInitListTeamToWorld( CIV_TEAM, 255 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddSoldierInitListTeamToWorld( CIV_TEAM, 255 );
|
||||
}
|
||||
|
||||
AddSoldierInitListTeamToWorld( MILITIA_TEAM, 255 );
|
||||
AddSoldierInitListBloodcats();
|
||||
if(is_server && MILITIA_ENABLED)
|
||||
AddSoldierInitListTeamToWorld( MILITIA_TEAM, 255 );
|
||||
|
||||
if(is_server && CREATURE_ENABLED)
|
||||
AddSoldierInitListBloodcats();
|
||||
|
||||
//Creatures are only added if there are actually some of them. It has to go through some
|
||||
//additional checking.
|
||||
|
||||
@@ -2089,9 +2118,21 @@ void PrepareLoadedSector()
|
||||
}
|
||||
#endif
|
||||
|
||||
PrepareCreaturesForBattle();
|
||||
// Haydent
|
||||
if (is_networked)
|
||||
{
|
||||
if(is_server && CREATURE_ENABLED)
|
||||
PrepareCreaturesForBattle();
|
||||
|
||||
PrepareMilitiaForTactical(TRUE);
|
||||
// Haydent
|
||||
if(is_server && MILITIA_ENABLED)
|
||||
PrepareMilitiaForTactical(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
PrepareCreaturesForBattle();
|
||||
PrepareMilitiaForTactical(TRUE);
|
||||
}
|
||||
|
||||
// OK, set varibles for entring this new sector...
|
||||
gTacticalStatus.fVirginSector = TRUE;
|
||||
@@ -2104,11 +2145,28 @@ void PrepareLoadedSector()
|
||||
//AddSoldierInitListTeamToWorld( CIV_TEAM, 255 );
|
||||
// fEnemyPresenceInThisSector = PrepareEnemyForSectorBattle();
|
||||
}
|
||||
AddProfilesNotUsingProfileInsertionData();
|
||||
|
||||
if (is_networked)
|
||||
{
|
||||
if(is_server && CIV_ENABLED)
|
||||
AddProfilesNotUsingProfileInsertionData(); //hayden: is just for civ's
|
||||
}
|
||||
else
|
||||
{
|
||||
AddProfilesNotUsingProfileInsertionData();
|
||||
}
|
||||
|
||||
if( !AreInMeanwhile() || GetMeanwhileID() == INTERROGATION )
|
||||
{
|
||||
fEnemyPresenceInThisSector = PrepareEnemyForSectorBattle();
|
||||
if (is_networked)
|
||||
{
|
||||
if(is_server && ENEMY_ENABLED)
|
||||
fEnemyPresenceInThisSector = PrepareEnemyForSectorBattle();
|
||||
}
|
||||
else
|
||||
{
|
||||
fEnemyPresenceInThisSector = PrepareEnemyForSectorBattle();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4402,7 +4460,14 @@ void UpdateAirspaceControl( void )
|
||||
// if the enemies own the controlling SAM site, and it's in working condition
|
||||
if( ( pSAMStrategicMap->fEnemyControlled ) && ( pSAMStrategicMap->bSAMCondition >= MIN_CONDITION_FOR_SAM_SITE_TO_WORK ) )
|
||||
{
|
||||
fEnemyControlsAir = TRUE;
|
||||
if (is_networked)
|
||||
{
|
||||
fEnemyControlsAir = FALSE; // disable SAM airspace restrictions...
|
||||
}
|
||||
else
|
||||
{
|
||||
fEnemyControlsAir = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5481,6 +5546,11 @@ BOOLEAN CheckAndHandleUnloadingOfCurrentWorld()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(is_client)//hayden - if multiplayer dont kick from level, allow spectate.
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( gTacticalStatus.fDidGameJustStart && gWorldSectorX == 9 && gWorldSectorY == 1 && !gbWorldSectorZ )
|
||||
{
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user