mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- Fix: machines have opinions
- Fix: machines get diseases - Fix: disease assignment menu box accessible if feature is off git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8093 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -18371,6 +18371,10 @@ void SOLDIERTYPE::Infect( UINT8 aDisease )
|
||||
if ( !gGameExternalOptions.fDisease )
|
||||
return;
|
||||
|
||||
// diseases should not affect machines
|
||||
if ( (this->flags.uiStatusFlags & SOLDIER_VEHICLE) || AM_A_ROBOT( this ) )
|
||||
return;
|
||||
|
||||
// we are getting infected. Raise our disease points, but not over the level of an infection
|
||||
if ( aDisease < NUM_DISEASES && this->sDiseasePoints[aDisease] < Disease[aDisease].sInfectionPtsInitial )
|
||||
{
|
||||
@@ -18404,6 +18408,10 @@ void SOLDIERTYPE::AddDiseasePoints( UINT8 aDisease, INT32 aVal )
|
||||
if ( !gGameExternalOptions.fDisease )
|
||||
return;
|
||||
|
||||
// diseases should not affect machines
|
||||
if ( (this->flags.uiStatusFlags & SOLDIER_VEHICLE) || AM_A_ROBOT( this ) )
|
||||
return;
|
||||
|
||||
if ( aDisease < NUM_DISEASES )
|
||||
{
|
||||
this->sDiseasePoints[aDisease] = min( Disease[aDisease].sInfectionPtsFull, max( this->sDiseasePoints[aDisease] + aVal, -Disease[aDisease].sInfectionPtsOutbreak ) );
|
||||
|
||||
Reference in New Issue
Block a user