Skip to content

Commit

Permalink
Merge pull request #137 from ChilliHugger/bug/136-ddr-strongholds-don…
Browse files Browse the repository at this point in the history
…t-change-occupier-if-the-race-is-the-same

#136 DDR - Make stronghold correctly change sides
IcemarkUK authored Jul 14, 2022
2 parents a3d6d30 + 4585d22 commit ff52044
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions main/midnight/src/tme/scenarios/ddr/ddr_stronghold.cpp
Original file line number Diff line number Diff line change
@@ -29,21 +29,13 @@ namespace tme {

void ddr_stronghold::MakeChangeSides( mxrace_t newrace, mxcharacter* newoccupier )
{
// if the new occupier is allowed an army then
// the stronghold army will be his race
if ( newoccupier && newoccupier->IsAllowedArmy() )
newrace = newoccupier->Race();

if ( newrace != OccupyingRace() ) {
occupyingrace = newrace ;

totaltroops = 0 ;//Respawn() ; // respawn will happen at night
owner = newoccupier ;

occupier = newoccupier ;

type = static_cast<ddr_character*>(newoccupier)->getArmyType();
}
RETURN_IF_NULL(newoccupier);

occupyingrace = newrace ;
totaltroops = 0 ; // respawn will happen at night
owner = newoccupier ;
occupier = newoccupier ;
type = static_cast<ddr_character*>(newoccupier)->getArmyType();

}

0 comments on commit ff52044

Please sign in to comment.