mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Bugfix from Flugente: enemies collapsing
-during the drug upkeep, the strength value of the soldiers was set to 1, which is why they were exhausted very fast by what little inventory they had Also - Now we read in (and OR together) a variable number of AvailableAttachmentPoint tags from items.xml. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5238 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -358,7 +358,9 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Flugente: always do the following checks. Thereby, if the effect runs out, our stats will be back to normal
|
// Flugente: always do the following checks. Thereby, if the effect runs out, our stats will be back to normal
|
||||||
|
// only do the checks for the player team, as soldiers do not have a gMercProfiles
|
||||||
|
if ( pSoldier->bTeam == gbPlayerNum)
|
||||||
|
{
|
||||||
//////////////// STRENGTH ////////////////
|
//////////////// STRENGTH ////////////////
|
||||||
// strength we would normally have right now
|
// strength we would normally have right now
|
||||||
INT8 strength = gMercProfiles[ pSoldier->ubProfile ].bStrength - pSoldier->ubCriticalStatDamage[ DAMAGED_STAT_STRENGTH ];
|
INT8 strength = gMercProfiles[ pSoldier->ubProfile ].bStrength - pSoldier->ubCriticalStatDamage[ DAMAGED_STAT_STRENGTH ];
|
||||||
@@ -472,6 +474,7 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
|
|||||||
DeductPoints( pSoldier, 0, 20000 );
|
DeductPoints( pSoldier, 0, 20000 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
INT8 GetDrugEffect( SOLDIERTYPE *pSoldier, UINT8 ubDrugType )
|
INT8 GetDrugEffect( SOLDIERTYPE *pSoldier, UINT8 ubDrugType )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
#define REGEN_POINTS_PER_BOOSTER 4
|
#define REGEN_POINTS_PER_BOOSTER 4
|
||||||
#define LIFE_GAIN_PER_REGEN_POINT 10
|
#define LIFE_GAIN_PER_REGEN_POINT 10
|
||||||
|
|
||||||
|
extern UINT8 gbPlayerNum;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
DRUG_TYPE_ADRENALINE = 0,
|
DRUG_TYPE_ADRENALINE = 0,
|
||||||
DRUG_TYPE_ALCOHOL,
|
DRUG_TYPE_ALCOHOL,
|
||||||
|
|||||||
+1
-1
@@ -541,7 +541,7 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
|||||||
else if(strcmp(name, "AvailableAttachmentPoint") == 0)
|
else if(strcmp(name, "AvailableAttachmentPoint") == 0)
|
||||||
{
|
{
|
||||||
pData->curElement = ELEMENT;
|
pData->curElement = ELEMENT;
|
||||||
pData->curItem.ulAvailableAttachmentPoint = (UINT64) atof(pData->szCharData);
|
pData->curItem.ulAvailableAttachmentPoint |= (UINT64) atof(pData->szCharData);
|
||||||
}
|
}
|
||||||
else if(strcmp(name, "AttachmentPoint") == 0)
|
else if(strcmp(name, "AttachmentPoint") == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user