mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
New tags in CivGroupNames.xml: Side, CustomSide allow setting custom side for civilian group.
NewEye: fix possible bug. InitShopKeeperSubTitledText: correctly initialize data. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8764 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -7635,7 +7635,7 @@ static int l_SetEnterCombatMode (lua_State *L)
|
|||||||
pGoon = MercPtrs[ ubLoop ];
|
pGoon = MercPtrs[ ubLoop ];
|
||||||
if ( pGoon->ubCivilianGroup == group && pGoon->bActive && pGoon->bInSector && pGoon->stats.bLife >= OKLIFE && pGoon->aiData.bOppList[ ubID ] == SEEN_CURRENTLY )
|
if ( pGoon->ubCivilianGroup == group && pGoon->bActive && pGoon->bInSector && pGoon->stats.bLife >= OKLIFE && pGoon->aiData.bOppList[ ubID ] == SEEN_CURRENTLY )
|
||||||
{
|
{
|
||||||
MakeCivHostile( pGoon, 2 );
|
MakeCivHostile(pGoon);
|
||||||
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
|
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
|
||||||
{
|
{
|
||||||
EnterCombatMode( pGoon->bTeam );
|
EnterCombatMode( pGoon->bTeam );
|
||||||
@@ -7665,7 +7665,7 @@ static int l_MakeMercPtrsHostile (lua_State *L)
|
|||||||
{
|
{
|
||||||
UINT8 ubID = lua_tointeger(L,1);
|
UINT8 ubID = lua_tointeger(L,1);
|
||||||
|
|
||||||
MakeCivHostile( MercPtrs[ ubID ], 2 );
|
MakeCivHostile(MercPtrs[ ubID ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -9805,7 +9805,7 @@ static int l_MakeHostile (lua_State *L)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// make hostile
|
// make hostile
|
||||||
MakeCivHostile( pSoldier, 2 );
|
MakeCivHostile(pSoldier);
|
||||||
}
|
}
|
||||||
DeleteTalkingMenu();
|
DeleteTalkingMenu();
|
||||||
if ( ! ( gTacticalStatus.uiFlags & INCOMBAT ) )
|
if ( ! ( gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||||
|
|||||||
+58
-68
@@ -2638,80 +2638,70 @@ BOOLEAN ExternRenderFace( UINT32 uiBuffer, INT32 iFaceIndex, INT16 sX, INT16 sY
|
|||||||
|
|
||||||
void NewEye( FACETYPE *pFace )
|
void NewEye( FACETYPE *pFace )
|
||||||
{
|
{
|
||||||
|
switch (pFace->sEyeFrame)
|
||||||
switch(pFace->sEyeFrame)
|
{
|
||||||
{
|
case 0: //pFace->sEyeFrame = (INT16)Random(2); // normal - can blink or frown
|
||||||
case 0 : //pFace->sEyeFrame = (INT16)Random(2); // normal - can blink or frown
|
if (pFace->ubExpression == ANGRY)
|
||||||
if ( pFace->ubExpression == ANGRY )
|
{
|
||||||
{
|
pFace->ubEyeWait = 0;
|
||||||
pFace->ubEyeWait = 0;
|
pFace->sEyeFrame = 3;
|
||||||
pFace->sEyeFrame = 3;
|
}
|
||||||
}
|
else if (pFace->ubExpression == SURPRISED)
|
||||||
else if ( pFace->ubExpression == SURPRISED )
|
{
|
||||||
{
|
pFace->ubEyeWait = 0;
|
||||||
pFace->ubEyeWait = 0;
|
pFace->sEyeFrame = 4;
|
||||||
pFace->sEyeFrame = 4;
|
}
|
||||||
}
|
else
|
||||||
else
|
pFace->sEyeFrame = 1;
|
||||||
//if (pFace->sEyeFrame && Talk.talking && Talk.expression != DYING)
|
//if (pFace->sEyeFrame && Talk.talking && Talk.expression != DYING)
|
||||||
/// pFace->sEyeFrame = 3;
|
/// pFace->sEyeFrame = 3;
|
||||||
//else
|
//else
|
||||||
pFace->sEyeFrame = 1;
|
break;
|
||||||
break;
|
case 1: // starting to blink - has to finish unless dying
|
||||||
case 1 : // starting to blink - has to finish unless dying
|
//if (Talk.expression == DYING)
|
||||||
//if (Talk.expression == DYING)
|
// pFace->sEyeFrame = 1;
|
||||||
// pFace->sEyeFrame = 1;
|
//else
|
||||||
//else
|
|
||||||
pFace->sEyeFrame = 2;
|
pFace->sEyeFrame = 2;
|
||||||
break;
|
break;
|
||||||
case 2 : //pFace->sEyeFrame = (INT16)Random(2); // finishing blink - can go normal or frown
|
case 2: //pFace->sEyeFrame = (INT16)Random(2); // finishing blink - can go normal or frown
|
||||||
//if (pFace->sEyeFrame && Talk.talking)
|
//if (pFace->sEyeFrame && Talk.talking)
|
||||||
// pFace->sEyeFrame = 3;
|
// pFace->sEyeFrame = 3;
|
||||||
//else
|
//else
|
||||||
// if (Talk.expression == ANGRY)
|
// if (Talk.expression == ANGRY)
|
||||||
// pFace->sEyeFrame = 3;
|
// pFace->sEyeFrame = 3;
|
||||||
// else
|
// else
|
||||||
pFace->sEyeFrame = 0;
|
pFace->sEyeFrame = 0;
|
||||||
break;
|
break;
|
||||||
|
case 3: //pFace->sEyeFrame = 4; break; // frown
|
||||||
case 3 : //pFace->sEyeFrame = 4; break; // frown
|
pFace->ubEyeWait++;
|
||||||
|
if (pFace->ubEyeWait > 6)
|
||||||
pFace->ubEyeWait++;
|
{
|
||||||
|
pFace->sEyeFrame = 0;
|
||||||
if ( pFace->ubEyeWait > 6 )
|
}
|
||||||
{
|
break;
|
||||||
pFace->sEyeFrame = 0;
|
case 4:
|
||||||
}
|
pFace->ubEyeWait++;
|
||||||
break;
|
if (pFace->ubEyeWait > 6)
|
||||||
|
{
|
||||||
case 4 :
|
pFace->sEyeFrame = 0;
|
||||||
|
}
|
||||||
pFace->ubEyeWait++;
|
break;
|
||||||
|
case 5: pFace->sEyeFrame = 6;
|
||||||
if ( pFace->ubEyeWait > 6 )
|
|
||||||
{
|
|
||||||
pFace->sEyeFrame = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 5 : pFace->sEyeFrame = 6;
|
|
||||||
|
|
||||||
pFace->sEyeFrame = 0;
|
pFace->sEyeFrame = 0;
|
||||||
break;
|
break;
|
||||||
|
case 6: pFace->sEyeFrame = 7; break;
|
||||||
case 6 : pFace->sEyeFrame = 7; break;
|
case 7: pFace->sEyeFrame = (INT16)Random(2); // can stop frowning or continue
|
||||||
case 7 : pFace->sEyeFrame = (INT16)Random(2); // can stop frowning or continue
|
//if (pFace->sEyeFrame && Talk.expression != DYING)
|
||||||
//if (pFace->sEyeFrame && Talk.expression != DYING)
|
// pFace->sEyeFrame = 8;
|
||||||
// pFace->sEyeFrame = 8;
|
//else
|
||||||
//else
|
// pFace->sEyeFrame = 0;
|
||||||
// pFace->sEyeFrame = 0;
|
break;
|
||||||
//break;
|
case 8: pFace->sEyeFrame = 9; break;
|
||||||
case 8 : pFace->sEyeFrame = 9; break;
|
case 9: pFace->sEyeFrame = 10; break;
|
||||||
case 9 : pFace->sEyeFrame = 10; break;
|
|
||||||
case 10: pFace->sEyeFrame = 11; break;
|
case 10: pFace->sEyeFrame = 11; break;
|
||||||
case 11: pFace->sEyeFrame = 12; break;
|
case 11: pFace->sEyeFrame = 12; break;
|
||||||
case 12: pFace->sEyeFrame = 0; break;
|
case 12: pFace->sEyeFrame = 0; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -451,7 +451,7 @@ void ProcessImplicationsOfPCMessingWithDoor( SOLDIERTYPE * pSoldier )
|
|||||||
pGoon = MercPtrs[ ubLoop ];
|
pGoon = MercPtrs[ ubLoop ];
|
||||||
if ( pGoon->ubCivilianGroup == KINGPIN_CIV_GROUP && pGoon->bActive && pGoon->bInSector && pGoon->stats.bLife >= OKLIFE && pGoon->aiData.bOppList[ pSoldier->ubID ] == SEEN_CURRENTLY )
|
if ( pGoon->ubCivilianGroup == KINGPIN_CIV_GROUP && pGoon->bActive && pGoon->bInSector && pGoon->stats.bLife >= OKLIFE && pGoon->aiData.bOppList[ pSoldier->ubID ] == SEEN_CURRENTLY )
|
||||||
{
|
{
|
||||||
MakeCivHostile( pGoon, 2 );
|
MakeCivHostile(pGoon);
|
||||||
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
|
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
|
||||||
{
|
{
|
||||||
EnterCombatMode( pGoon->bTeam );
|
EnterCombatMode( pGoon->bTeam );
|
||||||
|
|||||||
@@ -2129,7 +2129,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//MakeCivHostile( pSoldier, 2 );
|
//MakeCivHostile(pSoldier);
|
||||||
}
|
}
|
||||||
if ( ( pSoldier->ubProfile != NO_PROFILE || pSoldier->IsAssassin() ) && pSoldier->stats.bLife >= OKLIFE )
|
if ( ( pSoldier->ubProfile != NO_PROFILE || pSoldier->IsAssassin() ) && pSoldier->stats.bLife >= OKLIFE )
|
||||||
{
|
{
|
||||||
@@ -2936,7 +2936,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// make hostile
|
// make hostile
|
||||||
MakeCivHostile( pSoldier, 2 );
|
MakeCivHostile(pSoldier);
|
||||||
}
|
}
|
||||||
DeleteTalkingMenu();
|
DeleteTalkingMenu();
|
||||||
if ( ! ( gTacticalStatus.uiFlags & INCOMBAT ) )
|
if ( ! ( gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||||
|
|||||||
@@ -80,10 +80,12 @@ typedef struct
|
|||||||
{
|
{
|
||||||
UINT16 uiIndex; // add
|
UINT16 uiIndex; // add
|
||||||
BOOLEAN Enabled; //add
|
BOOLEAN Enabled; //add
|
||||||
BOOLEAN Loyalty;
|
BOOLEAN Loyalty;
|
||||||
BOOLEAN AddToBattle;
|
BOOLEAN AddToBattle;
|
||||||
BOOLEAN fCanBeCaptured; // Flugente: if TRUE, members of this faction can be captured
|
BOOLEAN fCanBeCaptured; // Flugente: if TRUE, members of this faction can be captured
|
||||||
CHAR16 szCurGroup[MAX_ENEMY_NAMES_CHARS];
|
INT8 bSide; // sevenfm: custom side for civ group
|
||||||
|
BOOLEAN fCustomSide; // sevenfm: use custom side
|
||||||
|
CHAR16 szCurGroup[MAX_ENEMY_NAMES_CHARS];
|
||||||
|
|
||||||
} CIV_NAMES_VALUES;
|
} CIV_NAMES_VALUES;
|
||||||
|
|
||||||
|
|||||||
+22
-15
@@ -3086,7 +3086,7 @@ BOOLEAN HandleAtNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving )
|
|||||||
CancelAIAction( pSoldier, TRUE );
|
CancelAIAction( pSoldier, TRUE );
|
||||||
// aaaaaaaaaaaaaaaaaaaaatttaaaack!!!!
|
// aaaaaaaaaaaaaaaaaaaaatttaaaack!!!!
|
||||||
AddToShouldBecomeHostileOrSayQuoteList( pSoldier->ubID );
|
AddToShouldBecomeHostileOrSayQuoteList( pSoldier->ubID );
|
||||||
//MakeCivHostile( pSoldier, 2 );
|
//MakeCivHostile(pSoldier);
|
||||||
//TriggerNPCWithIHateYouQuote( pSoldier->ubProfile );
|
//TriggerNPCWithIHateYouQuote( pSoldier->ubProfile );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4211,14 +4211,16 @@ void SetSoldierNeutral( SOLDIERTYPE * pSoldier )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void MakeCivHostile( SOLDIERTYPE *pSoldier, INT8 bNewSide )
|
void MakeCivHostile(SOLDIERTYPE *pSoldier)
|
||||||
{
|
{
|
||||||
|
INT8 bNewSide;
|
||||||
|
|
||||||
if ( pSoldier->ubBodyType == COW )
|
if ( pSoldier->ubBodyType == COW )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// override passed-in value; default is hostile to player, allied to army
|
// default is hostile to player, allied to army
|
||||||
bNewSide = 1;
|
bNewSide = 1;
|
||||||
|
|
||||||
switch( pSoldier->ubProfile )
|
switch( pSoldier->ubProfile )
|
||||||
@@ -4256,6 +4258,15 @@ void MakeCivHostile( SOLDIERTYPE *pSoldier, INT8 bNewSide )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sevenfm: if side is set in CivGroupNames.xml, use it instead of default value
|
||||||
|
if (pSoldier->bTeam == CIV_TEAM &&
|
||||||
|
pSoldier->ubCivilianGroup != NON_CIV_GROUP &&
|
||||||
|
zCivGroupName[pSoldier->ubCivilianGroup].fCustomSide &&
|
||||||
|
zCivGroupName[pSoldier->ubCivilianGroup].bSide >= 0)
|
||||||
|
{
|
||||||
|
bNewSide = zCivGroupName[pSoldier->ubCivilianGroup].bSide;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !pSoldier->aiData.bNeutral && bNewSide == pSoldier->bSide )
|
if ( !pSoldier->aiData.bNeutral && bNewSide == pSoldier->bSide )
|
||||||
{
|
{
|
||||||
// already hostile!
|
// already hostile!
|
||||||
@@ -4289,15 +4300,13 @@ void MakeCivHostile( SOLDIERTYPE *pSoldier, INT8 bNewSide )
|
|||||||
// change orders
|
// change orders
|
||||||
pSoldier->aiData.bOrders = FARPATROL;
|
pSoldier->aiData.bOrders = FARPATROL;
|
||||||
}
|
}
|
||||||
if (bNewSide != -1)
|
|
||||||
{
|
pSoldier->bSide = bNewSide;
|
||||||
pSoldier->bSide = bNewSide;
|
|
||||||
}
|
|
||||||
if ( pSoldier->aiData.bNeutral )
|
if ( pSoldier->aiData.bNeutral )
|
||||||
{
|
{
|
||||||
// HEADROCK HAM 3.6: INI Setting decides whether non-combat civs can become hostile
|
// HEADROCK HAM 3.6: INI Setting decides whether non-combat civs can become hostile
|
||||||
if (gGameExternalOptions.fCanTrueCiviliansBecomeHostile ||
|
if (gGameExternalOptions.fCanTrueCiviliansBecomeHostile || !IS_CIV_BODY_TYPE(pSoldier))
|
||||||
!IS_CIV_BODY_TYPE(pSoldier))
|
|
||||||
{
|
{
|
||||||
SetSoldierNonNeutral( pSoldier );
|
SetSoldierNonNeutral( pSoldier );
|
||||||
}
|
}
|
||||||
@@ -4305,14 +4314,12 @@ void MakeCivHostile( SOLDIERTYPE *pSoldier, INT8 bNewSide )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// If we are already in combat...
|
// If we are already in combat...
|
||||||
if ( ( gTacticalStatus.uiFlags & INCOMBAT ) )
|
if ( ( gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||||
{
|
{
|
||||||
CheckForPotentialAddToBattleIncrement( pSoldier );
|
CheckForPotentialAddToBattleIncrement( pSoldier );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//uses Lua
|
//uses Lua
|
||||||
PROFILLUA2_ubProfile = pSoldier->ubProfile;
|
PROFILLUA2_ubProfile = pSoldier->ubProfile;
|
||||||
PROFILLUA2_sSectorX = pSoldier->sSectorX;
|
PROFILLUA2_sSectorX = pSoldier->sSectorX;
|
||||||
@@ -4346,7 +4353,7 @@ UINT8 CivilianGroupMembersChangeSidesWithinProximity( SOLDIERTYPE * pAttacked )
|
|||||||
|| ( PythSpacesAway( pSoldier->sGridNo, pAttacked->sGridNo ) < pAttacked->GetMaxDistanceVisible(pSoldier->sGridNo, pSoldier->pathing.bLevel) )
|
|| ( PythSpacesAway( pSoldier->sGridNo, pAttacked->sGridNo ) < pAttacked->GetMaxDistanceVisible(pSoldier->sGridNo, pSoldier->pathing.bLevel) )
|
||||||
|| ( pAttacked->ubAttackerID != NOBODY && PythSpacesAway( pSoldier->sGridNo, MercPtrs[ pAttacked->ubAttackerID ]->sGridNo ) < pAttacked->GetMaxDistanceVisible(MercPtrs[ pAttacked->ubAttackerID ]->sGridNo, MercPtrs[ pAttacked->ubAttackerID ]->pathing.bLevel) ) )
|
|| ( pAttacked->ubAttackerID != NOBODY && PythSpacesAway( pSoldier->sGridNo, MercPtrs[ pAttacked->ubAttackerID ]->sGridNo ) < pAttacked->GetMaxDistanceVisible(MercPtrs[ pAttacked->ubAttackerID ]->sGridNo, MercPtrs[ pAttacked->ubAttackerID ]->pathing.bLevel) ) )
|
||||||
{
|
{
|
||||||
MakeCivHostile( pSoldier, 2 );
|
MakeCivHostile(pSoldier);
|
||||||
if ( pSoldier->aiData.bOppCnt > 0 )
|
if ( pSoldier->aiData.bOppCnt > 0 )
|
||||||
{
|
{
|
||||||
AddToShouldBecomeHostileOrSayQuoteList( pSoldier->ubID );
|
AddToShouldBecomeHostileOrSayQuoteList( pSoldier->ubID );
|
||||||
@@ -4476,7 +4483,7 @@ void CivilianGroupChangesSides( UINT8 ubCivilianGroup )
|
|||||||
{
|
{
|
||||||
if ( pSoldier->ubCivilianGroup == ubCivilianGroup && pSoldier->ubBodyType != COW )
|
if ( pSoldier->ubCivilianGroup == ubCivilianGroup && pSoldier->ubBodyType != COW )
|
||||||
{
|
{
|
||||||
MakeCivHostile( pSoldier, 2 );
|
MakeCivHostile(pSoldier);
|
||||||
if ( pSoldier->aiData.bOppCnt > 0 )
|
if ( pSoldier->aiData.bOppCnt > 0 )
|
||||||
{
|
{
|
||||||
AddToShouldBecomeHostileOrSayQuoteList( pSoldier->ubID );
|
AddToShouldBecomeHostileOrSayQuoteList( pSoldier->ubID );
|
||||||
@@ -4538,7 +4545,7 @@ void MilitiaChangesSides( )
|
|||||||
if (pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife)
|
if (pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife)
|
||||||
{
|
{
|
||||||
if ( (gWorldSectorX == 0 && gWorldSectorY == 0) || !NumNonPlayerTeamMembersInSector( gWorldSectorX, gWorldSectorY, ENEMY_TEAM ) )
|
if ( (gWorldSectorX == 0 && gWorldSectorY == 0) || !NumNonPlayerTeamMembersInSector( gWorldSectorX, gWorldSectorY, ENEMY_TEAM ) )
|
||||||
MakeCivHostile( pSoldier, 2 );
|
MakeCivHostile(pSoldier);
|
||||||
RecalculateOppCntsDueToNoLongerNeutral( pSoldier );
|
RecalculateOppCntsDueToNoLongerNeutral( pSoldier );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9363,7 +9370,7 @@ SOLDIERTYPE *InternalReduceAttackBusyCount( )
|
|||||||
{
|
{
|
||||||
//ZEROTIMECOUNTER( pTeamSoldier->timeCounters.AICounter );
|
//ZEROTIMECOUNTER( pTeamSoldier->timeCounters.AICounter );
|
||||||
|
|
||||||
//MakeCivHostile( pTeamSoldier, 2 );
|
//MakeCivHostile(pTeamSoldier);
|
||||||
|
|
||||||
HandleCrowFlyAway( pTeamSoldier );
|
HandleCrowFlyAway( pTeamSoldier );
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -299,7 +299,7 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated );
|
|||||||
void AddManToTeam( INT8 bTeam );
|
void AddManToTeam( INT8 bTeam );
|
||||||
void RemoveManFromTeam( INT8 bTeam );
|
void RemoveManFromTeam( INT8 bTeam );
|
||||||
void RemoveSoldierFromTacticalSector( SOLDIERTYPE *pSoldier, BOOLEAN fAdjustSelected );
|
void RemoveSoldierFromTacticalSector( SOLDIERTYPE *pSoldier, BOOLEAN fAdjustSelected );
|
||||||
void MakeCivHostile( SOLDIERTYPE *pSoldier, INT8 bNewSide );
|
void MakeCivHostile(SOLDIERTYPE *pSoldier);
|
||||||
|
|
||||||
#define REASON_NORMAL_ATTACK 1
|
#define REASON_NORMAL_ATTACK 1
|
||||||
#define REASON_EXPLOSION 2
|
#define REASON_EXPLOSION 2
|
||||||
|
|||||||
@@ -5038,7 +5038,7 @@ BOOLEAN IsGunOrAmmoOfSameTypeSelected( OBJECTTYPE *pItemObject )
|
|||||||
void InitShopKeeperSubTitledText( STR16 pString )
|
void InitShopKeeperSubTitledText( STR16 pString )
|
||||||
{
|
{
|
||||||
//Clear the contents of the subtitle text
|
//Clear the contents of the subtitle text
|
||||||
memset( gsShopKeeperTalkingText, 0, SKI_SUBTITLE_TEXT_SIZE );
|
memset(gsShopKeeperTalkingText, 0, sizeof(CHAR16)* SKI_SUBTITLE_TEXT_SIZE);
|
||||||
|
|
||||||
swprintf( gsShopKeeperTalkingText, L"\"%s\"", pString );
|
swprintf( gsShopKeeperTalkingText, L"\"%s\"", pString );
|
||||||
|
|
||||||
|
|||||||
@@ -815,6 +815,15 @@ SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT8 *
|
|||||||
Soldier.sInsertionGridNo = pCreateStruct->sInsertionGridNo;
|
Soldier.sInsertionGridNo = pCreateStruct->sInsertionGridNo;
|
||||||
Soldier.bOldLife = Soldier.stats.bLifeMax;
|
Soldier.bOldLife = Soldier.stats.bLifeMax;
|
||||||
|
|
||||||
|
// set custom side for civilian group
|
||||||
|
if (Soldier.bTeam == CIV_TEAM &&
|
||||||
|
Soldier.ubCivilianGroup != NON_CIV_GROUP &&
|
||||||
|
zCivGroupName[Soldier.ubCivilianGroup].fCustomSide &&
|
||||||
|
zCivGroupName[Soldier.ubCivilianGroup].bSide >= 0)
|
||||||
|
{
|
||||||
|
Soldier.bSide = zCivGroupName[Soldier.ubCivilianGroup].bSide;
|
||||||
|
}
|
||||||
|
|
||||||
// Flugente: disease can affect a soldier's health
|
// Flugente: disease can affect a soldier's health
|
||||||
// not for us, and not for individual militia (their health is affected by their hourly healing instead)
|
// not for us, and not for individual militia (their health is affected by their hourly healing instead)
|
||||||
if ( gGameExternalOptions.fDisease && gGameExternalOptions.fDiseaseStrategic && Soldier.bTeam != OUR_TEAM && Soldier.bTeam != CREATURE_TEAM && !ARMED_VEHICLE((&Soldier)) &&
|
if ( gGameExternalOptions.fDisease && gGameExternalOptions.fDiseaseStrategic && Soldier.bTeam != OUR_TEAM && Soldier.bTeam != CREATURE_TEAM && !ARMED_VEHICLE((&Soldier)) &&
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ civGroupNamesStartElementHandle(void *userData, const XML_Char *name, const XML_
|
|||||||
strcmp(name, "Loyalty") == 0 ||
|
strcmp(name, "Loyalty") == 0 ||
|
||||||
strcmp(name, "AddToBattle") == 0 ||
|
strcmp(name, "AddToBattle") == 0 ||
|
||||||
strcmp(name, "fCanBeCaptured" ) == 0 ||
|
strcmp(name, "fCanBeCaptured" ) == 0 ||
|
||||||
|
strcmp(name, "Side") == 0 ||
|
||||||
|
strcmp(name, "CustomSide") == 0 ||
|
||||||
strcmp(name, "szGroup") == 0 ))
|
strcmp(name, "szGroup") == 0 ))
|
||||||
{
|
{
|
||||||
pData->curElement = ELEMENT_PROPERTY;
|
pData->curElement = ELEMENT_PROPERTY;
|
||||||
@@ -100,6 +102,8 @@ civGroupNamesEndElementHandle(void *userData, const XML_Char *name)
|
|||||||
zCivGroupName[pData->curCivGroupNames.uiIndex].AddToBattle = pData->curCivGroupNames.AddToBattle;
|
zCivGroupName[pData->curCivGroupNames.uiIndex].AddToBattle = pData->curCivGroupNames.AddToBattle;
|
||||||
zCivGroupName[pData->curCivGroupNames.uiIndex].Loyalty = pData->curCivGroupNames.Loyalty;
|
zCivGroupName[pData->curCivGroupNames.uiIndex].Loyalty = pData->curCivGroupNames.Loyalty;
|
||||||
zCivGroupName[pData->curCivGroupNames.uiIndex].fCanBeCaptured = pData->curCivGroupNames.fCanBeCaptured;
|
zCivGroupName[pData->curCivGroupNames.uiIndex].fCanBeCaptured = pData->curCivGroupNames.fCanBeCaptured;
|
||||||
|
zCivGroupName[pData->curCivGroupNames.uiIndex].bSide = pData->curCivGroupNames.bSide;
|
||||||
|
zCivGroupName[pData->curCivGroupNames.uiIndex].fCustomSide = pData->curCivGroupNames.fCustomSide;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -132,6 +136,16 @@ civGroupNamesEndElementHandle(void *userData, const XML_Char *name)
|
|||||||
pData->curElement = ELEMENT;
|
pData->curElement = ELEMENT;
|
||||||
pData->curCivGroupNames.fCanBeCaptured = (BOOLEAN)atol( pData->szCharData );
|
pData->curCivGroupNames.fCanBeCaptured = (BOOLEAN)atol( pData->szCharData );
|
||||||
}
|
}
|
||||||
|
else if (strcmp(name, "Side") == 0)
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
pData->curCivGroupNames.bSide = (INT8)atol(pData->szCharData);
|
||||||
|
}
|
||||||
|
else if (strcmp(name, "CustomSide") == 0)
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
pData->curCivGroupNames.fCustomSide = (BOOLEAN)atol(pData->szCharData);
|
||||||
|
}
|
||||||
else if(strcmp(name, "szGroup") == 0 )
|
else if(strcmp(name, "szGroup") == 0 )
|
||||||
{
|
{
|
||||||
pData->curElement = ELEMENT;
|
pData->curElement = ELEMENT;
|
||||||
|
|||||||
@@ -761,7 +761,7 @@ void CheckHostileOrSayQuoteList( void )
|
|||||||
pSoldier = MercPtrs[ gubShouldBecomeHostileOrSayQuote[ ubLoop ] ];
|
pSoldier = MercPtrs[ gubShouldBecomeHostileOrSayQuote[ ubLoop ] ];
|
||||||
if ( pSoldier->aiData.bNeutral )
|
if ( pSoldier->aiData.bNeutral )
|
||||||
{
|
{
|
||||||
MakeCivHostile( pSoldier, 2 );
|
MakeCivHostile(pSoldier);
|
||||||
// make civ group, if any, hostile
|
// make civ group, if any, hostile
|
||||||
if ( pSoldier->bTeam == CIV_TEAM && pSoldier->ubCivilianGroup != NON_CIV_GROUP && gTacticalStatus.fCivGroupHostile[ pSoldier->ubCivilianGroup ] == CIV_GROUP_WILL_BECOME_HOSTILE )
|
if ( pSoldier->bTeam == CIV_TEAM && pSoldier->ubCivilianGroup != NON_CIV_GROUP && gTacticalStatus.fCivGroupHostile[ pSoldier->ubCivilianGroup ] == CIV_GROUP_WILL_BECOME_HOSTILE )
|
||||||
{
|
{
|
||||||
@@ -2410,7 +2410,7 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
|
|||||||
// check to see if we are looking at Maria or unauthorized personnel in the brothel
|
// check to see if we are looking at Maria or unauthorized personnel in the brothel
|
||||||
if (pOpponent->ubProfile == MARIA)
|
if (pOpponent->ubProfile == MARIA)
|
||||||
{
|
{
|
||||||
MakeCivHostile( pSoldier, 2 );
|
MakeCivHostile(pSoldier);
|
||||||
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
|
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
|
||||||
{
|
{
|
||||||
EnterCombatMode( pSoldier->bTeam );
|
EnterCombatMode( pSoldier->bTeam );
|
||||||
@@ -2428,7 +2428,7 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
|
|||||||
if ( InARoom( pOpponent->sGridNo, &usRoom ) && IN_BROTHEL_GUARD_ROOM( usRoom ) )
|
if ( InARoom( pOpponent->sGridNo, &usRoom ) && IN_BROTHEL_GUARD_ROOM( usRoom ) )
|
||||||
{
|
{
|
||||||
// unauthorized!
|
// unauthorized!
|
||||||
MakeCivHostile( pSoldier, 2 );
|
MakeCivHostile(pSoldier);
|
||||||
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
|
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
|
||||||
{
|
{
|
||||||
EnterCombatMode( pSoldier->bTeam );
|
EnterCombatMode( pSoldier->bTeam );
|
||||||
@@ -2446,7 +2446,7 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
|
|||||||
if ( uiTime < 365 || uiTime > 1320 )
|
if ( uiTime < 365 || uiTime > 1320 )
|
||||||
{
|
{
|
||||||
// get off our farm!
|
// get off our farm!
|
||||||
MakeCivHostile( pSoldier, 2 );
|
MakeCivHostile(pSoldier);
|
||||||
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
|
if ( ! (gTacticalStatus.uiFlags & INCOMBAT) )
|
||||||
{
|
{
|
||||||
EnterCombatMode( pSoldier->bTeam );
|
EnterCombatMode( pSoldier->bTeam );
|
||||||
|
|||||||
Reference in New Issue
Block a user