- UB Improvements / Cleanup (by Jazz)

o Now there are 2 ways to play UB (1.13 and Vanilla): vfs_config.UB113.ini, vfs_config.UBVanilla.ini
o UB: Source Code cleanup: Replaced hardcoded merc profiles with proper ENUMS, ...
o Updated / added UB-Config values


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6330 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-08-28 17:06:43 +00:00
parent ee8d4f6eb9
commit a5abf4d91a
23 changed files with 255 additions and 182 deletions
+1 -1
View File
@@ -1776,7 +1776,7 @@ BOOLEAN AddDeadArmsDealerItemsToWorld( UINT8 ubMercID )
#ifdef JA2UB //RAUL
//Ja25 UB
//if Raul blew him,self up, dont drop any items
if( pSoldier->ubProfile == PERKO /* RAUL */ && IsJa25GeneralFlagSet( JA_GF__RAUL_BLOW_HIMSELF_UP ) )
if( pSoldier->ubProfile == RAUL_UB /* RAUL */ && IsJa25GeneralFlagSet( JA_GF__RAUL_BLOW_HIMSELF_UP ) )
{
return( TRUE );
}
+8 -8
View File
@@ -727,9 +727,9 @@ void HandleDialogue( )
UINT8 ubNumQualifiedMercs=0;
UINT8 ubCnt=0;
if( !( gMercProfiles[ 75 ].ubMiscFlags2 & PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE ) )
if( !( gMercProfiles[ MORRIS_UB ].ubMiscFlags2 & PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE ) )
{
pMorris = FindSoldierByProfileID( 75, FALSE );
pMorris = FindSoldierByProfileID( MORRIS_UB, FALSE );
if ( pMorris && pMorris->stats.bLife >= OKLIFE )
{
sPlayerGridNo = ClosestPC( pMorris, NULL );
@@ -765,7 +765,7 @@ void HandleDialogue( )
//Morris should say a new quote
// CharacterDialogue( MORRIS, QUOTE_ATTACKED_BY_MULTIPLE_CREATURES, gTalkPanel.iFaceIndex, DIALOGUE_NPC_UI, FALSE, FALSE );
TriggerNPCRecord( 75, 2 );
TriggerNPCRecord( MORRIS_UB, 2 );
gfMorrisShouldSayHi = FALSE;
}
@@ -920,7 +920,7 @@ void HandleDialogue( )
gubCurrentTalkingID = QItem->ubCharacterNum;
#ifdef JA2UB
//Ja25: test
if( QItem->ubCharacterNum == 75 ) //MORRIS
if( QItem->ubCharacterNum == MORRIS_UB ) //MORRIS
{
if( QItem->usQuoteNum == 0 )
{
@@ -1333,7 +1333,7 @@ void HandleDialogue( )
pSoldier->ChangeSoldierStance( ANIM_STAND );
//if the soldier is Jerry
if( FindSoldierByProfileID( 76, FALSE ) == pSoldier ) //JERRY
if( FindSoldierByProfileID( JERRY_MILO_UB, FALSE ) == pSoldier ) //JERRY
{
//Play the sound of the Antena breaking
PlayJA2SampleFromFile( "SOUNDS\\Metal Antenna Crunch.wav", RATE_11025, HIGHVOLUME, 1, MIDDLE );
@@ -1349,7 +1349,7 @@ void HandleDialogue( )
//AA
//if ( gGameUBOptions.InGameHeliCrash == TRUE )
if ( gGameUBOptions.JerryQuotes == TRUE )
DelayedMercQuote( 76 , 0xffff, 4 ); //JERRY
DelayedMercQuote( JERRY_MILO_UB , 0xffff, 4 ); //JERRY
//End the ui Lock
guiPendingOverrideEvent = LU_ENDUILOCK;
@@ -3294,7 +3294,7 @@ BOOLEAN AreAllTheMercsFinishedSayingThereInitialHeliCrashQuotes()
}
//See if Jerry is still waiting to get up
pSoldier = FindSoldierByProfileID( 76, FALSE );
pSoldier = FindSoldierByProfileID( JERRY_MILO_UB, FALSE );
if( pSoldier )
{
//if the merc is still not done the initial speech, and still prone
@@ -3312,7 +3312,7 @@ BOOLEAN AreAllTheMercsFinishedSayingThereInitialHeliCrashQuotes()
void InitJerriesSpeechCallBack()
{
//Trigger Jerry Milo's script record 10 ( call action 301 )
TriggerNPCRecord( 76, 10 );
TriggerNPCRecord( JERRY_MILO_UB, 10 );
//Clear the overlay
RemoveJerryMiloBrokenLaptopOverlay();
+2 -2
View File
@@ -482,13 +482,13 @@ void HandleAddingTheEndGameEmails()
fMiguelAlive = TRUE;
//manuel alive
if( gMercProfiles[ 60 ].bMercStatus == MERC_IS_DEAD )
if( gMercProfiles[ MANUEL_UB ].bMercStatus == MERC_IS_DEAD )
fManuelAlive = FALSE;
else
fManuelAlive = TRUE;
//manuel hired
if( gMercProfiles[ 60 ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED )
if( gMercProfiles[ MANUEL_UB ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED )
fManuelHired = TRUE;
else
fManuelHired = FALSE;
+11 -7
View File
@@ -43,6 +43,10 @@
#include "Food.h" // added by Flugente
#endif
#ifdef JA2UB
#include "Ja25_Tactical.h"
#endif
// Defines
#define NUM_FACE_SLOTS 50
@@ -236,21 +240,21 @@ INT32 InternalInitFace( UINT8 usMercProfileID, UINT8 ubSoldierID, UINT32 uiInitF
}
#ifdef JA2UB
else if ( usMercProfileID == 64 )
else if ( usMercProfileID == TEX_UB )
{
// SANDRO - old/new traits check (I am not sure if this is used at all)
if ( gGameOptions.fNewTraitSystem )
{
if ( ProfileHasSkillTrait( 64, RANGER_NT ) > 0 )
if ( ProfileHasSkillTrait( TEX_UB, RANGER_NT ) > 0 )
{
sprintf( VObjectDesc.ImageFile, "FACES\\B64c.sti" );
sprintf( VObjectDesc.ImageFile, "FACES\\B%dc.sti", TEX_UB );
}
}
else
{
if ( ProfileHasSkillTrait( 64, CAMOUFLAGED_OT ) > 0 )
if ( ProfileHasSkillTrait( TEX_UB, CAMOUFLAGED_OT ) > 0 )
{
sprintf( VObjectDesc.ImageFile, "FACES\\B64c.sti" );
sprintf( VObjectDesc.ImageFile, "FACES\\B%dc.sti", TEX_UB );
}
}
}
@@ -664,7 +668,7 @@ void GetFaceRelativeCoordinates( FACETYPE *pFace, UINT16 *pusEyesX, UINT16 *pusE
if ( gGameOptions.fNewTraitSystem )
{
if( usMercProfileID == 64 && ( gMercProfiles[ 64 ].bSkillTraits[0] == RANGER_NT || gMercProfiles[ 64 ].bSkillTraits[1] == RANGER_NT ) )
if( usMercProfileID == TEX_UB && ( gMercProfiles[ TEX_UB ].bSkillTraits[0] == RANGER_NT || gMercProfiles[ TEX_UB ].bSkillTraits[1] == RANGER_NT ) )
{
usEyesX = 13;
usEyesY = 34;
@@ -674,7 +678,7 @@ void GetFaceRelativeCoordinates( FACETYPE *pFace, UINT16 *pusEyesX, UINT16 *pusE
}
else
{
if( usMercProfileID == 64 && ( gMercProfiles[ 64 ].bSkillTraits[0] == CAMOUFLAGED_OT || gMercProfiles[ 64 ].bSkillTraits[1] == CAMOUFLAGED_OT ) )
if( usMercProfileID == TEX_UB && ( gMercProfiles[ TEX_UB ].bSkillTraits[0] == CAMOUFLAGED_OT || gMercProfiles[ TEX_UB ].bSkillTraits[1] == CAMOUFLAGED_OT ) )
{
usEyesX = 13;
usEyesY = 34;
+15 -24
View File
@@ -4738,7 +4738,7 @@ void DialogueMessageBoxCallBack( UINT8 ubExitValue )
TriggerNPCRecord( ubProfile, 1 );
//if the person is BIGGENS
if( ubProfile == 61 ) //BIGGENS
if( ubProfile == BIGGENS_UB ) //BIGGENS
{
SetFactTrue( FACT_BIGGENS_IS_ON_TEAM );
}
@@ -5229,7 +5229,7 @@ void PerformJerryMiloAction301()
}
//Trigger Jerry Milo's script record 11 ( call action 302 )
TriggerNPCRecord( 76, 11 );
TriggerNPCRecord( JERRY_MILO_UB, 11 );
//Close the dialogue panel
DeleteTalkingMenu();
@@ -5458,28 +5458,19 @@ void CheckForValidQuotesWhenLeavingDealer( UINT8 ubProfile )
if( CheckFact( FACT_MERC_SAY_QUOTE_WHEN_TALK_MENU_CLOSES, 0 ) )
{
switch( ubProfile )
if ( ubProfile == BETTY_UB )
HaveQualifiedMercSayQuoteAboutNpcWhenLeavingTalkScreen( ubProfile, QUOTE_JOINING_CAUSE_BUDDY_1_ON_TEAM );
else if ( ubProfile == RAUL_UB )
{
case 73 : //BETTY:
HaveQualifiedMercSayQuoteAboutNpcWhenLeavingTalkScreen( ubProfile, QUOTE_JOINING_CAUSE_BUDDY_1_ON_TEAM );
break;
case 74 : //RAUL:
//if the Raul is about to blow himself up
if( !IsJa25GeneralFlagSet( JA_GF__RAUL_BLOW_HIMSELF_UP ) )
{
//we can say the quote
HaveQualifiedMercSayQuoteAboutNpcWhenLeavingTalkScreen( ubProfile, QUOTE_JOINING_CAUSE_BUDDY_2_ON_TEAM );
}
break;
case 77: //RUDY:
}
else if ( ubProfile == RUDY_UB )
HaveQualifiedMercSayQuoteAboutNpcWhenLeavingTalkScreen( ubProfile, QUOTE_REFUSAL_RENEW_DUE_TO_MORALE );
break;
default:
AssertMsg( 0, "Code has not been implemented to handle saying a quote when leaving this NPC" );
}
}
}
@@ -5505,7 +5496,7 @@ void HaveBiggensDetonatingExplosivesByTheMine()
SOLDIERTYPE *pSoldier = NULL;
UINT8 ubID=NOBODY;
pSoldier = FindSoldierByProfileID( 61 , FALSE ); //BIGGENS
pSoldier = FindSoldierByProfileID( BIGGENS_UB , FALSE ); //BIGGENS
if( pSoldier != NULL )
{
ubID = pSoldier->ubID;
@@ -5619,7 +5610,7 @@ void HandleCannotAffordNpcMsgBox()
void CantAffordMercCallback( UINT8 ubExitValue )
{
//Make the RPC say a quote
TriggerNPCRecord( 61, 0 ); //BIGGENS
TriggerNPCRecord( BIGGENS_UB, 0 ); //BIGGENS
}
void HandleMercArrivesQuotesFromHeliCrashSequence()
@@ -5655,7 +5646,7 @@ void HandleRaulBlowingHimselfUp()
//blow himself up with, hmmm, lets say TNT. :)
usItem = HAND_GRENADE;
IgniteExplosion( 74, CenterX( pSoldier->sGridNo ), CenterY( pSoldier->sGridNo ), 0, pSoldier->sGridNo, usItem, pSoldier->pathing.bLevel );
IgniteExplosion( RAUL_UB, CenterX( pSoldier->sGridNo ), CenterY( pSoldier->sGridNo ), 0, pSoldier->sGridNo, usItem, pSoldier->pathing.bLevel );
SetJa25GeneralFlag( JA_GF__RAUL_BLOW_HIMSELF_UP );
}
@@ -5668,7 +5659,7 @@ void HandleTexFlushingToilet()
void HandleTexMakingHimselfAlreadyBeIntroduced()
{
gMercProfiles[ 64 ].ubLastDateSpokenTo = GetWorldDay( );
gMercProfiles[ TEX_UB ].ubLastDateSpokenTo = GetWorldDay( );
}
void HandleTexBecomingCamoed()
@@ -5676,7 +5667,7 @@ void HandleTexBecomingCamoed()
SOLDIERTYPE *pSoldier=NULL;
//Find TEX
pSoldier = FindSoldierByProfileID( 64, FALSE );
pSoldier = FindSoldierByProfileID( TEX_UB, FALSE );
//if we found him
if( pSoldier != NULL )
@@ -5690,11 +5681,11 @@ void HandleTexBecomingCamoed()
// SANDRO - old/new traits check (I am not sure if this is used at all)
if ( gGameOptions.fNewTraitSystem )
{
gMercProfiles[ 64 ].bSkillTraits[0] = RANGER_NT;
gMercProfiles[ TEX_UB ].bSkillTraits[0] = RANGER_NT;
}
else
{
gMercProfiles[ 64 ].bSkillTraits[0] = CAMOUFLAGED_OT;
gMercProfiles[ TEX_UB ].bSkillTraits[0] = CAMOUFLAGED_OT;
}
//Close down the talking menu...
@@ -5704,7 +5695,7 @@ void HandleTexBecomingCamoed()
// Trigger Tex to say the quote, this will cause the radio locater to come up giving a pause to make it appear that he
// put on camoflauge
TriggerNPCRecord( 64, 15 );
TriggerNPCRecord( TEX_UB, 15 );
}
void DisplayJerryBreakingLaptopTransmitterPopup()
+44 -34
View File
@@ -215,6 +215,19 @@ UINT32 CALICO_900_UB;
UINT32 CLIP_CANNON_BALL;
UINT8 MANUEL_UB;
UINT8 BIGGENS_UB;
UINT8 JOHN_K_UB;
UINT8 TEX_UB;
UINT8 GASTON_UB;
UINT8 STOGIE_UB;
UINT8 JERRY_MILO_UB;
UINT8 PGMALE4_UB;
UINT8 BETTY_UB;
UINT8 RAUL_UB;
UINT8 MORRIS_UB;
UINT8 RUDY_UB;
void Old_UB_Inventory ();
void New_UB_Inventory ();
@@ -311,12 +324,12 @@ void InitGridNoUB()
BOOLEAN IsSoldierQualifiedMerc( SOLDIERTYPE *pSoldier )
{
if( pSoldier->ubProfile == 58 || /// GASTON
pSoldier->ubProfile == 59 || // STOGIE
pSoldier->ubProfile == 64 ||// TEX ||
pSoldier->ubProfile == 62 || //JOHN_K ||
pSoldier->ubProfile == 61 || //BIGGENS ||
pSoldier->ubProfile == 60 || //MANUEL ||
if( pSoldier->ubProfile == GASTON_UB || /// GASTON
pSoldier->ubProfile == STOGIE_UB || // STOGIE
pSoldier->ubProfile == TEX_UB ||// TEX ||
pSoldier->ubProfile == JOHN_K_UB || //JOHN_K ||
pSoldier->ubProfile == BIGGENS_UB || //BIGGENS ||
pSoldier->ubProfile == MANUEL_UB || //MANUEL ||
pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__PLAYER_CHARACTER
)
{
@@ -331,10 +344,10 @@ BOOLEAN IsSoldierQualifiedMerc( SOLDIERTYPE *pSoldier )
BOOLEAN IsSoldierQualifiedMercForSeeingPowerGenFan( SOLDIERTYPE *pSoldier )
{
if( pSoldier->ubProfile == 60 ||//MANUEL ||
if( pSoldier->ubProfile == MANUEL_UB ||//MANUEL ||
pSoldier->ubProfile == 53 || //PGCMale3
pSoldier->ubProfile == 55 || //PGCFem2
pSoldier->ubProfile == 57 //PGCMale4
pSoldier->ubProfile == PGMALE4_UB //PGCMale4
)
{
return( TRUE );
@@ -348,9 +361,9 @@ BOOLEAN IsSoldierQualifiedMercForSeeingPowerGenFan( SOLDIERTYPE *pSoldier )
BOOLEAN IsSoldierQualifiedGunCommenterMerc( SOLDIERTYPE *pSoldier )
{
if( pSoldier->ubProfile == 58 || // GASTON
pSoldier->ubProfile == 59 || // STOGIE
pSoldier->ubProfile == 64 || // TEX
if( pSoldier->ubProfile == GASTON_UB || // GASTON
pSoldier->ubProfile == STOGIE_UB || // STOGIE
pSoldier->ubProfile == TEX_UB || // TEX
pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__PLAYER_CHARACTER
)
{
@@ -365,8 +378,8 @@ BOOLEAN IsSoldierQualifiedGunCommenterMerc( SOLDIERTYPE *pSoldier )
BOOLEAN IsSoldierQualifiedInitialHireMerc( SOLDIERTYPE *pSoldier )
{
if( pSoldier->ubProfile == 58 || // GASTON
pSoldier->ubProfile == 59 || // STOGIE
if( pSoldier->ubProfile == GASTON_UB || // GASTON
pSoldier->ubProfile == STOGIE_UB || // STOGIE
pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__PLAYER_CHARACTER
)
{
@@ -648,7 +661,7 @@ void StopPowerGenFan()
SetFactTrue( FACT_FAN_STOPPPED );
//Is biggens on the team
pSoldier = FindSoldierByProfileID( 61, TRUE ); // BIGGENS
pSoldier = FindSoldierByProfileID( BIGGENS_UB, TRUE ); // BIGGENS
if( pSoldier != NULL )
{
SetFactTrue( FACT_BIGGENS_ON_TEAM_AND_FAN_STOPPED );
@@ -814,15 +827,15 @@ void HandlePowerGenAlarm()
UINT8 bSoldierId1, bSoldierId2, bSoldierId3;
Get3RandomQualifiedMercs( &bSoldierId1, &bSoldierId2, &bSoldierId3 );
if( bSoldierId1 != -1 && Menptr[ bSoldierId1 ].ubProfile != 61 ) //BIGGENS
if( bSoldierId1 != -1 && Menptr[ bSoldierId1 ].ubProfile != BIGGENS_UB ) //BIGGENS
{
TacticalCharacterDialogue( &Menptr[ bSoldierId1 ], QUOTE_PERSONALITY_BIAS_WITH_MERC_1 );
}
else if( bSoldierId2 != -1 && Menptr[ bSoldierId2 ].ubProfile != 61 ) //BIGGENS
else if( bSoldierId2 != -1 && Menptr[ bSoldierId2 ].ubProfile != BIGGENS_UB ) //BIGGENS
{
TacticalCharacterDialogue( &Menptr[ bSoldierId2 ], QUOTE_PERSONALITY_BIAS_WITH_MERC_1 );
}
else if( bSoldierId3 != -1 && Menptr[ bSoldierId3 ].ubProfile != 61 ) // BIGGENS
else if( bSoldierId3 != -1 && Menptr[ bSoldierId3 ].ubProfile != BIGGENS_UB ) // BIGGENS
{
TacticalCharacterDialogue( &Menptr[ bSoldierId3 ], QUOTE_PERSONALITY_BIAS_WITH_MERC_1 );
}
@@ -981,24 +994,21 @@ void RevealAllDroppedEnemyItems()
*/
void HandlePlayingQuoteWhenHiringNpc( UINT8 ubProfile )
{
switch( ubProfile )
{
case 60://MANUEL:
SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_PRECEDENT_TO_REPEATING_ONESELF );
break;
case 61 : //BIGGENS:
SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_REFUSAL_TO_JOIN_LACK_OF_FUNDS );
break;
case 62 : //JOHN_K:
SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_DEPART_COMMET_CONTRACT_NOT_RENEWED_OR_TERMINATED_UNDER_48 );
if ( ubProfile == MANUEL_UB ) //MANUEL:
SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_PRECEDENT_TO_REPEATING_ONESELF );
else if ( ubProfile == BIGGENS_UB ) //BIGGENS:
SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_REFUSAL_TO_JOIN_LACK_OF_FUNDS );
else if ( ubProfile == JOHN_K_UB ) //JOHN_K:
{
SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_DEPART_COMMET_CONTRACT_NOT_RENEWED_OR_TERMINATED_UNDER_48 );
//Delay John saying quote about town
DelayedMercQuote( 62, QUOTE_HATE_MERC_2_ON_TEAM, GetWorldTotalSeconds() + 5 + Random( 10 ) );
break;
case 64 : //TEX:
DelayedMercQuote( JOHN_K_UB, QUOTE_HATE_MERC_2_ON_TEAM, GetWorldTotalSeconds() + 5 + Random( 10 ) );
}
else if ( ubProfile == TEX_UB ) //TEX:
SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_DEATH_RATE_RENEWAL );
break;
}
}
BOOLEAN SayQuoteFromAllNewHiredMercButDoGastonLast( UINT8 ubProfile, UINT32 uiQuoteNum )
@@ -1019,7 +1029,7 @@ BOOLEAN SayQuoteFromAllNewHiredMercButDoGastonLast( UINT8 ubProfile, UINT32 uiQu
for( iCnt=0; iCnt<bNumMercsPresent; iCnt++ )
{
//Do Gaston and the newly hired RPC last
if( Menptr[ SoldierIdArray[ iCnt ] ].ubProfile == 58 || Menptr[ SoldierIdArray[ iCnt ] ].ubProfile == ubProfile) // GASTON
if( Menptr[ SoldierIdArray[ iCnt ] ].ubProfile == GASTON_UB || Menptr[ SoldierIdArray[ iCnt ] ].ubProfile == ubProfile) // GASTON
{
continue;
}
@@ -1028,7 +1038,7 @@ BOOLEAN SayQuoteFromAllNewHiredMercButDoGastonLast( UINT8 ubProfile, UINT32 uiQu
}
//if Gaston is on the team, say his quote
pSoldier = FindSoldierByProfileID( 58, TRUE ); // GASTON
pSoldier = FindSoldierByProfileID( GASTON_UB, TRUE ); // GASTON
if( pSoldier &&
pSoldier->sSectorX == gWorldSectorX &&
pSoldier->sSectorY == gWorldSectorY &&
+13
View File
@@ -131,6 +131,19 @@ extern UINT32 MICRO_UZI_UB;
extern UINT32 CALICO_950_UB;
extern UINT32 CALICO_900_UB;
extern UINT8 MANUEL_UB;
extern UINT8 BIGGENS_UB;
extern UINT8 JOHN_K_UB;
extern UINT8 TEX_UB;
extern UINT8 GASTON_UB;
extern UINT8 STOGIE_UB;
extern UINT8 JERRY_MILO_UB;
extern UINT8 PGMALE4_UB;
extern UINT8 BETTY_UB;
extern UINT8 RAUL_UB;
extern UINT8 MORRIS_UB;
extern UINT8 RUDY_UB;
extern void Old_UB_Inventory ();
extern void New_UB_Inventory ();
+10 -10
View File
@@ -183,7 +183,7 @@ INT8 HireMerc( MERC_HIRE_STRUCT *pHireMerc)
if ( gProfilesMERC[ubCurrentSoldier].ProfilId == ubCurrentSoldier )
// if( ( ubCurrentSoldier >= 40 && ubCurrentSoldier <= 50 ) || ubCurrentSoldier == 58 /*GASTON*/ || ubCurrentSoldier == 59 /*STOGIE*/ )
{
AddItemToMerc( iNewIndex, MERC_UMBRELLA ); //1361
AddItemToMerc( iNewIndex, MERC_UMBRELLA ); //Data-1.13\TableData\Items\items.xml, uiIndex = 1361 or Data\TableData\Items\items.xml, uiIndex = 336
}
//if this is an AIM or MERC merc
@@ -969,16 +969,16 @@ void InitJerryMiloInfo()
{
// return; //AA
//Set Jerry Milo's Gridno h7
gMercProfiles[ 76 ].sSectorX = JA2_5_START_SECTOR_X;
gMercProfiles[ 76 ].sSectorY = JA2_5_START_SECTOR_Y;
gMercProfiles[ 76 ].bSectorZ = 0;
gMercProfiles[ JERRY_MILO_UB ].sSectorX = JA2_5_START_SECTOR_X;
gMercProfiles[ JERRY_MILO_UB ].sSectorY = JA2_5_START_SECTOR_Y;
gMercProfiles[ JERRY_MILO_UB ].bSectorZ = 0;
gMercProfiles[ 76 ].sGridNo = gGameUBOptions.JerryGridNo; //15109;
gMercProfiles[ JERRY_MILO_UB ].sGridNo = gGameUBOptions.JerryGridNo; //15109;
gMercProfiles[ 76 ].fUseProfileInsertionInfo = TRUE;
gMercProfiles[ JERRY_MILO_UB ].fUseProfileInsertionInfo = TRUE;
gMercProfiles[ 76 ].ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
gMercProfiles[ 76 ].usStrategicInsertionData = gGameUBOptions.JerryGridNo; //15109;
gMercProfiles[ JERRY_MILO_UB ].ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
gMercProfiles[ JERRY_MILO_UB ].usStrategicInsertionData = gGameUBOptions.JerryGridNo; //15109;
}
@@ -1012,7 +1012,7 @@ if ( gGameUBOptions.InGameHeliCrash == TRUE )
if ( gGameUBOptions.InJerry == TRUE )
{
pSoldier = FindSoldierByProfileID( 76, FALSE ); //JERRY
pSoldier = FindSoldierByProfileID( JERRY_MILO_UB, FALSE ); //JERRY
if( pSoldier == NULL )
{
Assert( 0 );
@@ -1052,7 +1052,7 @@ if ( gGameUBOptions.InGameHeliCrash == TRUE )
if ( gGameUBOptions.InJerry == TRUE )
{
pJerrySoldier = FindSoldierByProfileID(76, FALSE );//JERRY
pJerrySoldier = FindSoldierByProfileID(JERRY_MILO_UB, FALSE );//JERRY
if( pJerrySoldier != NULL )
{
//Make sure we can see the pilot
+13 -9
View File
@@ -1000,8 +1000,8 @@ BOOLEAN ExecuteOverhead( )
//
//if the merc is one of the mercs who has Quote 80, say that
if( pSoldier->ubProfile == 58 ||//GASTON
pSoldier->ubProfile == 59 ||//STOGIE
if( pSoldier->ubProfile == GASTON_UB ||//GASTON
pSoldier->ubProfile == STOGIE_UB ||//STOGIE
pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__PLAYER_CHARACTER )
{
TacticalCharacterDialogue( pSoldier, QUOTE_REPUTATION_REFUSAL );
@@ -3475,10 +3475,9 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
ScreenMsg( FONT_RED, MSG_INTERFACE, pMercDeadString[ 0 ], pSoldierOld->GetName() );
}
switch( pSoldierOld->ubProfile )
#ifdef JA2UB
if ( pSoldierOld->ubProfile == MORRIS_UB )
{
#ifdef JA2UB
case 75: //MORRIS
{
INT8 bSoldierID;
@@ -3492,7 +3491,12 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
TacticalCharacterDialogue( &Menptr[ bSoldierID ], QUOTE_LEARNED_TO_HATE_MERC_1_ON_TEAM_WONT_RENEW );
}
}
break;
}
#endif
switch( pSoldierOld->ubProfile )
{
#ifdef JA2UB
#else //Ja25: none of these characters are in the exp.
case BRENDA:
@@ -3845,7 +3849,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
#ifdef JA2UB
//------------------- ja25 ub -------------------------
//if the person was Raul, and we are to say the blown up quotes
if( pSoldierOld->ubProfile == PERKO /*RAUL */ && IsJa25GeneralFlagSet( JA_GF__RAUL_BLOW_HIMSELF_UP ) )
if( pSoldierOld->ubProfile == RAUL_UB /*RAUL */ && IsJa25GeneralFlagSet( JA_GF__RAUL_BLOW_HIMSELF_UP ) )
{
UINT8 SoldierId1;
UINT8 SoldierId2;
@@ -9928,10 +9932,10 @@ BOOLEAN CanMsgBoxForPlayerToBeNotifiedOfSomeoneElseInSector()
}
}
*/
if( ( gWorldSectorX == gMercProfiles[ 60 ].sSectorX && gWorldSectorY == gMercProfiles[ 60 ].sSectorY && gbWorldSectorZ == gMercProfiles[ 60 ].bSectorZ ) )
if( ( gWorldSectorX == gMercProfiles[ MANUEL_UB ].sSectorX && gWorldSectorY == gMercProfiles[ MANUEL_UB ].sSectorY && gbWorldSectorZ == gMercProfiles[ MANUEL_UB ].bSectorZ ) )
{
//IF MANUEL is already hired
if( gMercProfiles[ 60 ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED )
if( gMercProfiles[ MANUEL_UB ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED )
{
//then we shouldnt display the message
return( FALSE );
+1 -1
View File
@@ -4398,7 +4398,7 @@ void MovePlayerOfferedItemsOfValueToArmsDealersInventory()
StartShopKeeperTalking( SK_QUOTES_NPC_SPECIFIC_51 );
//Trigger Rauls action #52
TriggerNPCRecord( PERKO, 52 );
TriggerNPCRecord( RAUL_UB, 52 );
//Remeber to discount the barrett
SetJa25GeneralFlag( JA_GF__BARRETT_IS_HALF_PRICE );
+1 -1
View File
@@ -9934,7 +9934,7 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sPo
#ifdef JA2UB
//if the attacker is MORRIS, AND he didnt kill the person
if( Menptr[ ubAttacker ].ubProfile == 75 ) //MORRIS
if( Menptr[ ubAttacker ].ubProfile == MORRIS_UB ) //MORRIS
{
//if the soldier is hurt, but not dead
if( this->stats.bLife < bOldLife && this->stats.bLife > 0 )
+10 -4
View File
@@ -3607,10 +3607,10 @@ void CopyProfileItems( SOLDIERTYPE *pSoldier, SOLDIERCREATE_STRUCT *pCreateStruc
// since keys depend on 2 values, they pretty much have to be hardcoded.
// and if a case isn't handled here it's better to not give any key than
// to provide one which doesn't work and would confuse everything.
switch( pCreateStruct->ubProfile )
#ifdef JA2UB
if ( pCreateStruct->ubProfile == MORRIS_UB )
{
#ifdef JA2UB
case 75: //MORRIS:
if ( pProfile->inv[ cnt ] >= KEY_1 && pProfile->inv[ cnt ] <= KEY_32)
{
fRet = CreateKeyObject( &gTempObject , pProfile->bInvNumber[ cnt ], 32 );
@@ -3620,7 +3620,13 @@ void CopyProfileItems( SOLDIERTYPE *pSoldier, SOLDIERCREATE_STRUCT *pCreateStruc
//{
// memset( &(pSoldier->inv[cnt]), 0, sizeof( OBJECTTYPE ) );
//}
break;
}
#endif
switch( pCreateStruct->ubProfile )
{
#ifdef JA2UB
#endif
// WANNE: Changed KEY_32 to KEY_8 because we only have 8 keys defined in Items.xml
+2 -2
View File
@@ -2431,10 +2431,10 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
else if ( pSoldier->bTeam == gbPlayerNum )
{
#ifdef JA2UB
if( (pOpponent->ubProfile == 75 ) &&
if( (pOpponent->ubProfile == MORRIS_UB ) &&
( GetNumSoldierIdAndProfileIdOfTheNewMercsOnPlayerTeam( NULL, NULL ) != 0 ) &&
!( pSoldier->usQuoteSaidExtFlags & SOLDIER_QUOTE_SAID_EXT_MORRIS ) &&
!( gMercProfiles[ 75 ].ubMiscFlags2 & PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE ) )
!( gMercProfiles[ MORRIS_UB ].ubMiscFlags2 & PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE ) )
{
gfMorrisShouldSayHi = TRUE;
}