mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Bugfixes / Improvements (macros) of Assignments (by Franimus)
- Fixed warning for INT8 overflow on scroll region priority, seemingly had no effect though - Use new assignment macros - Bugfix - POWs' activity level being overwritten - Feature - automatically bandage bleeding mercs on a PATIENT assignment - Bugfix - mercs treated at facilities should not use mercs' medkits - Added 3 new enums for facility doctor, patient, and repair - Bugfix for facility patients not detected as being in a facility - Bugfix - iBurstAPCost was ignoring half of its calculation due to extraneous semicolon git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7988 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -105,12 +105,18 @@ void HandleDisease()
|
||||
// infection chance gets modified depending on assignments
|
||||
FLOAT modifier = 1.0f;
|
||||
|
||||
// if both are in the same squad, chance is increased
|
||||
if ( pTeamSoldier->bAssignment == pSoldier->bAssignment && pSoldier->bAssignment < ON_DUTY )
|
||||
// if both are in the same squad or vehicle, chance is increased
|
||||
if (pTeamSoldier->bAssignment == pSoldier->bAssignment &&
|
||||
(pSoldier->bAssignment < ON_DUTY ||
|
||||
(pSoldier->bAssignment == VEHICLE && pSoldier->iVehicleId == pTeamSoldier->iVehicleId)))
|
||||
{
|
||||
modifier = 1.5;
|
||||
}
|
||||
// doctor-patient relations increase chance even more
|
||||
else if ( (pTeamSoldier->bAssignment == DOCTOR || pTeamSoldier->bAssignment == PATIENT) && (pSoldier->bAssignment == DOCTOR || pSoldier->bAssignment == PATIENT) )
|
||||
else if (IS_PATIENT(pTeamSoldier->bAssignment) && IS_PATIENT(pSoldier->bAssignment))
|
||||
{
|
||||
modifier = 4;
|
||||
}
|
||||
|
||||
// we might get a disease from this...
|
||||
HandlePossibleInfection( pSoldier, pTeamSoldier, INFECTION_TYPE_CONTACT_HUMAN, modifier );
|
||||
|
||||
Reference in New Issue
Block a user