mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
MERGED source code from development trunk revision 4545 up to latest current revision 4882
Development Trunk: https://ja2svn.dyndns.org/source/ja2/branches/Wanne/JA2%201.13%20MP A detailed list of all the features (changes) is visible in the history log of the development trunk: INFO: The source code for the official 2011 release (4870) has been branched here: https://ja2svn.dyndns.org/source/ja2/branches/JA2_rev.4870_2011 This commit contains the following features: *** Externalized Vehicles *** o Now with this feature we can add/remove vehicles o New XML File: TableData\Vehicles.xml o Added a new function parameter to lua file Scripts\Overhead lua to set up the helicopter in method: SetUpHelicopterForPlayer() o Added example mini (Docs\Externalized Vehicles Example.zip) mod which adds 2 additional vehicles (hummer and ice-cream truck to sector A9) *** Up to 255 save slots *** - There is a "Next" and "Prev" button where you can scroll through the save slots - It is now possible to load the automatic save (SAVE_EVERY_N_HOURS) from the load screen. This is the first slot after the quickload slot - Added the 2 alternate players end turn saves (which can be enabled/disabled in option screen) to the save/load game form *** New Feature: Externalized emails from Emails.edt to XML*** o This feature can be enabled/disabled in the Source: --> See email.cpp: If "ReadXMLEmail" == FALSE, then normal way (read from Email.edt) otherwise read from XML files o 2 new XML files: TableData\Email\EmailMercAvailable.xml and EmailMercLevelUp.xml o Renamed SenderNamesList.xml to EmailSenderNamesList.xml and moved from TableData folder to TableData\Email folder o Names for mercenaries are get from the file MercProfiles.xml and different names get from the file EmailSenderNamesList.xml *** Externalized Hidden Towns (Tixa, Orta) *** o Now it is possible to add new hidden towns (locations) o See file: TableData/Map/Cities.xml o New variable in TableData/Map/Cities.xml - hiddenTown: 0 = show on strategy map, 1 = Hide on strategy map - townIcon: 1 = on, 0 = off (This is the icon you see on the strategy map) - szIconFile: The path to the sti icon file (eg: interface\prison.sti, interface\my_icon.sti) - iconPosition: The x,y position of the icon on the strategy map *** Encyclopedia and Briefing Room, reachable from the laptop *** o 2 new ja2_options.ini properties: BRIEFING_ROOM, ENCYCLOPEDIA o demonstration video: http://www.youtube.com/watch?v=7CIXdXWLrAo o Added Example usage of the Briefing Room - Extract it in your JA2 1.13 folder and use the latest development executable - The briefing room can be reached from the laptop. Enter SN5631 for the code and then click the "Exit" button - See "Info_BriefingRoom.txt" and "BriefingRoom_Mission1.png" *** Improved interrupt system (IIS) *** o This system changes the way interrupts work. See: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=290787#Post290787 o Option system (see ja2_options.ini: IMPROVED_INTERRUPT_SYSTEM) o A few more settings for the interrupt system in ja2_options.ini o INFO: Multiplayer games always use the "old" interrupt system, not matter what the user selects in the ja2_options.ini *** Walking and sidestepping with weapon raised *** o Enable/disable the walking/sidestepping with raised weapon in ja2_options.ini: ALLOW_WALKING_WITH_WEAPON_RAISED o You can set an AP/BP modifier when walking/sidestepping with weapon raised in APBPConstants.ini: AP_MODIFIER_WEAPON_READY o The following feature apply when you walk/sidestep with weapon raised: -> limited angle of view, but you can see more farther when the weapon has a scope -> better change for interrupts if you see an enemy -> less APs and BPs when shooting, because the weapon is already raised -> It should cost more APs when walking. Maybe you can export the additional AP and BP modifier to the APBPConstants.ini *** Increase squad size to 8 (800x600) and 8 and 10 (1024x768) *** o Squad sizes (dependend on the screen resolution) can be selected in the start new game screen o In a multiplayer game, the squad size will always be 6, because it does not work with more soldiers/squad *** Added UB-1.13 source code *** o Merged the UB-1.13 source code (Revision: 4721) from svn: http://subversion.assembla.com/svn/ub-source113 o If you want to build UB-EXE or UB-MapEditor, just enable the 2 defines (JA2UB and JA2UBMAPS) in "builddefines.h" o The UB-Verion reads from "ja2_UB.ini" instead of "ja2.ini" o There are 2 new XML files - Layout\LayoutMainMenu.xml - MapAction\ActionItems.xml o There are 2 new LUA-Script files - Scripts\ExplosionControl.lua - Scripts\InterfaceDialogue.lua *** Hide enemy health text / enemy hit count *** o ja2_options.ini: HIDE_ENEMY_HEALTH_TEXT, HIDE_ENEMY_HIT_COUNT o both new settings only have effect in a singleplayer game o see: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=128840&page=1 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4885 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -74,11 +74,26 @@
|
||||
#include "Soldier Macros.h"
|
||||
#include "connect.h"
|
||||
#include "debug control.h"
|
||||
|
||||
#include "LuaInitNPCs.h"
|
||||
#include "Luaglobal.h"
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "interface Dialogue.h"
|
||||
|
||||
#include "Ja25_Tactical.h"
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "Dialogue Control.h"
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
|
||||
|
||||
BOOLEAN HookerInRoom( UINT8 ubRoom );
|
||||
|
||||
// MODULE FOR EXPLOSIONS
|
||||
|
||||
@@ -93,6 +108,10 @@ extern void AddToShouldBecomeHostileOrSayQuoteList( UINT8 ubID );
|
||||
extern void RecompileLocalMovementCostsForWall( INT32 sGridNo, UINT8 ubOrientation );
|
||||
void FatigueCharacter( SOLDIERTYPE *pSoldier );
|
||||
|
||||
#ifdef JA2UB
|
||||
void HandleSeeingFortifiedDoor( UINT32 sGridNo );//Ja25 UB
|
||||
#endif
|
||||
|
||||
#define NO_ALT_SOUND -1
|
||||
|
||||
EXPLOSION_DATA gExpAniData[ NUM_EXP_TYPES ] =
|
||||
@@ -204,6 +223,16 @@ void RecountExplosions( void );
|
||||
void GenerateExplosionFromExplosionPointer( EXPLOSIONTYPE *pExplosion );
|
||||
void HandleBuldingDestruction( INT32 sGridNo, UINT8 ubOwner );
|
||||
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
void HavePersonAtGridnoStop( UINT32 sGridNo );
|
||||
BOOLEAN ShouldThePlayerStopWhenWalkingOnBiggensActionItem( UINT8 ubRecordNum );
|
||||
void HandleDestructionOfPowerGenFan();
|
||||
BOOLEAN IsFanGraphicInSectorAtThisGridNo( UINT32 sGridNo );
|
||||
void HandleExplosionsInTunnelSector( UINT32 sGridNo );
|
||||
void HandleSwitchToOpenFortifiedDoor( UINT32 sGridNo );
|
||||
void HandleSeeingPowerGenFan( UINT32 sGridNo );
|
||||
#endif
|
||||
|
||||
INT32 GetFreeExplosion( void )
|
||||
{
|
||||
@@ -615,7 +644,20 @@ BOOLEAN ExplosiveDamageStructureAtGridNo( STRUCTURE * pCurrent, STRUCTURE **ppNe
|
||||
ChangeO3SectorStatue( TRUE );
|
||||
return( TRUE );
|
||||
}
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
//should we replace the mine entrance graphic
|
||||
if( IsMineEntranceInSectorI13AtThisGridNo( sGridNo ) && ubOwner == NOBODY )
|
||||
{
|
||||
//Yup, replace it
|
||||
ReplaceMineEntranceGraphicWithCollapsedEntrance();
|
||||
}
|
||||
|
||||
//ja25 ub
|
||||
//Handle Explosions in the tunnel sectors
|
||||
HandleExplosionsInTunnelSector( sGridNo );
|
||||
#endif
|
||||
|
||||
// Get xy
|
||||
sX = CenterX( sGridNo );
|
||||
sY = CenterY( sGridNo );
|
||||
@@ -647,7 +689,14 @@ BOOLEAN ExplosiveDamageStructureAtGridNo( STRUCTURE * pCurrent, STRUCTURE **ppNe
|
||||
if ( ( bDamageReturnVal = DamageStructure( pCurrent, (UINT8)sWoundAmt, STRUCTURE_DAMAGE_EXPLOSION, sGridNo, sX, sY, NOBODY ) ) != 0 )
|
||||
{
|
||||
fContinue = FALSE;
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 ub
|
||||
//are we exploding the Fan in the power gen facility
|
||||
if( IsFanGraphicInSectorAtThisGridNo( sGridNo ) )
|
||||
{
|
||||
HandleDestructionOfPowerGenFan();
|
||||
}
|
||||
#endif
|
||||
pBase = FindBaseStructure( pCurrent );
|
||||
|
||||
sBaseGridNo = pBase->sGridNo;
|
||||
@@ -3035,6 +3084,17 @@ BOOLEAN HookerInRoom( UINT8 ubRoom )
|
||||
|
||||
void PerformItemAction( INT32 sGridNo, OBJECTTYPE * pObj )
|
||||
{
|
||||
|
||||
#ifdef LUA_EXPLOSION_CONTROL
|
||||
|
||||
for (UINT32 i = ACTION_ITEM_OPEN_DOOR; i <= ACTION_ITEM_NEW; i++ )
|
||||
{
|
||||
if ( (*pObj)[0]->data.misc.bActionValue == i )
|
||||
LetLuaPerformItemAction( i, sGridNo, 0 );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
STRUCTURE * pStructure;
|
||||
|
||||
switch( (*pObj)[0]->data.misc.bActionValue )
|
||||
@@ -3419,6 +3479,53 @@ void PerformItemAction( INT32 sGridNo, OBJECTTYPE * pObj )
|
||||
PlayJA2Sample( KLAXON_ALARM, RATE_11025, SoundVolume( MIDVOLUME, sGridNo ), 5, SoundDir( sGridNo ) );
|
||||
CallEldinTo( sGridNo );
|
||||
break;
|
||||
#ifdef JA2UB
|
||||
case ACTION_ITEM_BIGGENS_BOMBS:
|
||||
|
||||
if( ShouldThePlayerStopWhenWalkingOnBiggensActionItem( 17 ) )
|
||||
{
|
||||
HavePersonAtGridnoStop( sGridNo );
|
||||
|
||||
//Make Biggens run for cover and then detonate the explosives
|
||||
TriggerNPCRecord( 61 , 17 ); //BIGGENS
|
||||
}
|
||||
|
||||
break;
|
||||
case ACTION_ITEM_BIGGENS_WARNING:
|
||||
|
||||
if( ShouldThePlayerStopWhenWalkingOnBiggensActionItem( 16 ) )
|
||||
{
|
||||
HavePersonAtGridnoStop( sGridNo );
|
||||
|
||||
//Have Biggens spit out a warning about the bombs
|
||||
TriggerNPCRecord( 61, 16 ); //BIGGENS
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ACTION_ITEM_SEE_FORTIFIED_DOOR:
|
||||
HandleSeeingFortifiedDoor( sGridNo );
|
||||
break;
|
||||
|
||||
case ACTION_ITEM_OPEN_FORTIFED_DOOR:
|
||||
HandleSwitchToOpenFortifiedDoor( sGridNo );
|
||||
break;
|
||||
|
||||
case ACTION_ITEM_SEE_POWER_GEN_FAN:
|
||||
|
||||
//if the player is in the power plant
|
||||
if( gWorldSectorX == 13 && gWorldSectorY == 10 && gbWorldSectorZ == 0 )
|
||||
{
|
||||
HandleSeeingPowerGenFan( sGridNo );
|
||||
}
|
||||
else if( gWorldSectorX == 15 && gWorldSectorY == 12 && gbWorldSectorZ == 3 )
|
||||
{
|
||||
//The player is hitting the switch to launch the missles
|
||||
HandlePlayerHittingSwitchToLaunchMissles();
|
||||
}
|
||||
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
// error message here
|
||||
#ifdef JA2BETAVERSION
|
||||
@@ -3426,6 +3533,10 @@ void PerformItemAction( INT32 sGridNo, OBJECTTYPE * pObj )
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
void AddBombToQueue( UINT32 uiWorldBombIndex, UINT32 uiTimeStamp, BOOL fFromRemoteClient )
|
||||
@@ -4237,3 +4348,284 @@ UINT8 DetermineFlashbangEffect( SOLDIERTYPE *pSoldier, INT8 ubExplosionDir, BOOL
|
||||
|
||||
return ( FIRE_WEAPON_BLINDED_AND_DEAFENED );
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
|
||||
//-- UB
|
||||
|
||||
void HavePersonAtGridnoStop( UINT32 sGridNo )
|
||||
{
|
||||
UINT8 ubID;
|
||||
|
||||
//Sewe if there is a person at the gridno
|
||||
ubID = WhoIsThere2( sGridNo, 0 );
|
||||
|
||||
//is it a valid person
|
||||
if ( (ubID != NOBODY) && (MercPtrs[ ubID ]->bTeam == gbPlayerNum) )
|
||||
{
|
||||
SOLDIERTYPE *pSoldier = MercPtrs[ ubID ];
|
||||
|
||||
//Stop the merc
|
||||
pSoldier->EVENT_StopMerc( pSoldier->sGridNo, pSoldier->ubDirection );
|
||||
}
|
||||
}
|
||||
|
||||
//JA25 UB
|
||||
BOOLEAN ShouldThePlayerStopWhenWalkingOnBiggensActionItem( UINT8 ubRecordNum )
|
||||
{
|
||||
SOLDIERTYPE *pSoldier=NULL;
|
||||
|
||||
pSoldier = FindSoldierByProfileID( 61, TRUE ); //BIGGENS
|
||||
|
||||
//if biggens hasnt said the quote before, or is on the players team
|
||||
if( HasNpcSaidQuoteBefore( 61, ubRecordNum ) || ( pSoldier != NULL || gMercProfiles[ 61 ].bLife <= 0 ) ) //BIGGENS
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
// This function checks if we should replace the fan graphic
|
||||
BOOLEAN IsFanGraphicInSectorAtThisGridNo( UINT32 sGridNo )
|
||||
{
|
||||
// First check current sector......
|
||||
if( gWorldSectorX == 13 && gWorldSectorY == MAP_ROW_J && gbWorldSectorZ == 0 )
|
||||
{
|
||||
//if this is the right gridno
|
||||
/*if( sGridNo == 10978 ||
|
||||
sGridNo == 10979 ||
|
||||
sGridNo == 10980 ||
|
||||
sGridNo == 10818 ||
|
||||
sGridNo == 10819 ||
|
||||
sGridNo == 10820 ||
|
||||
sGridNo == 10658 ||
|
||||
sGridNo == 10659 ||
|
||||
sGridNo == 10660 )
|
||||
*/
|
||||
if( sGridNo == gGameUBOptions.FanGridNo[0] ||
|
||||
sGridNo == gGameUBOptions.FanGridNo[1] ||
|
||||
sGridNo == gGameUBOptions.FanGridNo[2] ||
|
||||
sGridNo == gGameUBOptions.FanGridNo[3] ||
|
||||
sGridNo == gGameUBOptions.FanGridNo[4] ||
|
||||
sGridNo == gGameUBOptions.FanGridNo[5] ||
|
||||
sGridNo == gGameUBOptions.FanGridNo[6] ||
|
||||
sGridNo == gGameUBOptions.FanGridNo[7] ||
|
||||
sGridNo == gGameUBOptions.FanGridNo[8] )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
void HandleDestructionOfPowerGenFan()
|
||||
{
|
||||
UINT8 ubShadeLevel=0;
|
||||
INT8 bID;
|
||||
|
||||
//if we have already destroyed the fan
|
||||
if( gJa25SaveStruct.ubHowPlayerGotThroughFan == PG__PLAYER_BLEW_UP_FAN_TO_GET_THROUGH )
|
||||
{
|
||||
//leave
|
||||
return;
|
||||
}
|
||||
|
||||
//if we have already been in here
|
||||
if( gJa25SaveStruct.ubStateOfFanInPowerGenSector == PGF__BLOWN_UP )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//Remeber that the player blew up the fan
|
||||
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__BLOWN_UP;
|
||||
|
||||
//Remeber how the player got through
|
||||
HandleHowPlayerGotThroughFan();
|
||||
|
||||
//Since the player is making LOTS of noise, add more enemies to the tunnel sector
|
||||
// AddEnemiesToJa25TunnelMaps();
|
||||
|
||||
if ( gGameUBOptions.HandleAddingEnemiesToTunnelMaps == TRUE )
|
||||
{
|
||||
HandleAddingEnemiesToTunnelMaps();
|
||||
}
|
||||
|
||||
//Make sure to apply these changes to the map
|
||||
ApplyMapChangesToMapTempFile( TRUE );
|
||||
|
||||
//Add an exit grid to the map
|
||||
AddExitGridForFanToPowerGenSector();
|
||||
|
||||
//done with the changes
|
||||
ApplyMapChangesToMapTempFile( FALSE );
|
||||
|
||||
//Stop the fan sound
|
||||
HandleRemovingPowerGenFanSound();
|
||||
|
||||
|
||||
//
|
||||
// Have a qualified merc say a quote
|
||||
//
|
||||
//Get a random qualified merc to say the quote
|
||||
bID = RandomSoldierIdFromNewMercsOnPlayerTeam();
|
||||
if( bID != -1 )
|
||||
{
|
||||
DelayedMercQuote( Menptr[ bID ].ubProfile, QUOTE_ACCEPT_CONTRACT_RENEWAL, GetWorldTotalSeconds() + 2 );
|
||||
}
|
||||
}
|
||||
|
||||
void HandleExplosionsInTunnelSector( UINT32 sGridNo )
|
||||
{
|
||||
//if this isnt the tunnel sectors
|
||||
if( !( gWorldSectorX == 14 && ( gWorldSectorY == MAP_ROW_J || gWorldSectorY == MAP_ROW_K ) && gbWorldSectorZ == 1 ) )
|
||||
{
|
||||
//get the fuck out...
|
||||
return;
|
||||
}
|
||||
|
||||
//Since the enemy will hear explosions in the tunnel, remember the player made a noise
|
||||
gJa25SaveStruct.uiJa25GeneralFlags |= JA_GF__DID_PLAYER_MAKE_SOUND_GOING_THROUGH_TUNNEL_GATE;
|
||||
}
|
||||
|
||||
|
||||
void HandleSeeingFortifiedDoor( UINT32 sGridNo )
|
||||
{
|
||||
INT32 sID=0;
|
||||
|
||||
//if this isnt the First level of the complex
|
||||
if( !( gWorldSectorX == 15 && gWorldSectorY == MAP_ROW_K && gbWorldSectorZ == 1 ) )
|
||||
{
|
||||
//get the fuck out...
|
||||
return;
|
||||
}
|
||||
|
||||
//if the player has already seen it
|
||||
if( gJa25SaveStruct.uiJa25GeneralFlags & JA_GF__PLAYER_HAS_SEEN_FORTIFIED_DOOR )
|
||||
{
|
||||
//get out
|
||||
return;
|
||||
}
|
||||
|
||||
//Remeber that we have said the quote
|
||||
gJa25SaveStruct.uiJa25GeneralFlags |= JA_GF__PLAYER_HAS_SEEN_FORTIFIED_DOOR;
|
||||
|
||||
//find out whos is the one walking across the trap
|
||||
sID = WhoIsThere2( sGridNo, 0 );
|
||||
if( sID != NOBODY && IsSoldierQualifiedMerc( &Menptr[ sID ] ) )
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
//Get a random merc to say quote
|
||||
sID = RandomSoldierIdFromNewMercsOnPlayerTeam();
|
||||
}
|
||||
|
||||
if( sID != -1 )
|
||||
{
|
||||
//say the quote
|
||||
TacticalCharacterDialogue( &Menptr[ sID ], QUOTE_LENGTH_OF_CONTRACT );
|
||||
}
|
||||
}
|
||||
|
||||
void HandleSwitchToOpenFortifiedDoor( UINT32 sGridNo )
|
||||
{
|
||||
INT8 bID;
|
||||
|
||||
//if the door is already opened
|
||||
if( gJa25SaveStruct.ubStatusOfFortifiedDoor == FD__OPEN )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//remeber that the switch to open the forified door on level 1, has been pulled
|
||||
gJa25SaveStruct.ubStatusOfFortifiedDoor = FD__OPEN;
|
||||
|
||||
bID = RandomSoldierIdFromNewMercsOnPlayerTeam();
|
||||
|
||||
if( bID != -1 )
|
||||
{
|
||||
TacticalCharacterDialogue( &Menptr[ bID ], QUOTE_COMMENT_BEFORE_HANG_UP );
|
||||
}
|
||||
}
|
||||
|
||||
void HandleSeeingPowerGenFan( UINT32 sGridNo )
|
||||
{
|
||||
// INT8 bID;
|
||||
UINT8 ubPerson;
|
||||
BOOLEAN fFanIsStopped;
|
||||
BOOLEAN fFanHasBeenStopped;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
SOLDIERTYPE *pOtherSoldier;
|
||||
INT32 cnt;
|
||||
BOOLEAN fSaidQuote=FALSE;
|
||||
|
||||
//if the fan has already been seen
|
||||
if( IsJa25GeneralFlagSet( JA_GF__PLAYER_SEEN_FAN_BEFORE ) )
|
||||
{
|
||||
//get out
|
||||
return;
|
||||
}
|
||||
|
||||
fFanIsStopped = ( gJa25SaveStruct.ubStateOfFanInPowerGenSector == PGF__STOPPED );
|
||||
fFanHasBeenStopped = IsJa25GeneralFlagSet( JA_GF__POWER_GEN_FAN_HAS_BEEN_STOPPED );
|
||||
|
||||
//Get the person who is at the gridno
|
||||
ubPerson = WhoIsThere2( sGridNo, 0 );
|
||||
|
||||
if( ubPerson != NOBODY )
|
||||
{
|
||||
pSoldier = &Menptr[ ubPerson ];
|
||||
|
||||
//if the fan is stopped And is this merc is a qualified merc but Not a power gen fan qualified merc?
|
||||
if( IsSoldierQualifiedMerc( pSoldier ) && fFanIsStopped )
|
||||
{
|
||||
//Have the merc say the quote
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_HATE_MERC_2_ON_TEAM_WONT_RENEW );
|
||||
fSaidQuote = TRUE;
|
||||
}
|
||||
else if( IsSoldierQualifiedMercForSeeingPowerGenFan( pSoldier ) )
|
||||
{
|
||||
//Have the merc say the quote
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_HATE_MERC_2_ON_TEAM_WONT_RENEW );
|
||||
fSaidQuote = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
//see if there is another merc that is close by to say the quote
|
||||
cnt = gTacticalStatus.Team[ OUR_TEAM ].bFirstID;
|
||||
for ( pOtherSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; cnt++,pOtherSoldier++)
|
||||
{
|
||||
//if the soldier is in the sector
|
||||
if( pOtherSoldier->bActive && pOtherSoldier->bInSector && ( pOtherSoldier->stats.bLife >= CONSCIOUSNESS ) )
|
||||
{
|
||||
INT16 sDistanceAway;
|
||||
|
||||
// if the soldier isnt that far away AND he is qualified merc
|
||||
sDistanceAway = PythSpacesAway( pSoldier->sGridNo, pOtherSoldier->sGridNo );
|
||||
|
||||
if( sDistanceAway <= 5 && ( !InARoom( pOtherSoldier->sGridNo, NULL ) || pOtherSoldier->pathing.bLevel ) &&
|
||||
( ( IsSoldierQualifiedMerc( pOtherSoldier ) && fFanIsStopped ) ||
|
||||
( IsSoldierQualifiedMercForSeeingPowerGenFan( pOtherSoldier ) ) ) )
|
||||
{
|
||||
//Have the merc say the quote
|
||||
TacticalCharacterDialogue( pOtherSoldier, QUOTE_HATE_MERC_2_ON_TEAM_WONT_RENEW );
|
||||
fSaidQuote = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if the quote was said, dont say it again
|
||||
if( fSaidQuote )
|
||||
{
|
||||
//remeber that the fan has been seen
|
||||
SetJa25GeneralFlag( JA_GF__PLAYER_SEEN_FAN_BEFORE );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user