mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
added credit check to MERC purchases
fixed appearance of enemy MERC NPC's to show stats when targeted fixed realtime added check to only allow AI during game mode coop git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2167 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -652,8 +652,11 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID)
|
||||
//Set the time and ID of the last hired merc will arrive
|
||||
// LaptopSaveInfo.sLastHiredMerc.iIdOfMerc = HireMercStruct.ubProfileID;
|
||||
// LaptopSaveInfo.sLastHiredMerc.uiArrivalTime = HireMercStruct.uiTimeTillMercArrives;
|
||||
|
||||
|
||||
if(is_networked && (gMercProfiles[ ubMercID ].sSalary > LaptopSaveInfo.iCurrentBalance) )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, sATMText[ 4 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
return(FALSE);//not enough big ones $$$sATMText
|
||||
}
|
||||
bReturnCode = HireMerc( &HireMercStruct );
|
||||
//already have 20 mercs on the team
|
||||
if( bReturnCode == MERC_HIRE_OVER_18_MERCS_HIRED )
|
||||
|
||||
+19
-6
@@ -240,10 +240,10 @@ char ckbag[100];
|
||||
int REPORT_NAME;
|
||||
int WEAPON_READIED_BONUS;
|
||||
|
||||
int ENEMY_ENABLED;
|
||||
int CREATURE_ENABLED;
|
||||
int MILITIA_ENABLED;
|
||||
int CIV_ENABLED;
|
||||
int ENEMY_ENABLED=0;
|
||||
int CREATURE_ENABLED=0;
|
||||
int MILITIA_ENABLED=0;
|
||||
int CIV_ENABLED=0;
|
||||
|
||||
int ALLOW_EQUIP;
|
||||
|
||||
@@ -257,6 +257,8 @@ int START_TEAM_TURN;
|
||||
int readystage = 0;
|
||||
bool status = 0;
|
||||
|
||||
bool wiped;
|
||||
|
||||
bool lockedgui = 0;
|
||||
|
||||
FLOAT DAMAGE_MULTIPLIER;
|
||||
@@ -638,6 +640,7 @@ void recieveHIRE(RPCParameters *rpcParameters)
|
||||
|
||||
pSoldier = &Menptr[iNewIndex];
|
||||
pSoldier->flags.uiStatusFlags |= SOLDIER_PC;
|
||||
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(PLAYER_BSIDE==0)//all vs all only
|
||||
@@ -2191,6 +2194,16 @@ BOOLEAN check_status (void)// any 'enemies' and clients left to fight ??
|
||||
gTacticalStatus.Team[x].bMenInSector=0;
|
||||
}
|
||||
}
|
||||
if( (gTacticalStatus.Team[ 0 ].bTeamActive == 0) && wiped==0)//server's team has been knocked out
|
||||
{
|
||||
wiped=1;
|
||||
ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[40] );
|
||||
gTacticalStatus.uiFlags |= SHOW_ALL_MERCS;//hayden
|
||||
ScreenMsg( FONT_YELLOW, MSG_CHAT, MPClientMessage[41] );
|
||||
teamwiped();
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, MPClientMessage[42] );
|
||||
|
||||
}
|
||||
if((gTacticalStatus.Team[ 0 ].bTeamActive==1 || gTacticalStatus.Team[ 6 ].bTeamActive==1 || gTacticalStatus.Team[ 7 ].bTeamActive==1 || gTacticalStatus.Team[ 0 ].bTeamActive==1 || gTacticalStatus.Team[ 9 ].bTeamActive==1 )&& NumEnemyInSector() > 0)return(TRUE);
|
||||
else return(FALSE);
|
||||
|
||||
@@ -2428,7 +2441,7 @@ void sendRT(void)
|
||||
|
||||
void gotoRT(RPCParameters *rpcParameters)
|
||||
{
|
||||
getReal=true;
|
||||
getReal=true;//MAY NOT BE NEEDED ANY MORE
|
||||
|
||||
gTacticalStatus.bConsNumTurnsNotSeen = 0;
|
||||
gTacticalStatus.ubCurrentTeam = OUR_TEAM;
|
||||
@@ -2570,7 +2583,7 @@ void connect_client ( void )
|
||||
char port[30];
|
||||
// char client_number[30];
|
||||
char sector_edge[30];
|
||||
|
||||
wiped=0;
|
||||
|
||||
//disable cheating
|
||||
gubCheatLevel = 0;
|
||||
|
||||
@@ -59,4 +59,5 @@ extern int WEAPON_READIED_BONUS;
|
||||
void teamwiped (void);
|
||||
|
||||
BOOLEAN check_status (void);
|
||||
extern UINT8 NumEnemyInSector( );
|
||||
extern UINT8 NumEnemyInSector( );
|
||||
extern INT8 NumActiveAndConsciousTeamMembers( UINT8 ubTeam );
|
||||
@@ -471,13 +471,17 @@ void start_server (void)
|
||||
|
||||
gsMAX_MERCS=atoi(max_merc);
|
||||
gsTESTING = atoi(test);
|
||||
////
|
||||
|
||||
gsPLAYER_BSIDE = atoi(player_bside);
|
||||
|
||||
if(gsPLAYER_BSIDE==2)//only enable ai during coop
|
||||
{
|
||||
ENEMY_ENABLED =atoi(bteam1_enabled);
|
||||
CREATURE_ENABLED =atoi(bteam2_enabled);
|
||||
MILITIA_ENABLED =atoi(bteam3_enabled);
|
||||
CIV_ENABLED =atoi(bteam4_enabled);
|
||||
|
||||
gsPLAYER_BSIDE = atoi(player_bside);
|
||||
}
|
||||
|
||||
gsSAME_MERC = atoi(hire_same_merc);
|
||||
gsDAMAGE_MULTIPLIER =(FLOAT)atof(net_div);
|
||||
|
||||
+5
-17
@@ -5932,16 +5932,10 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen )
|
||||
|
||||
|
||||
|
||||
if(is_server && check_status())
|
||||
{
|
||||
if(NumActiveAndConsciousTeamMembers( 0 ) ==0)
|
||||
{
|
||||
//ScreenMsg( FONT_LTGREEN, MSG_CHAT, L"still some left");
|
||||
}
|
||||
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
//if(is_server && check_status())
|
||||
//{
|
||||
// return(FALSE);
|
||||
//}
|
||||
|
||||
|
||||
// We can only check for end of combat if in combat mode
|
||||
@@ -6149,13 +6143,7 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
||||
|
||||
if(is_server && check_status())
|
||||
{
|
||||
if(NumActiveAndConsciousTeamMembers( 0 ) ==0)
|
||||
{
|
||||
//ScreenMsg( FONT_LTGREEN, MSG_CHAT, L"still some left");
|
||||
}
|
||||
|
||||
|
||||
return(FALSE);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
// ATE: If attack busy count.. get out...
|
||||
|
||||
Reference in New Issue
Block a user