added slay

> $$$ 4 iggy
fixed coop
stopped speck talking
preopened merc account
CREATURE_ENABLED = 0 no longer has any effect u can remove it from ur ini
ALLOW_CUSTOM_NIV = 1   -> new server ini variable, please add
added gear cost to MERC's

please feel free to make suggestion on MERC NPC costs...

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2178 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
haydent
2008-05-18 02:53:59 +00:00
parent f17cc948a4
commit 741e5c03bf
7 changed files with 68 additions and 24 deletions
+26 -9
View File
@@ -241,6 +241,7 @@ char ckbag[100];
int REPORT_NAME;
int WEAPON_READIED_BONUS;
int ALLOW_CUSTOM_NIV;
int ENEMY_ENABLED;
int CREATURE_ENABLED;
@@ -567,6 +568,15 @@ void send_hire( UINT8 iNewIndex, UINT8 ubCurrentSoldier, INT16 iTotalContractLen
SOLDIERTYPE *pSoldier = MercPtrs[ iNewIndex ];
pSoldier->ubStrategicInsertionCode=(atoi(SECT_EDGE)); // this sets the param read from the ini for your starting sector edge...
if(ubCurrentSoldier==64)//slay
{
pSoldier->ubBodyType = REGMALE;
//pSoldier->EVENT_InitNewSoldierAnim( STANDING, 0 , TRUE );
gMercProfiles[ pSoldier->ubProfile ].ubBodyType = REGMALE;
}
ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[44], pSoldier->name);
@@ -645,13 +655,18 @@ void recieveHIRE(RPCParameters *rpcParameters)
gMercProfiles[ pSoldier->ubProfile ].ubMiscFlags |= PROFILE_MISC_FLAG_RECRUITED;
if(!SAME_MERC)gMercProfiles[ pSoldier->ubProfile ].bMercStatus = MERC_WORKING_ELSEWHERE;
pSoldier->bSide=0; //default coop only
if(MercCreateStruct.ubProfile==64)//slay
{
pSoldier->ubBodyType = REGMALE;
//pSoldier->EVENT_InitNewSoldierAnim( STANDING, 0 , TRUE );
gMercProfiles[ pSoldier->ubProfile ].ubBodyType = REGMALE;
}
if(PLAYER_BSIDE==0)//all vs all only
{
pSoldier->bSide=1;
//if(MercCreateStruct.bTeam==6)pSoldier->bSide=OP_TEAM_1;
// if(MercCreateStruct.bTeam==7)pSoldier->bSide=OP_TEAM_2;
// if(MercCreateStruct.bTeam==8)pSoldier->bSide=OP_TEAM_3;
// if(MercCreateStruct.bTeam==9)pSoldier->bSide=OP_TEAM_4;
}
if(PLAYER_BSIDE==1) //allow teams
@@ -1846,7 +1861,7 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve
gGameOptions.fIronManMode=cl_lan->sofIronManMode;
gGameOptions.ubBobbyRay=cl_lan->soubBobbyRay;
//gGameOptions.ubInventorySystem=cl_lan->sofNewInv;
if(!cl_lan->soDis_Bobby)LaptopSaveInfo.fBobbyRSiteCanBeAccessed = TRUE;
@@ -1879,6 +1894,8 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve
InitNewGameClock( );
WEAPON_READIED_BONUS=cl_lan->WEAPON_READIED_BONUS;
ALLOW_CUSTOM_NIV=cl_lan->ALLOW_CUSTOM_NIV;
if(ALLOW_CUSTOM_NIV==0)gGameOptions.ubInventorySystem=cl_lan->sofNewInv;
ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[26],cl_lan->client_num,szDefault,cl_lan->cl_edge,cl_lan->team );
@@ -2598,10 +2615,7 @@ void connect_client ( void )
gTacticalStatus.uiFlags&= (~SHOW_ALL_MERCS );
memset( &readyteamreg , 0 , sizeof (int) * 10);
ENEMY_ENABLED=0;
CREATURE_ENABLED=0;
MILITIA_ENABLED=0;
CIV_ENABLED=0;
//retrieve settings from Ja2_mp.ini
char ip[30];
@@ -2688,6 +2702,8 @@ void connect_client ( void )
LaptopSaveInfo.gubLastMercIndex = LAST_MERC_ID;
LaptopSaveInfo.ubLastMercAvailableId = 7;
gGameExternalOptions.fEnableSlayForever =1;
LaptopSaveInfo.gubPlayersMercAccountStatus = 4;
extern BOOLEAN gfTemporaryDisablingOfLoadPendingFlag;
gfTemporaryDisablingOfLoadPendingFlag = TRUE;
@@ -2703,6 +2719,7 @@ void connect_client ( void )
gMercProfiles[ 64 ].sSalary = 1500;
gMercProfiles[ 72 ].sSalary = 1000;
gMercProfiles[ 148 ].sSalary = 100;
gMercProfiles[ 68 ].sSalary = 2200; //iggy;
//**********************
+2 -1
View File
@@ -36,7 +36,7 @@ typedef struct
BOOLEAN sofTurnTimeLimit;
BOOLEAN sofIronManMode;
UINT8 soubBobbyRay;
//BOOLEAN sofNewInv; // WANNE - MP: New inventory: Removed, so now each client can decide if playing with old or new inventory
BOOLEAN sofNewInv;
INT32 gsMAX_MERCS;
UINT8 client_num;
char client_name[30];
@@ -50,6 +50,7 @@ typedef struct
int cl_edge;
float TIME;
int WEAPON_READIED_BONUS;
int ALLOW_CUSTOM_NIV;
} settings_struct;
//typedef struct
+15 -7
View File
@@ -48,6 +48,7 @@ INT32 gssecs_per_tick;
INT32 gsstarting_balance;
float TIME;
int sWEAPON_READIED_BONUS;
int sALLOW_CUSTOM_NIV;
unsigned char SGetPacketIdentifier(Packet *p);
unsigned char SpacketIdentifier;
@@ -342,7 +343,7 @@ void requestSETTINGS(RPCParameters *rpcParameters )
lan.sofIronManMode=gGameOptions.fIronManMode;
lan.starting_balance=gsstarting_balance;
//lan.sofNewInv=gGameOptions.ubInventorySystem;
lan.sofNewInv=gGameOptions.ubInventorySystem;
lan.soDis_Bobby=gsDis_Bobby;
lan.soDis_Equip=gsDis_Equip;
@@ -351,17 +352,15 @@ void requestSETTINGS(RPCParameters *rpcParameters )
memcpy( lan.client_names , client_names, sizeof( char ) * 4 * 30 );
lan.team=clinf->team;
//lan.cl_ops[0]=clinf->cl_ops[0];
//lan.cl_ops[1]=clinf->cl_ops[1];
//lan.cl_ops[2]=clinf->cl_ops[2];
//lan.cl_ops[3]=clinf->cl_ops[3];
//memcpy(lan.cl_ops,clinf->cl_ops,sizeof(int)*4);
////
lan.TESTING=gsTESTING;
lan.cl_edge=clinf->cl_edge;
lan.TIME=TIME;
lan.WEAPON_READIED_BONUS=sWEAPON_READIED_BONUS;
lan.ALLOW_CUSTOM_NIV=sALLOW_CUSTOM_NIV;
server->RPC("recieveSETTINGS",(const char*)&lan, (int)sizeof(settings_struct)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
@@ -474,6 +473,11 @@ void start_server (void)
gsPLAYER_BSIDE = atoi(player_bside);
ENEMY_ENABLED=0;
CREATURE_ENABLED=0;
MILITIA_ENABLED=0;
CIV_ENABLED=0;
if(gsPLAYER_BSIDE==2)//only enable ai during coop
{
ENEMY_ENABLED =atoi(bteam1_enabled);
@@ -499,6 +503,10 @@ if(gsPLAYER_BSIDE==2)//only enable ai during coop
GetPrivateProfileString( "Ja2_mp Settings","WEAPON_READIED_BONUS", "", wpr, MAX_PATH, "..\\Ja2_mp.ini" );
sWEAPON_READIED_BONUS=atoi(wpr);
char acniv[30];
GetPrivateProfileString( "Ja2_mp Settings","ALLOW_CUSTOM_NIV", "", acniv, MAX_PATH, "..\\Ja2_mp.ini" );
sALLOW_CUSTOM_NIV=atoi(acniv);
//**********************