mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- enemy assassin feature is 'off' per default, in order not to freak out unwary new players
- spies are uncovered near corpses only if their uniforms indicate they were allies of the observer - added helpful comments, should anyone ever want to use pits git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5756 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-1
@@ -1063,7 +1063,7 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fAssassinsAreDisguised = iniReader.ReadBoolean("Tactical Difficulty Settings", "ASSASSINS_DISGUISED", TRUE);
|
gGameExternalOptions.fAssassinsAreDisguised = iniReader.ReadBoolean("Tactical Difficulty Settings", "ASSASSINS_DISGUISED", TRUE);
|
||||||
|
|
||||||
// Flugente: does the queen send out assassins that mix among your militia?
|
// Flugente: does the queen send out assassins that mix among your militia?
|
||||||
gGameExternalOptions.fEnemyAssassins = iniReader.ReadBoolean("Tactical Difficulty Settings", "ENEMY_ASSASSINS", TRUE);
|
gGameExternalOptions.fEnemyAssassins = iniReader.ReadBoolean("Tactical Difficulty Settings", "ENEMY_ASSASSINS", FALSE);
|
||||||
gGameExternalOptions.usAssassinMinimumProgress = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSASSIN_MINIMUM_PROGRESS", 30, 0, 100);
|
gGameExternalOptions.usAssassinMinimumProgress = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSASSIN_MINIMUM_PROGRESS", 30, 0, 100);
|
||||||
gGameExternalOptions.usAssassinMinimumMilitia = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSASSIN_MINIMUM_MILITIA", 10, 0, 64);
|
gGameExternalOptions.usAssassinMinimumMilitia = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSASSIN_MINIMUM_MILITIA", 10, 0, 64);
|
||||||
gGameExternalOptions.usAssassinPropabilityModifier = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSASSIN_PROPABILITY_MODIFIER", 100, 0, 1000);
|
gGameExternalOptions.usAssassinPropabilityModifier = iniReader.ReadInteger("Tactical Difficulty Settings", "ASSASSIN_PROPABILITY_MODIFIER", 100, 0, 1000);
|
||||||
|
|||||||
@@ -15096,8 +15096,35 @@ BOOLEAN SOLDIERTYPE::SeemsLegit( UINT8 ubObserverID )
|
|||||||
|
|
||||||
if ( pCorpse && pCorpse->fActivated && pCorpse->def.ubAIWarningValue > 0 && PythSpacesAway( this->sGridNo, pCorpse->def.sGridNo ) <= 5 )
|
if ( pCorpse && pCorpse->fActivated && pCorpse->def.ubAIWarningValue > 0 && PythSpacesAway( this->sGridNo, pCorpse->def.sGridNo ) <= 5 )
|
||||||
{
|
{
|
||||||
|
// check: is this corpse that of an ally of the observing soldier?
|
||||||
|
BOOLEAN fCorpseOFAlly = FALSE;
|
||||||
|
if ( pSoldier->bTeam == ENEMY_TEAM )
|
||||||
|
{
|
||||||
|
// check wether corpse was one of soldier's allies
|
||||||
|
for ( UINT8 i = UNIFORM_ENEMY_ADMIN; i <= UNIFORM_ENEMY_ELITE; ++i )
|
||||||
|
{
|
||||||
|
if ( COMPARE_PALETTEREP_ID(pCorpse->def.VestPal, gUniformColors[ i ].vest) && COMPARE_PALETTEREP_ID(pCorpse->def.PantsPal, gUniformColors[ i ].pants) )
|
||||||
|
{
|
||||||
|
fCorpseOFAlly = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( pSoldier->bTeam == OUR_TEAM || pSoldier->bTeam == MILITIA_TEAM )
|
||||||
|
{
|
||||||
|
// check wether corpse was one of soldier's allies
|
||||||
|
for ( UINT8 i = UNIFORM_MILITIA_ROOKIE; i <= UNIFORM_MILITIA_ELITE; ++i )
|
||||||
|
{
|
||||||
|
if ( COMPARE_PALETTEREP_ID(pCorpse->def.VestPal, gUniformColors[ i ].vest) && COMPARE_PALETTEREP_ID(pCorpse->def.PantsPal, gUniformColors[ i ].pants) )
|
||||||
|
{
|
||||||
|
fCorpseOFAlly = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// a corpse was found near our position. If the soldier observing us can see it, he will be alarmed
|
// a corpse was found near our position. If the soldier observing us can see it, he will be alarmed
|
||||||
if ( SoldierTo3DLocationLineOfSightTest( pSoldier, pCorpse->def.sGridNo, pCorpse->def.bLevel, 3, TRUE, CALC_FROM_WANTED_DIR ) )
|
if ( fCorpseOFAlly && SoldierTo3DLocationLineOfSightTest( pSoldier, pCorpse->def.sGridNo, pCorpse->def.bLevel, 3, TRUE, CALC_FROM_WANTED_DIR ) )
|
||||||
{
|
{
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_NEAR_CORPSE], this->name );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_NEAR_CORPSE], this->name );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -15140,8 +15167,35 @@ BOOLEAN SOLDIERTYPE::SeemsLegit( UINT8 ubObserverID )
|
|||||||
|
|
||||||
if ( pCorpse && pCorpse->fActivated && pCorpse->def.ubAIWarningValue > 0 && PythSpacesAway( this->sGridNo, pCorpse->def.sGridNo ) <= 5 )
|
if ( pCorpse && pCorpse->fActivated && pCorpse->def.ubAIWarningValue > 0 && PythSpacesAway( this->sGridNo, pCorpse->def.sGridNo ) <= 5 )
|
||||||
{
|
{
|
||||||
|
// check: is this corpse that of an ally of the observing soldier?
|
||||||
|
BOOLEAN fCorpseOFAlly = FALSE;
|
||||||
|
if ( pSoldier->bTeam == ENEMY_TEAM )
|
||||||
|
{
|
||||||
|
// check wether corpse was one of soldier's allies
|
||||||
|
for ( UINT8 i = UNIFORM_ENEMY_ADMIN; i <= UNIFORM_ENEMY_ELITE; ++i )
|
||||||
|
{
|
||||||
|
if ( COMPARE_PALETTEREP_ID(pCorpse->def.VestPal, gUniformColors[ i ].vest) && COMPARE_PALETTEREP_ID(pCorpse->def.PantsPal, gUniformColors[ i ].pants) )
|
||||||
|
{
|
||||||
|
fCorpseOFAlly = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( pSoldier->bTeam == OUR_TEAM || pSoldier->bTeam == MILITIA_TEAM )
|
||||||
|
{
|
||||||
|
// check wether corpse was one of soldier's allies
|
||||||
|
for ( UINT8 i = UNIFORM_MILITIA_ROOKIE; i <= UNIFORM_MILITIA_ELITE; ++i )
|
||||||
|
{
|
||||||
|
if ( COMPARE_PALETTEREP_ID(pCorpse->def.VestPal, gUniformColors[ i ].vest) && COMPARE_PALETTEREP_ID(pCorpse->def.PantsPal, gUniformColors[ i ].pants) )
|
||||||
|
{
|
||||||
|
fCorpseOFAlly = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// a corpse was found near our position. If the soldier observing us can see it, he will be alarmed
|
// a corpse was found near our position. If the soldier observing us can see it, he will be alarmed
|
||||||
if ( SoldierTo3DLocationLineOfSightTest( pSoldier, pCorpse->def.sGridNo, pCorpse->def.bLevel, 3, TRUE, CALC_FROM_WANTED_DIR ) )
|
if ( fCorpseOFAlly && SoldierTo3DLocationLineOfSightTest( pSoldier, pCorpse->def.sGridNo, pCorpse->def.bLevel, 3, TRUE, CALC_FROM_WANTED_DIR ) )
|
||||||
{
|
{
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_NEAR_CORPSE], this->name );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_NEAR_CORPSE], this->name );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ BOOLEAN gfShowPits = FALSE;
|
|||||||
|
|
||||||
BOOLEAN gfLoadPitsWithoutArming = FALSE;
|
BOOLEAN gfLoadPitsWithoutArming = FALSE;
|
||||||
|
|
||||||
|
// Flugente: while I don't really see a use to the pit mechanism at the moment, I tested it a bit. I highly recommend to use
|
||||||
|
// AddStructToHead(...) and AddObjectToHead(...) along the existing AddObjectToTail(...)-calls. Otherwise the water tiles disappear when reloading the map.
|
||||||
|
// It is also highly advisable to perform CompileWorldTerrainIDs() (but only for each relevant gridno, this needs a separate function), otherwise the water tiles
|
||||||
|
// do not behave like water tiles at all (they are still treated like normal floor tiles).
|
||||||
|
// An issue remaining for me is that after calling this function, mercs standing on new water tiles do not use the water aniamtions - one has ti move them to anothe tile, or save and reload.
|
||||||
|
// It might be useful to do SearchForOtherMembersWithinPitRadiusAndMakeThemFall() but instead reset their animations in there.
|
||||||
|
// The pit mechnism is notable for its exitgrid mechanism however, that allows painless creation of new exitgrids, and sends mercs somewhere else.
|
||||||
void Add3X3Pit( INT32 iMapIndex )
|
void Add3X3Pit( INT32 iMapIndex )
|
||||||
{
|
{
|
||||||
EXITGRID ExitGrid;
|
EXITGRID ExitGrid;
|
||||||
|
|||||||
Reference in New Issue
Block a user