*disable tank spawning, and fix bug causing lack of AI to spawn in maps with snipers or tanks.

*small change associated with hidden interrupts now occuring and not necessarily only being between AI to hopefully stop crashes. (thanks for the call stack!)
*added no gear option 4 MERC
*disable explosions


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2202 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
haydent
2008-05-27 10:01:04 +00:00
parent 15cdb9fb6b
commit 736f2a194d
9 changed files with 39 additions and 49 deletions
Binary file not shown.
+6 -4
View File
@@ -115,7 +115,7 @@ unsigned char packetIdentifier;
#include "test_space.h"
#include "interface panels.h"
#include "game init.h"
extern INT8 SquadMovementGroups[ ];
RakPeerInterface *client;
@@ -1783,7 +1783,7 @@ void requestSETTINGS(void)
cl_name.cl_edge=atoi(SECT_EDGE);
client->RPC("requestSETTINGS",(const char*)&cl_name, (int)sizeof(client_info)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
}
@@ -2408,6 +2408,7 @@ void UpdateSoldierFromNetwork (RPCParameters *rpcParameters)
{
gTacticalStatus.usTactialTurnLimitCounter = SUpdateNetworkSoldier->usTactialTurnLimitCounter;
gTacticalStatus.usTactialTurnLimitMax = SUpdateNetworkSoldier->usTactialTurnLimitMax;
}
}
@@ -2760,6 +2761,7 @@ void connect_client ( void )
if( !is_connected && !is_connecting)
{
recieved_settings=0;
goahead = 0;
numready = 0;
@@ -2805,7 +2807,7 @@ void connect_client ( void )
GetPrivateProfileString( "Ja2_mp Settings","CLIENT_NAME", "", clname, MAX_PATH, "..\\Ja2_mp.ini" );
char op1[30];
@@ -2846,7 +2848,7 @@ void connect_client ( void )
/*netbTeam = (CLIENT_NUM)+5;
ubID_prefix = gTacticalStatus.Team[ netbTeam ].bFirstID;*/
//**********************
+3
View File
@@ -4,6 +4,8 @@
extern int readyteamreg[10];
extern bool NOGEAR;
typedef struct
{
UINT16 soldier_id;
@@ -49,6 +51,7 @@ void unlock (void);
void UpdateSoldierToNetwork ( SOLDIERTYPE *pSoldier );
extern BOOLEAN gfUIInterfaceSetBusy;
void TrashAllSoldiers( );
void kick_player (void);
void overide_turn (void);
+2 -25
View File
@@ -23,7 +23,7 @@ INT32 gsMAX_MERCS;
bool gsMORALE;
int gsREPORT_NAME;
#include "game init.h"
#include "text.h"
#include "connect.h"
@@ -391,30 +391,6 @@ void requestSETTINGS(RPCParameters *rpcParameters )
}
//void rOVH (RPCParameters *rpcParameters)
//{
// ovh_struct* rovhs = (ovh_struct*)rpcParameters->input;
//
//
//
// ++mercs_ready[rovhs->ubid];
// //ncr++;
// nc = server->NumberOfConnections();
//
// if(mercs_ready[rovhs->ubid] >= nc)
// {
// mercs_ready[rovhs->ubid]=0;
// ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"advance %d",rovhs->ubid );
//
// adv aoh;
// aoh.ubid=rovhs->ubid;
//
// server->RPC("advance_ovh_frame",(const char*)&aoh, (int)sizeof(adv)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
//
// }
//
//}
void start_server (void)
{
@@ -593,6 +569,7 @@ if(gsPLAYER_BSIDE==2)//only enable ai during coop
ScreenMsg( FONT_LTBLUE, MSG_CHAT, MPServerMessage[1]);
ScreenMsg( FONT_LTBLUE, MSG_CHAT, MPServerMessage[2]);
is_server = true;
connect_client();//connect client to server
}
else
+1 -1
View File
@@ -104,7 +104,7 @@ bool ovh_ready;
#include "opplist.h"
#include "fresh_header.h"
//int cnt = 40;
#include "game init.h"
void test_func2 (void)//now bound to "0"
{
+11 -16
View File
@@ -49,6 +49,7 @@
#include "connect.h"
#include "message.h"
#include "fresh_header.h"
// THESE 3 DIFFICULTY FACTORS MUST ALWAYS ADD UP TO 100% EXACTLY!!!
#define DIFF_FACTOR_PLAYER_PROGRESS 50
@@ -430,6 +431,8 @@ SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT8 *
*pubID = NOBODY;
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("TacticalCreateSoldier"));
INT8 tbTeam;
BOOLEAN tfPP;
tbTeam=pCreateStruct->bTeam;
@@ -449,28 +452,20 @@ SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT8 *
//if(is_server && tbTeam>0 && tbTeam<5)
if(is_server && tbTeam>0 && tbTeam<5)
{
//if(tbTeam==1 && !ENEMY_ENABLED)
//{
// return NULL;
//}
//if(tbTeam==2 && !CREATURE_ENABLED)
//{
// return NULL;
//}
//if(tbTeam==3 && !MILITIA_ENABLED)
//{
// return NULL;
//}
//if(tbTeam==4 && !CIV_ENABLED)
//{
// return NULL;
//}
send_AI(pCreateStruct,pubID);
}
if(is_client && !is_server && tfPP==1)
{
pCreateStruct->fPlayerPlan = 0;
}
if(is_networked && (pCreateStruct->bBodyType==23 || pCreateStruct->bBodyType==24))
{
ScreenMsg( FONT_YELLOW, MSG_CHAT, L"skipping tank");
return NULL;
}
//hayden
//Kris:
//Huge no no! See the header file for description of static detailed placements.
+9
View File
@@ -48,6 +48,8 @@
#include "Rotting Corpses.h"
#endif
#include "connect.h"
#include "Map Edgepoints.h"
BOOLEAN gfOriginalList = TRUE;
@@ -716,7 +718,13 @@ BOOLEAN AddPlacementToWorld( SOLDIERINITNODE *curr, GROUP *pGroup = NULL )
}
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("AddPlacementToWorld: create soldier"));
if(is_networked && (tempDetailedPlacement.bBodyType==23 || tempDetailedPlacement.bBodyType==24 || tempDetailedPlacement.fOnRoof==1))return TRUE;
pSoldier = TacticalCreateSoldier( &tempDetailedPlacement, &ubID );
if( pSoldier )
{
curr->pSoldier = pSoldier;
@@ -744,6 +752,7 @@ BOOLEAN AddPlacementToWorld( SOLDIERINITNODE *curr, GROUP *pGroup = NULL )
}
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("AddPlacementToWorld: return false"));
if(is_server) ScreenMsg( FONT_YELLOW, MSG_CHAT, L"report this MP error (AddPlacementToWorld-FAIL!)");
return FALSE;
}
+1 -1
View File
@@ -919,7 +919,7 @@ void StartInterrupt( void )
// pSoldier = MercPtrs[ubFirstInterrupter];
//if ( gTacticalStatus.ubCurrentTeam == OUR_TEAM)
if ( pSoldier->bTeam != OUR_TEAM )
if ( pSoldier->bTeam > OUR_TEAM && pSoldier->bTeam < 6)
{
// we're being interrupted by the computer!
// we delay displaying any interrupt message until the computer
+6 -2
View File
@@ -69,7 +69,7 @@
#endif
#include "Soldier Macros.h"
#include "connect.h"
//forward declarations of common classes to eliminate includes
class OBJECTTYPE;
class SOLDIERTYPE;
@@ -2280,7 +2280,11 @@ void SpreadEffect( INT16 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT8 ubOwner,
fSmokeEffect = TRUE;
break;
}
if(is_networked)
{
ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"explosives not coded in MP");
return;
}
// Set values for recompile region to optimize area we need to recompile for MPs
gsRecompileAreaTop = sGridNo / WORLD_COLS;
gsRecompileAreaLeft = sGridNo % WORLD_COLS;