mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
*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:
Binary file not shown.
@@ -115,7 +115,7 @@ unsigned char packetIdentifier;
|
|||||||
#include "test_space.h"
|
#include "test_space.h"
|
||||||
#include "interface panels.h"
|
#include "interface panels.h"
|
||||||
|
|
||||||
|
#include "game init.h"
|
||||||
|
|
||||||
extern INT8 SquadMovementGroups[ ];
|
extern INT8 SquadMovementGroups[ ];
|
||||||
RakPeerInterface *client;
|
RakPeerInterface *client;
|
||||||
@@ -2408,6 +2408,7 @@ void UpdateSoldierFromNetwork (RPCParameters *rpcParameters)
|
|||||||
{
|
{
|
||||||
gTacticalStatus.usTactialTurnLimitCounter = SUpdateNetworkSoldier->usTactialTurnLimitCounter;
|
gTacticalStatus.usTactialTurnLimitCounter = SUpdateNetworkSoldier->usTactialTurnLimitCounter;
|
||||||
gTacticalStatus.usTactialTurnLimitMax = SUpdateNetworkSoldier->usTactialTurnLimitMax;
|
gTacticalStatus.usTactialTurnLimitMax = SUpdateNetworkSoldier->usTactialTurnLimitMax;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2760,6 +2761,7 @@ void connect_client ( void )
|
|||||||
if( !is_connected && !is_connecting)
|
if( !is_connected && !is_connecting)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
recieved_settings=0;
|
recieved_settings=0;
|
||||||
goahead = 0;
|
goahead = 0;
|
||||||
numready = 0;
|
numready = 0;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
extern int readyteamreg[10];
|
extern int readyteamreg[10];
|
||||||
|
|
||||||
|
extern bool NOGEAR;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
UINT16 soldier_id;
|
UINT16 soldier_id;
|
||||||
@@ -49,6 +51,7 @@ void unlock (void);
|
|||||||
void UpdateSoldierToNetwork ( SOLDIERTYPE *pSoldier );
|
void UpdateSoldierToNetwork ( SOLDIERTYPE *pSoldier );
|
||||||
|
|
||||||
extern BOOLEAN gfUIInterfaceSetBusy;
|
extern BOOLEAN gfUIInterfaceSetBusy;
|
||||||
|
void TrashAllSoldiers( );
|
||||||
|
|
||||||
void kick_player (void);
|
void kick_player (void);
|
||||||
void overide_turn (void);
|
void overide_turn (void);
|
||||||
|
|||||||
+2
-25
@@ -23,7 +23,7 @@ INT32 gsMAX_MERCS;
|
|||||||
bool gsMORALE;
|
bool gsMORALE;
|
||||||
int gsREPORT_NAME;
|
int gsREPORT_NAME;
|
||||||
|
|
||||||
|
#include "game init.h"
|
||||||
|
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "connect.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)
|
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[1]);
|
||||||
ScreenMsg( FONT_LTBLUE, MSG_CHAT, MPServerMessage[2]);
|
ScreenMsg( FONT_LTBLUE, MSG_CHAT, MPServerMessage[2]);
|
||||||
is_server = true;
|
is_server = true;
|
||||||
|
|
||||||
connect_client();//connect client to server
|
connect_client();//connect client to server
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ bool ovh_ready;
|
|||||||
#include "opplist.h"
|
#include "opplist.h"
|
||||||
#include "fresh_header.h"
|
#include "fresh_header.h"
|
||||||
//int cnt = 40;
|
//int cnt = 40;
|
||||||
|
#include "game init.h"
|
||||||
|
|
||||||
void test_func2 (void)//now bound to "0"
|
void test_func2 (void)//now bound to "0"
|
||||||
{
|
{
|
||||||
|
|||||||
+11
-16
@@ -49,6 +49,7 @@
|
|||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
#include "fresh_header.h"
|
||||||
|
|
||||||
// THESE 3 DIFFICULTY FACTORS MUST ALWAYS ADD UP TO 100% EXACTLY!!!
|
// THESE 3 DIFFICULTY FACTORS MUST ALWAYS ADD UP TO 100% EXACTLY!!!
|
||||||
#define DIFF_FACTOR_PLAYER_PROGRESS 50
|
#define DIFF_FACTOR_PLAYER_PROGRESS 50
|
||||||
@@ -430,6 +431,8 @@ SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT8 *
|
|||||||
*pubID = NOBODY;
|
*pubID = NOBODY;
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("TacticalCreateSoldier"));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("TacticalCreateSoldier"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INT8 tbTeam;
|
INT8 tbTeam;
|
||||||
BOOLEAN tfPP;
|
BOOLEAN tfPP;
|
||||||
tbTeam=pCreateStruct->bTeam;
|
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(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);
|
send_AI(pCreateStruct,pubID);
|
||||||
}
|
}
|
||||||
if(is_client && !is_server && tfPP==1)
|
if(is_client && !is_server && tfPP==1)
|
||||||
{
|
{
|
||||||
pCreateStruct->fPlayerPlan = 0;
|
pCreateStruct->fPlayerPlan = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(is_networked && (pCreateStruct->bBodyType==23 || pCreateStruct->bBodyType==24))
|
||||||
|
{
|
||||||
|
ScreenMsg( FONT_YELLOW, MSG_CHAT, L"skipping tank");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//hayden
|
//hayden
|
||||||
//Kris:
|
//Kris:
|
||||||
//Huge no no! See the header file for description of static detailed placements.
|
//Huge no no! See the header file for description of static detailed placements.
|
||||||
|
|||||||
@@ -48,6 +48,8 @@
|
|||||||
#include "Rotting Corpses.h"
|
#include "Rotting Corpses.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "connect.h"
|
||||||
|
|
||||||
#include "Map Edgepoints.h"
|
#include "Map Edgepoints.h"
|
||||||
BOOLEAN gfOriginalList = TRUE;
|
BOOLEAN gfOriginalList = TRUE;
|
||||||
|
|
||||||
@@ -716,7 +718,13 @@ BOOLEAN AddPlacementToWorld( SOLDIERINITNODE *curr, GROUP *pGroup = NULL )
|
|||||||
}
|
}
|
||||||
|
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("AddPlacementToWorld: create soldier"));
|
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 );
|
pSoldier = TacticalCreateSoldier( &tempDetailedPlacement, &ubID );
|
||||||
|
|
||||||
|
|
||||||
if( pSoldier )
|
if( pSoldier )
|
||||||
{
|
{
|
||||||
curr->pSoldier = 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"));
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -919,7 +919,7 @@ void StartInterrupt( void )
|
|||||||
// pSoldier = MercPtrs[ubFirstInterrupter];
|
// pSoldier = MercPtrs[ubFirstInterrupter];
|
||||||
|
|
||||||
//if ( gTacticalStatus.ubCurrentTeam == OUR_TEAM)
|
//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're being interrupted by the computer!
|
||||||
// we delay displaying any interrupt message until the computer
|
// we delay displaying any interrupt message until the computer
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Soldier Macros.h"
|
#include "Soldier Macros.h"
|
||||||
|
#include "connect.h"
|
||||||
//forward declarations of common classes to eliminate includes
|
//forward declarations of common classes to eliminate includes
|
||||||
class OBJECTTYPE;
|
class OBJECTTYPE;
|
||||||
class SOLDIERTYPE;
|
class SOLDIERTYPE;
|
||||||
@@ -2280,7 +2280,11 @@ void SpreadEffect( INT16 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT8 ubOwner,
|
|||||||
fSmokeEffect = TRUE;
|
fSmokeEffect = TRUE;
|
||||||
break;
|
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
|
// Set values for recompile region to optimize area we need to recompile for MPs
|
||||||
gsRecompileAreaTop = sGridNo / WORLD_COLS;
|
gsRecompileAreaTop = sGridNo / WORLD_COLS;
|
||||||
gsRecompileAreaLeft = sGridNo % WORLD_COLS;
|
gsRecompileAreaLeft = sGridNo % WORLD_COLS;
|
||||||
|
|||||||
Reference in New Issue
Block a user