mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@144 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
//RELEASE BUILD VERSION
|
//RELEASE BUILD VERSION
|
||||||
INT16 zVersionLabel[256] = { L"Release v1.13.142" };
|
INT16 zVersionLabel[256] = { L"Release v1.13.144" };
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "AI All.h"
|
#include "AI All.h"
|
||||||
#include "DisplayCover.h"
|
#include "DisplayCover.h"
|
||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
|
#include "opplist.h"
|
||||||
#include "_Ja25Englishtext.h"
|
#include "_Ja25Englishtext.h"
|
||||||
//#include "Ja25 Strategic Ai.h"
|
//#include "Ja25 Strategic Ai.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -435,7 +436,7 @@ INT8 CalcCoverForGridNoBasedOnTeamKnownEnemies( SOLDIERTYPE *pSoldier, INT16 sTa
|
|||||||
|
|
||||||
usRange = (UINT16)GetRangeInCellCoordsFromGridNoDiff( pOpponent->sGridNo, sTargetGridNo );
|
usRange = (UINT16)GetRangeInCellCoordsFromGridNoDiff( pOpponent->sGridNo, sTargetGridNo );
|
||||||
// Lesh: changed 2-nd parameter in DistanceVisible function call
|
// Lesh: changed 2-nd parameter in DistanceVisible function call
|
||||||
usSightLimit = DistanceVisible( pOpponent, (gGameExternalOptions.gfAllowLimitedVision ? pSoldier->bDesiredDirection : DIRECTION_IRRELEVANT), DIRECTION_IRRELEVANT, sTargetGridNo, pSoldier->bLevel, pSoldier );
|
usSightLimit = DistanceVisible( pOpponent, (SoldierHasLimitedVision(pSoldier) ? pSoldier->bDesiredDirection : DIRECTION_IRRELEVANT), DIRECTION_IRRELEVANT, sTargetGridNo, pSoldier->bLevel, pSoldier );
|
||||||
|
|
||||||
|
|
||||||
if( usRange > ( usSightLimit * CELL_X_SIZE ) )
|
if( usRange > ( usSightLimit * CELL_X_SIZE ) )
|
||||||
@@ -935,7 +936,7 @@ INT8 CalcIfSoldierCanSeeGridNo( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo, BOOL
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Lesh: changed 2-nd parameter in DistanceVisible function call
|
// Lesh: changed 2-nd parameter in DistanceVisible function call
|
||||||
usSightLimit = DistanceVisible( pSoldier, (gGameExternalOptions.gfAllowLimitedVision ? pSoldier->bDesiredDirection : DIRECTION_IRRELEVANT), DIRECTION_IRRELEVANT, sTargetGridNo, fRoof, pSoldier );
|
usSightLimit = DistanceVisible( pSoldier, (SoldierHasLimitedVision(pSoldier) ? pSoldier->bDesiredDirection : DIRECTION_IRRELEVANT), DIRECTION_IRRELEVANT, sTargetGridNo, fRoof, pSoldier );
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
+15
-7
@@ -1098,7 +1098,7 @@ INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Lesh: added this
|
// Lesh: added this
|
||||||
if( gGameExternalOptions.gfAllowLimitedVision )
|
if( SoldierHasLimitedVision(pSoldier) )
|
||||||
{
|
{
|
||||||
bSubjectDir = (INT8) GetDirectionToGridNoFromGridNo( pSoldier->sGridNo, sSubjectGridNo );
|
bSubjectDir = (INT8) GetDirectionToGridNoFromGridNo( pSoldier->sGridNo, sSubjectGridNo );
|
||||||
}
|
}
|
||||||
@@ -1106,7 +1106,7 @@ INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir,
|
|||||||
sDistVisible = gbLookDistance[bFacingDir][bSubjectDir];
|
sDistVisible = gbLookDistance[bFacingDir][bSubjectDir];
|
||||||
|
|
||||||
// Lesh: and this
|
// Lesh: and this
|
||||||
if ( (sDistVisible == 0) && (gGameExternalOptions.gfAllowLimitedVision) )
|
if ( (sDistVisible == 0) && (SoldierHasLimitedVision(pSoldier)) )
|
||||||
return(0);
|
return(0);
|
||||||
|
|
||||||
if ( sDistVisible != STRAIGHT )
|
if ( sDistVisible != STRAIGHT )
|
||||||
@@ -1260,7 +1260,7 @@ void EndMuzzleFlash( SOLDIERTYPE * pSoldier )
|
|||||||
{
|
{
|
||||||
if ( pOtherSoldier->sGridNo != NOWHERE )
|
if ( pOtherSoldier->sGridNo != NOWHERE )
|
||||||
{
|
{
|
||||||
if ( PythSpacesAway( pOtherSoldier->sGridNo, pSoldier->sGridNo ) > DistanceVisible( pOtherSoldier, (gGameExternalOptions.gfAllowLimitedVision ? pOtherSoldier->bDesiredDirection : DIRECTION_IRRELEVANT), DIRECTION_IRRELEVANT, pSoldier->sGridNo, pSoldier->bLevel, pSoldier ) )
|
if ( PythSpacesAway( pOtherSoldier->sGridNo, pSoldier->sGridNo ) > DistanceVisible( pOtherSoldier, (SoldierHasLimitedVision(pSoldier) ? pOtherSoldier->bDesiredDirection : DIRECTION_IRRELEVANT), DIRECTION_IRRELEVANT, pSoldier->sGridNo, pSoldier->bLevel, pSoldier ) )
|
||||||
{
|
{
|
||||||
// if this guy can no longer see us, change to seen this turn
|
// if this guy can no longer see us, change to seen this turn
|
||||||
HandleManNoLongerSeen( pOtherSoldier, pSoldier, &(pOtherSoldier->bOppList[ pSoldier->ubID ]), &(gbPublicOpplist[ pOtherSoldier->bTeam ][ pSoldier->ubID ] ) );
|
HandleManNoLongerSeen( pOtherSoldier, pSoldier, &(pOtherSoldier->bOppList[ pSoldier->ubID ]), &(gbPublicOpplist[ pOtherSoldier->bTeam ][ pSoldier->ubID ] ) );
|
||||||
@@ -1799,7 +1799,7 @@ INT16 ManLooksForMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, UINT8 ubCall
|
|||||||
bAware = TRUE;
|
bAware = TRUE;
|
||||||
|
|
||||||
// then we look for him full viewing distance in EVERY direction
|
// then we look for him full viewing distance in EVERY direction
|
||||||
sDistVisible = DistanceVisible(pSoldier, (gGameExternalOptions.gfAllowLimitedVision ? pSoldier->bDesiredDirection : DIRECTION_IRRELEVANT), 0, pOpponent->sGridNo, pOpponent->bLevel, pOpponent );
|
sDistVisible = DistanceVisible(pSoldier, (SoldierHasLimitedVision(pSoldier) ? pSoldier->bDesiredDirection : DIRECTION_IRRELEVANT), 0, pOpponent->sGridNo, pOpponent->bLevel, pOpponent );
|
||||||
//if (pSoldier->ubID == 0)
|
//if (pSoldier->ubID == 0)
|
||||||
//sprintf(gDebugStr,"ALREADY KNOW: ME %d him %d val %d",pSoldier->ubID,pOpponent->ubID,pSoldier->bOppList[pOpponent->ubID]);
|
//sprintf(gDebugStr,"ALREADY KNOW: ME %d him %d val %d",pSoldier->ubID,pOpponent->ubID,pSoldier->bOppList[pOpponent->ubID]);
|
||||||
}
|
}
|
||||||
@@ -5635,7 +5635,7 @@ void HearNoise(SOLDIERTYPE *pSoldier, UINT8 ubNoiseMaker, UINT16 sGridNo, INT8 b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sDistVisible = DistanceVisible( pSoldier, (gGameExternalOptions.gfAllowLimitedVision ? pSoldier->bDesiredDirection : DIRECTION_IRRELEVANT), DIRECTION_IRRELEVANT, sGridNo, bLevel, pSoldier );
|
sDistVisible = DistanceVisible( pSoldier, (SoldierHasLimitedVision(pSoldier) ? pSoldier->bDesiredDirection : DIRECTION_IRRELEVANT), DIRECTION_IRRELEVANT, sGridNo, bLevel, pSoldier );
|
||||||
|
|
||||||
if ( fMuzzleFlash )
|
if ( fMuzzleFlash )
|
||||||
{
|
{
|
||||||
@@ -6485,7 +6485,7 @@ void NoticeUnseenAttacker( SOLDIERTYPE * pAttacker, SOLDIERTYPE * pDefender, INT
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ubTileSightLimit = (UINT8) DistanceVisible( pDefender, (gGameExternalOptions.gfAllowLimitedVision ? pDefender->bDesiredDirection : DIRECTION_IRRELEVANT), 0, pAttacker->sGridNo, pAttacker->bLevel, pAttacker );
|
ubTileSightLimit = (UINT8) DistanceVisible( pDefender, (SoldierHasLimitedVision(pDefender) ? pDefender->bDesiredDirection : DIRECTION_IRRELEVANT), 0, pAttacker->sGridNo, pAttacker->bLevel, pAttacker );
|
||||||
if (SoldierToSoldierLineOfSightTest( pDefender, pAttacker, ubTileSightLimit, TRUE ) != 0)
|
if (SoldierToSoldierLineOfSightTest( pDefender, pAttacker, ubTileSightLimit, TRUE ) != 0)
|
||||||
{
|
{
|
||||||
fSeesAttacker = TRUE;
|
fSeesAttacker = TRUE;
|
||||||
@@ -6745,7 +6745,7 @@ INT8 GetHighestVisibleWatchedLoc( UINT8 ubID )
|
|||||||
{
|
{
|
||||||
if ( gsWatchedLoc[ ubID ][ bLoop ] != NOWHERE && gubWatchedLocPoints[ ubID ][ bLoop ] > bHighestPoints )
|
if ( gsWatchedLoc[ ubID ][ bLoop ] != NOWHERE && gubWatchedLocPoints[ ubID ][ bLoop ] > bHighestPoints )
|
||||||
{
|
{
|
||||||
sDistVisible = DistanceVisible( MercPtrs[ ubID ], (gGameExternalOptions.gfAllowLimitedVision ? MercPtrs[ ubID ]->bDesiredDirection : DIRECTION_IRRELEVANT), DIRECTION_IRRELEVANT, gsWatchedLoc[ ubID ][ bLoop ], gbWatchedLocLevel[ ubID ][ bLoop ], MercPtrs[ubID] );
|
sDistVisible = DistanceVisible( MercPtrs[ ubID ], (SoldierHasLimitedVision(MercPtrs[ ubID ]) ? MercPtrs[ ubID ]->bDesiredDirection : DIRECTION_IRRELEVANT), DIRECTION_IRRELEVANT, gsWatchedLoc[ ubID ][ bLoop ], gbWatchedLocLevel[ ubID ][ bLoop ], MercPtrs[ubID] );
|
||||||
// look at standing height
|
// look at standing height
|
||||||
if ( SoldierTo3DLocationLineOfSightTest( MercPtrs[ ubID ], gsWatchedLoc[ ubID ][ bLoop ], gbWatchedLocLevel[ ubID ][ bLoop ], 3, (UINT8) sDistVisible, TRUE ) )
|
if ( SoldierTo3DLocationLineOfSightTest( MercPtrs[ ubID ], gsWatchedLoc[ ubID ][ bLoop ], gbWatchedLocLevel[ ubID ][ bLoop ], 3, (UINT8) sDistVisible, TRUE ) )
|
||||||
{
|
{
|
||||||
@@ -6950,3 +6950,11 @@ void MakeBloodcatsHostile( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOLEAN SoldierHasLimitedVision(SOLDIERTYPE * pSoldier)
|
||||||
|
{
|
||||||
|
if ( GetPercentTunnelVision(pSoldier) > 0 || gGameExternalOptions.gfAllowLimitedVision )
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
@@ -148,4 +148,6 @@ void AddToShouldBecomeHostileOrSayQuoteList( UINT8 ubID );
|
|||||||
|
|
||||||
extern INT8 gbLightSighting[1][16];
|
extern INT8 gbLightSighting[1][16];
|
||||||
|
|
||||||
|
BOOLEAN SoldierHasLimitedVision(SOLDIERTYPE * pSoldier);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user