mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- Lua function HandleSectorLiberation(...) is called whenever we liberate a sector
- Lua function RecruitRPCAdditionalHandling(...) is called whenever we recruit a RPC git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7880 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "PopUpBox.h"
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "Town Militia.h" // added by Flugente
|
||||
#include "LuaInitNPCs.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "postalservice.h"
|
||||
@@ -387,11 +388,6 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
||||
// Flugente: campaign stats
|
||||
if ( !SectorInfo[ SECTOR( sMapX, sMapY ) ].fSurfaceWasEverPlayerControlled )
|
||||
{
|
||||
//UINT8 ubSector = (UINT8)SECTOR( sMapX, sMapY );
|
||||
//UINT8 ubTraverseType = SectorInfo[ ubSector ].ubTraversability[ 4 ];
|
||||
|
||||
//if ( ubTraverseType == )
|
||||
|
||||
UINT8 townid = GetTownIdForSector( sMapX, sMapY );
|
||||
if ( townid != BLANK_SECTOR )
|
||||
{
|
||||
@@ -407,6 +403,9 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: if we take the surface sector for the first time, script-defined actions might happen
|
||||
LuaHandleSectorLiberation( sMapX, sMapY, bMapZ, !SectorInfo[SECTOR( sMapX, sMapY )].fSurfaceWasEverPlayerControlled );
|
||||
|
||||
if ( bMapZ == 0 )
|
||||
{
|
||||
SectorInfo[ SECTOR( sMapX, sMapY ) ].fSurfaceWasEverPlayerControlled = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user