Skip to content

Commit

Permalink
#136 DDR - Make stronghold correctly change sides
Browse files Browse the repository at this point in the history
  • Loading branch information
IcemarkUK committed Jul 14, 2022
1 parent a3d6d30 commit 4585d22
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
Expand Up @@ -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();

}

Expand Down

0 comments on commit 4585d22

Please sign in to comment.