mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Initial commit - SVN checkpoint to git branch
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#pragma optimize("",off)
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "AI All.h"
|
||||
#include "DisplayCover.h"
|
||||
@@ -34,6 +35,7 @@
|
||||
#include "UI Cursors.h"
|
||||
#include "soldier profile type.h"
|
||||
#include "Interface Cursors.h" // added by Flugente for UICursorDefines
|
||||
#include "Rebel Command.h"
|
||||
#endif
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
@@ -759,7 +761,7 @@ void CalculateCoverFromSoldier( SOLDIERTYPE* pFromSoldier, const INT32& sTargetG
|
||||
{
|
||||
const UINT8& ubStance = animArr[i];
|
||||
|
||||
INT32 usAdjustedSight;
|
||||
INT32 usAdjustedSight = 0;
|
||||
|
||||
if (pToSoldier == NULL) {
|
||||
usAdjustedSight = usSightLimit;
|
||||
@@ -767,6 +769,8 @@ void CalculateCoverFromSoldier( SOLDIERTYPE* pFromSoldier, const INT32& sTargetG
|
||||
usAdjustedSight = usSightLimit + usSightLimit * GetSightAdjustment( pToSoldier, GetStealth(pToSoldier), GetSightAdjustmentBasedOnLBE(pToSoldier), sTargetGridNo, (INT8) fRoof, ubStance ) /100;
|
||||
}
|
||||
|
||||
RebelCommand::ApplyVisionModifier(pFromSoldier, usAdjustedSight);
|
||||
|
||||
if ( SoldierToVirtualSoldierLineOfSightTest( pFromSoldier, sTargetGridNo, (INT8) fRoof, ubStance, FALSE, usAdjustedSight ) != 0 )
|
||||
{
|
||||
if ( bOverlayType > i ) bOverlayType = i;
|
||||
@@ -784,7 +788,7 @@ static void CalculateCoverFromEnemySoldier(SOLDIERTYPE* pFromSoldier, const INT3
|
||||
{
|
||||
const UINT8& ubStance = animArr[i];
|
||||
|
||||
INT32 usAdjustedSight;
|
||||
INT32 usAdjustedSight = 0;
|
||||
|
||||
if (pToSoldier == nullptr) {
|
||||
usAdjustedSight = usSightLimit;
|
||||
@@ -793,6 +797,8 @@ static void CalculateCoverFromEnemySoldier(SOLDIERTYPE* pFromSoldier, const INT3
|
||||
usAdjustedSight = usSightLimit + usSightLimit * GetSightAdjustment(pToSoldier, ToSoldierStealth, ToSoldierLBeSightAdjustment, sTargetGridNo, (INT8)fRoof, ubStance) / 100;
|
||||
}
|
||||
|
||||
RebelCommand::ApplyVisionModifier(pFromSoldier, usAdjustedSight);
|
||||
|
||||
if (SoldierToVirtualSoldierLineOfSightTest(pFromSoldier, sTargetGridNo, (INT8)fRoof, ubStance, FALSE, usAdjustedSight) != 0)
|
||||
{
|
||||
if (bOverlayType > i) bOverlayType = i;
|
||||
|
||||
Reference in New Issue
Block a user