synced merc collapse

'resolved' timer cursor lockups
add new server ini variable: DISABLE_SPEC_MODE = 0 
possible lessening of chance for AI to Lockup.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2184 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
haydent
2008-05-19 11:17:48 +00:00
parent 06c9fb60cc
commit 947dcb7e5d
8 changed files with 50 additions and 18 deletions
+15 -3
View File
@@ -243,6 +243,7 @@ char ckbag[100];
int REPORT_NAME;
int WEAPON_READIED_BONUS;
int ALLOW_CUSTOM_NIV;
int DISABLE_SPEC_MODE;
int ENEMY_ENABLED;
int CREATURE_ENABLED;
@@ -1894,6 +1895,7 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve
WEAPON_READIED_BONUS=cl_lan->WEAPON_READIED_BONUS;
ALLOW_CUSTOM_NIV=cl_lan->ALLOW_CUSTOM_NIV;
DISABLE_SPEC_MODE=cl_lan->DISABLE_SPEC_MODE;
if(ALLOW_CUSTOM_NIV==0)
@@ -2268,8 +2270,12 @@ BOOLEAN check_status (void)// any 'enemies' and clients left to fight ??
{
wiped=1;
ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[40] );
gTacticalStatus.uiFlags |= SHOW_ALL_MERCS;//hayden
ScreenMsg( FONT_YELLOW, MSG_CHAT, MPClientMessage[41] );
if(!DISABLE_SPEC_MODE)
{
gTacticalStatus.uiFlags |= SHOW_ALL_MERCS;//hayden
ScreenMsg( FONT_YELLOW, MSG_CHAT, MPClientMessage[41] );
}
else ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"spectator mode disabled");
teamwiped();
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, MPClientMessage[42] );
@@ -2310,7 +2316,7 @@ void UpdateSoldierToNetwork ( SOLDIERTYPE *pSoldier )
SUpdateNetworkSoldier.bLife=pSoldier->stats.bLife;
SUpdateNetworkSoldier.bBleeding=pSoldier->bBleeding;
SUpdateNetworkSoldier.ubNewStance=pSoldier->ubDesiredHeight;
if((gTacticalStatus.ubTopMessageType == PLAYER_TURN_MESSAGE || gTacticalStatus.ubTopMessageType == PLAYER_INTERRUPT_MESSAGE || ((gTacticalStatus.ubTopMessageType == COMPUTER_INTERRUPT_MESSAGE || gTacticalStatus.ubTopMessageType == COMPUTER_TURN_MESSAGE )&& is_server)) && (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT))//update progress bar, not supporting coop yet...
@@ -2354,6 +2360,11 @@ void UpdateSoldierFromNetwork (RPCParameters *rpcParameters)
pSoldier->EVENT_SetSoldierDesiredDirection( SUpdateNetworkSoldier->ubDirection );
//ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"sync ubid:%d dir %d to %d",pSoldier->ubID, pSoldier->ubDirection, SUpdateNetworkSoldier->ubDirection );
}
if(pSoldier->ubDesiredHeight != SUpdateNetworkSoldier->ubNewStance && pSoldier->bCollapsed != TRUE)
{
pSoldier->ChangeSoldierStance( SUpdateNetworkSoldier->ubNewStance );
//ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"update stance");
}
pSoldier->bBleeding=SUpdateNetworkSoldier->bBleeding;
@@ -2719,6 +2730,7 @@ void connect_client ( void )
//INTERRUPTS=0;
DAMAGE_MULTIPLIER=0;
SAME_MERC=0;
DISABLE_SPEC_MODE=0;
GetPrivateProfileString( "Ja2_mp Settings","SERVER_IP", "", ip, MAX_PATH, "..\\Ja2_mp.ini" );
GetPrivateProfileString( "Ja2_mp Settings","SERVER_PORT", "", port, MAX_PATH, "..\\Ja2_mp.ini" );
+3 -1
View File
@@ -71,4 +71,6 @@ BOOLEAN check_status (void);
extern UINT8 NumEnemyInSector( );
extern INT8 NumActiveAndConsciousTeamMembers( UINT8 ubTeam );
void send_heal (SOLDIERTYPE *pSoldier );
void send_heal (SOLDIERTYPE *pSoldier );
extern int DISABLE_SPEC_MODE;
+1
View File
@@ -51,6 +51,7 @@ typedef struct
float TIME;
int WEAPON_READIED_BONUS;
int ALLOW_CUSTOM_NIV;
int DISABLE_SPEC_MODE;
} settings_struct;
//typedef struct
+6
View File
@@ -49,6 +49,7 @@ INT32 gsstarting_balance;
float TIME;
int sWEAPON_READIED_BONUS;
int sALLOW_CUSTOM_NIV;
int sDISABLE_SPEC_MODE;
unsigned char SGetPacketIdentifier(Packet *p);
unsigned char SpacketIdentifier;
@@ -365,6 +366,7 @@ void requestSETTINGS(RPCParameters *rpcParameters )
lan.TIME=TIME;
lan.WEAPON_READIED_BONUS=sWEAPON_READIED_BONUS;
lan.ALLOW_CUSTOM_NIV=sALLOW_CUSTOM_NIV;
lan.DISABLE_SPEC_MODE=sDISABLE_SPEC_MODE;
server->RPC("recieveSETTINGS",(const char*)&lan, (int)sizeof(settings_struct)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
@@ -512,6 +514,10 @@ if(gsPLAYER_BSIDE==2)//only enable ai during coop
GetPrivateProfileString( "Ja2_mp Settings","ALLOW_CUSTOM_NIV", "", acniv, MAX_PATH, "..\\Ja2_mp.ini" );
sALLOW_CUSTOM_NIV=atoi(acniv);
char dspec[30];
GetPrivateProfileString( "Ja2_mp Settings","DISABLE_SPEC_MODE", "", dspec, MAX_PATH, "..\\Ja2_mp.ini" );
sDISABLE_SPEC_MODE=atoi(dspec);
//**********************
+1 -1
View File
@@ -113,7 +113,7 @@ void test_func2 (void)//now bound to "0" //currently displays coordinates of the
SOLDIERTYPE * pSoldier=MercPtrs[ 0 ];
RemoveOneOpponent( pSoldier );
//RemoveOneOpponent( pSoldier );
//SOLDIERTYPE * pSoldier2=MercPtrs[ 127 ];
//
////pSoldier->AdjustNoAPToFinishMove( TRUE );