diff --git a/Strategic/Assignments.cpp b/Strategic/Assignments.cpp index 89561ce4..6008ddc8 100644 --- a/Strategic/Assignments.cpp +++ b/Strategic/Assignments.cpp @@ -12220,39 +12220,27 @@ void AssignmentMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason ) break; case ASSIGN_MENU_DOCTOR_DIAGNOSIS: - if ( 1 ) + if ( CanCharacterDiagnoseDisease( pSoldier ) ) { fShowSquadMenu = FALSE; fShowTrainingMenu = FALSE; fShowVehicleMenu = FALSE; fShowFacilityMenu = FALSE; // HEADROCK HAM 3.6: Facility Menu fShowPrisonerMenu = FALSE; + fShowDiseaseMenu = FALSE; fShowRepairMenu = FALSE; fShownContractMenu = FALSE; fTeamPanelDirty = TRUE; fMapScreenBottomDirty = TRUE; pSoldier->bOldAssignment = pSoldier->bAssignment; - - if ( pSoldier->bSectorZ == 0 ) + + if ( DisplayDiseaseMenu( pSoldier ) ) { - fShowDiseaseMenu = FALSE; - - if ( DisplayDiseaseMenu( pSoldier ) ) - { - fShowDiseaseMenu = TRUE; - DetermineBoxPositions( ); - } + fShowDiseaseMenu = TRUE; + DetermineBoxPositions( ); } } - else if ( 0 ) - { - fTeamPanelDirty = TRUE; - fMapScreenBottomDirty = TRUE; - swprintf( sString, zMarksMapScreenText[18], pSoldier->GetName( ) ); - - DoScreenIndependantMessageBox( sString, MSG_BOX_FLAG_OK, NULL ); - } break; case( ASSIGN_MENU_PATIENT ): diff --git a/Tactical/DynamicDialogue.cpp b/Tactical/DynamicDialogue.cpp index 3b9ce5f8..eb312c85 100644 --- a/Tactical/DynamicDialogue.cpp +++ b/Tactical/DynamicDialogue.cpp @@ -1299,7 +1299,11 @@ INT8 GetDynamicOpinion( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent ) { INT32 opinion = 0; - if ( usProfileA == NO_PROFILE || usProfileA == NO_PROFILE ) + if ( usProfileA == NO_PROFILE || usProfileB == NO_PROFILE ) + return opinion; + + // machines aren't people + if ( gMercProfiles[usProfileA].ubBodyType == ROBOTNOWEAPON || gMercProfiles[usProfileB].ubBodyType == ROBOTNOWEAPON ) return opinion; if ( usEvent >= OPINIONEVENT_MAX ) diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 27a9ee2d..4e8dcff0 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -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 ) );