mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Bugfixes (by Flugente)
- added a flag that drastically lowers the time needed for drug evaluations - FIX: fixed a but that could lead to iron sights be used although they were forbidden - FIX: scopes/sights are also selectable if they do not have a magnification factor (1.0 is used) - FIX: sector cooldown to zero didn't work as intended git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5372 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -66,6 +66,9 @@ BOOLEAN ApplyDrugs( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObject )
|
||||
gMercProfiles[ LARRY_DRUNK ].bNPCData = 0;
|
||||
}
|
||||
|
||||
// set flag: we are on drugs
|
||||
pSoldier->bSoldierFlagMask |= SOLDIER_DRUGGED;
|
||||
|
||||
// Flugente: we have to check for every single type of drug ( a drug applied may consist of several 'pure' drug types)
|
||||
for (UINT8 i = DRUG_TYPE_ADRENALINE; i < DRUG_TYPE_MAX; ++i)
|
||||
{
|
||||
@@ -244,6 +247,10 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
|
||||
INT32 cnt, cnt2;
|
||||
INT32 iNumLoops;
|
||||
|
||||
// if were not on drugs, nothing to do here
|
||||
if ( ( pSoldier->bSoldierFlagMask & SOLDIER_DRUGGED ) == 0 )
|
||||
return;
|
||||
|
||||
// We test for every 'pure' drug separately
|
||||
for (cnt = DRUG_TYPE_ADRENALINE; cnt < DRUG_TYPE_MAX; ++cnt)
|
||||
{
|
||||
@@ -424,6 +431,10 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if all drug effects have ended, delete flag
|
||||
if ( !MercUnderTheInfluence(pSoldier) )
|
||||
pSoldier->bSoldierFlagMask &= ~SOLDIER_DRUGGED;
|
||||
}
|
||||
|
||||
INT8 GetDrugEffect( SOLDIERTYPE *pSoldier, UINT8 ubDrugType )
|
||||
|
||||
Reference in New Issue
Block a user