- Fixed compilation errors when trying to compile a UB-Version (#define JA2UB & define JA2UBMAPS)

o The compilation was broken when enabling Speck as a playable mercs in JA2 113 (revision 6215)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6256 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-07-29 09:05:08 +00:00
parent 4982281ddb
commit 76d517be0c
7 changed files with 66 additions and 13 deletions
+9 -3
View File
@@ -94,9 +94,12 @@
#include "Ja25Update.h"
#endif
// anv: for playable Speck
#include "Speck Quotes.h"
#include "mercs.h"
#ifdef JA2UB
#else
// anv: for playable Speck
#include "Speck Quotes.h"
#include "mercs.h"
#endif
//forward declarations of common classes to eliminate includes
class OBJECTTYPE;
@@ -2728,6 +2731,8 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
if( pSoldier->ubProfile == FLO )
{
SetFactTrue( FACT_PC_MARRYING_DARYL_IS_FLO );
#ifdef JA2UB
#else
// anv: make Speck whine about it immediately if on team
if( !IsMercDead(BIFF) && !IsSpeckComAvailable() )
{
@@ -2736,6 +2741,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
LaptopSaveInfo.fSpeckSaidFloMarriedCousinQuote = TRUE;
MakeBiffAwayForCoupleOfDays();
}
#endif
}
HandleMoraleEvent( pSoldier, MORALE_MERC_MARRIED, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
+8 -2
View File
@@ -123,8 +123,11 @@
#include "ub_config.h"
#endif
// anv: for playable Speck
#include "mercs.h"
#ifdef JA2UB
#else
// anv: for playable Speck
#include "mercs.h"
#endif
// OJW - 20090419
UINT8 giMAXIMUM_NUMBER_OF_PLAYER_MERCS = CODE_MAXIMUM_NUMBER_OF_PLAYER_MERCS;
@@ -3362,9 +3365,12 @@ void HandlePlayerTeamMemberDeath( SOLDIERTYPE *pSoldier )
default:
break;
}
#ifdef JA2UB
#else
// anv: handle Speck witnessing his employee death
if( pTeamSoldier->ubProfile == SPECK_PLAYABLE && pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC )
HandleSpeckWitnessingEmployeeDeath( pSoldier );
#endif
}
}
+10 -3
View File
@@ -64,9 +64,12 @@
#include "ub_config.h"
#include "XML.h"
// anv: for playable Speck
#include "Speck Quotes.h"
#include "LaptopSave.h"
#ifdef JA2UB
#else
// anv: for playable Speck
#include "Speck Quotes.h"
#include "LaptopSave.h"
#endif
#include "connect.h"
#ifdef JA2EDITOR
@@ -2346,6 +2349,9 @@ SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier )
if ( pSoldier->ubProfile == LARRY_DRUNK )
{
SetFactTrue( FACT_LARRY_CHANGED );
#ifdef JA2UB
#else
// anv: make speck whine about it immediately if on team
if( !IsSpeckComAvailable() )
{
@@ -2353,6 +2359,7 @@ SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier )
// don't bring this up again
LaptopSaveInfo.uiSpeckQuoteFlags |= SPECK_QUOTE__ALREADY_TOLD_PLAYER_THAT_LARRY_RELAPSED;
}
#endif
}
else
{