mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Increased max possible soldiers stored for friendly fire check to 256.
Friendly fire chance code also checks for soldiers of the same side and optionally neutral civilians. CalcCoverValue: check friendly fire chance for each position, penalize position if friendly fire chance is high (needs AI_BETTER_COVER = TRUE) UnderFire::Add: - store friendly fire CTH for new added person - use max value when replacing friendly fire CTH for existing person CalcBestShot: - check CTGT and friendly fire chance for every stance - ignore possible shot if can hit friends in this stance CalcMoraleNew: improved code to make enemy slightly more aggressive. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8873 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -146,7 +146,7 @@ public:
|
||||
};
|
||||
|
||||
//dnl ch61 180813
|
||||
#define MAXUNDERFIRE 100
|
||||
#define MAXUNDERFIRE 256
|
||||
class UnderFire
|
||||
{
|
||||
private:
|
||||
@@ -155,14 +155,14 @@ private:
|
||||
UINT16 usUnderFireID[MAXUNDERFIRE];
|
||||
UINT8 ubUnderFireCTH[MAXUNDERFIRE];
|
||||
public:
|
||||
UnderFire(void){ Clear(); }
|
||||
UnderFire(void){ Clear(); fEnable = FALSE; }
|
||||
void Clear(void);
|
||||
void Add(UINT16 usID, UINT8 ubCTH);
|
||||
void Enable(void){ fEnable=TRUE; }
|
||||
void Disable(void){ fEnable=FALSE; }
|
||||
UINT16 GetUnderFireCnt(void){ return(usUnderFireCnt); }
|
||||
UINT16 Count(INT8 bTeam);
|
||||
UINT8 Chance(INT8 bTeam);
|
||||
UINT8 Chance(INT8 bTeam, INT8 bSide, BOOLEAN fCheckNeutral);
|
||||
};
|
||||
extern UnderFire gUnderFire;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user