Skip to content
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ class AIUpdateModuleData : public UpdateModuleData
#endif

AIUpdateModuleData();
virtual ~AIUpdateModuleData();
virtual ~AIUpdateModuleData() override;

virtual Bool isAiModuleData() const { return true; }
virtual Bool isAiModuleData() const override { return true; }

const LocomotorTemplateVector* findLocomotorTemplateVector(LocomotorSetType t) const;
static void buildFieldParse(MultiIniFieldParse& p);
Expand Down Expand Up @@ -291,10 +291,10 @@ class AIUpdateInterface : public UpdateModule, public AICommandInterface
AIUpdateInterface( Thing *thing, const ModuleData* moduleData );
// virtual destructor prototype provided by memory pool declaration

virtual AIUpdateInterface* getAIUpdateInterface() { return this; }
virtual AIUpdateInterface* getAIUpdateInterface() override { return this; }

// Disabled conditions to process (AI will still process held status)
virtual DisabledMaskType getDisabledTypesToProcess() const { return MAKE_DISABLED_MASK( DISABLED_HELD ); }
virtual DisabledMaskType getDisabledTypesToProcess() const override { return MAKE_DISABLED_MASK( DISABLED_HELD ); }

// Some very specific, complex behaviors are used by more than one AIUpdate. Here are their interfaces.
virtual DozerAIInterface* getDozerAIInterface() {return nullptr;}
Expand Down Expand Up @@ -337,10 +337,10 @@ class AIUpdateInterface : public UpdateModule, public AICommandInterface
//Definition of busy -- when explicitly in the busy state. Moving or attacking is not considered busy!
virtual Bool isBusy() const;

virtual void onObjectCreated();
virtual void onObjectCreated() override;
virtual void doQuickExit( std::vector<Coord3D>* path ); ///< get out of this Object

virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(const AICommandParms* parms) override;

virtual const Coord3D *getGuardLocation() const { return &m_locationToGuard; }
virtual ObjectID getGuardObject() const { return m_objectToGuard; }
Expand Down Expand Up @@ -511,7 +511,7 @@ class AIUpdateInterface : public UpdateModule, public AICommandInterface
Bool hasHigherPathPriority(AIUpdateInterface *otherAI) const;
void setFinalPosition(const Coord3D *pos) { m_finalPosition = *pos; m_doFinalPosition = false;}

virtual UpdateSleepTime update(); ///< update this object's AI
virtual UpdateSleepTime update() override; ///< update this object's AI

/// if we are attacking "fromID", stop that and attack "toID" instead
void transferAttack(ObjectID fromID, ObjectID toID);
Expand Down Expand Up @@ -589,7 +589,7 @@ class AIUpdateInterface : public UpdateModule, public AICommandInterface
interesting oscillations can occur in some situations, with friction being applied
either before or after the locomotive force, making for huge stuttery messes. (srj)
*/
virtual SleepyUpdatePhase getUpdatePhase() const { return PHASE_INITIAL; }
virtual SleepyUpdatePhase getUpdatePhase() const override { return PHASE_INITIAL; }

void setGoalPositionClipped(const Coord3D* in, CommandSourceType cmdSource);

Expand Down
58 changes: 29 additions & 29 deletions Generals/Code/GameEngine/Include/GameLogic/Module/ActiveBody.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,46 +68,46 @@ class ActiveBody : public BodyModule
ActiveBody( Thing *thing, const ModuleData* moduleData );
// virtual destructor prototype provided by memory pool declaration

virtual void onDelete();
virtual void onDelete() override;

virtual void attemptDamage( DamageInfo *damageInfo ); ///< try to damage this object
virtual Real estimateDamage( DamageInfoInput& damageInfo ) const;
virtual void attemptHealing( DamageInfo *damageInfo ); ///< try to heal this object
virtual Real getHealth() const; ///< get current health
virtual BodyDamageType getDamageState() const;
virtual void setDamageState( BodyDamageType newState ); ///< control damage state directly. Will adjust hitpoints.
virtual void setAflame( Bool setting );///< This is a major change like a damage state.
virtual void attemptDamage( DamageInfo *damageInfo ) override; ///< try to damage this object
virtual Real estimateDamage( DamageInfoInput& damageInfo ) const override;
virtual void attemptHealing( DamageInfo *damageInfo ) override; ///< try to heal this object
virtual Real getHealth() const override; ///< get current health
virtual BodyDamageType getDamageState() const override;
virtual void setDamageState( BodyDamageType newState ) override; ///< control damage state directly. Will adjust hitpoints.
virtual void setAflame( Bool setting ) override;///< This is a major change like a damage state.

virtual const DamageInfo *getLastDamageInfo() const { return &m_lastDamageInfo; } ///< return info on last damage dealt to this object
virtual UnsignedInt getLastDamageTimestamp() const { return m_lastDamageTimestamp; } ///< return frame of last damage dealt
virtual UnsignedInt getLastHealingTimestamp() const { return m_lastHealingTimestamp; } ///< return frame of last damage dealt
virtual ObjectID getClearableLastAttacker() const { return (m_lastDamageCleared ? INVALID_ID : m_lastDamageInfo.in.m_sourceID); }
virtual void clearLastAttacker() { m_lastDamageCleared = true; }
virtual const DamageInfo *getLastDamageInfo() const override { return &m_lastDamageInfo; } ///< return info on last damage dealt to this object
virtual UnsignedInt getLastDamageTimestamp() const override { return m_lastDamageTimestamp; } ///< return frame of last damage dealt
virtual UnsignedInt getLastHealingTimestamp() const override { return m_lastHealingTimestamp; } ///< return frame of last damage dealt
virtual ObjectID getClearableLastAttacker() const override { return (m_lastDamageCleared ? INVALID_ID : m_lastDamageInfo.in.m_sourceID); }
virtual void clearLastAttacker() override { m_lastDamageCleared = true; }

void onVeterancyLevelChanged( VeterancyLevel oldLevel, VeterancyLevel newLevel, Bool provideFeedback = TRUE );
virtual void onVeterancyLevelChanged( VeterancyLevel oldLevel, VeterancyLevel newLevel, Bool provideFeedback = TRUE ) override;

virtual void setArmorSetFlag(ArmorSetType ast) { m_curArmorSetFlags.set(ast, 1); }
virtual void clearArmorSetFlag(ArmorSetType ast) { m_curArmorSetFlags.set(ast, 0); }
virtual void setArmorSetFlag(ArmorSetType ast) override { m_curArmorSetFlags.set(ast, 1); }
virtual void clearArmorSetFlag(ArmorSetType ast) override { m_curArmorSetFlags.set(ast, 0); }

virtual void setInitialHealth(Int initialPercent); ///< Sets the initial load health %.
virtual void setMaxHealth( Real maxHealth, MaxHealthChangeType healthChangeType = SAME_CURRENTHEALTH ); ///< Sets the initial max health
virtual void setInitialHealth(Int initialPercent) override; ///< Sets the initial load health %.
virtual void setMaxHealth( Real maxHealth, MaxHealthChangeType healthChangeType = SAME_CURRENTHEALTH ) override; ///< Sets the initial max health

virtual Bool getFrontCrushed() const { return m_frontCrushed; }
virtual Bool getBackCrushed() const { return m_backCrushed; }
virtual Bool getFrontCrushed() const override { return m_frontCrushed; }
virtual Bool getBackCrushed() const override { return m_backCrushed; }

virtual void setFrontCrushed(Bool v) { m_frontCrushed = v; }
virtual void setBackCrushed(Bool v) { m_backCrushed = v; }
virtual void setFrontCrushed(Bool v) override { m_frontCrushed = v; }
virtual void setBackCrushed(Bool v) override { m_backCrushed = v; }

virtual Real getMaxHealth() const; ///< return max health
virtual Real getInitialHealth() const; // return initial health
virtual Real getMaxHealth() const override; ///< return max health
virtual Real getInitialHealth() const override; // return initial health

virtual void setIndestructible( Bool indestructible );
virtual Bool isIndestructible() const { return m_indestructible; }
virtual void setIndestructible( Bool indestructible ) override;
virtual Bool isIndestructible() const override { return m_indestructible; }

virtual void internalChangeHealth( Real delta ); ///< change health
virtual void internalChangeHealth( Real delta ) override; ///< change health

virtual void evaluateVisualCondition();
virtual void updateBodyParticleSystems();// made public for topple anf building collapse updates -ML
virtual void evaluateVisualCondition() override;
virtual void updateBodyParticleSystems() override;// made public for topple anf building collapse updates -ML

protected:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ActiveShroudUpgrade : public UpgradeModule

protected:

virtual void upgradeImplementation(); ///< Here's the actual work of Upgrading
virtual Bool isSubObjectsUpgrade() { return false; }
virtual void upgradeImplementation() override; ///< Here's the actual work of Upgrading
virtual Bool isSubObjectsUpgrade() override { return false; }

};
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class ArmorUpgrade : public UpgradeModule
// virtual destructor prototype defined by MemoryPoolObject

protected:
virtual void upgradeImplementation( ); ///< Here's the actual work of Upgrading
virtual Bool isSubObjectsUpgrade() { return false; }
virtual void upgradeImplementation( ) override; ///< Here's the actual work of Upgrading
virtual Bool isSubObjectsUpgrade() override { return false; }

};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ class AssaultTransportAIUpdate : public AIUpdateInterface, public AssaultTranspo
AssaultTransportAIUpdate( Thing *thing, const ModuleData* moduleData );
// virtual destructor prototype provided by memory pool declaration

virtual void aiDoCommand(const AICommandParms* parms);
virtual Bool isIdle() const;
virtual UpdateSleepTime update();
virtual AssaultTransportAIInterface* getAssaultTransportAIInterface() { return this; }
virtual const AssaultTransportAIInterface* getAssaultTransportAIInterface() const { return this; }
virtual void beginAssault( const Object *designatedTarget ) const;
virtual void aiDoCommand(const AICommandParms* parms) override;
virtual Bool isIdle() const override;
virtual UpdateSleepTime update() override;
virtual AssaultTransportAIInterface* getAssaultTransportAIInterface() override { return this; }
virtual const AssaultTransportAIInterface* getAssaultTransportAIInterface() const override { return this; }
virtual void beginAssault( const Object *designatedTarget ) const override;

UpdateSleepTime calcSleepTime();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class AssistedTargetingUpdate : public UpdateModule
AssistedTargetingUpdate( Thing *thing, const ModuleData* moduleData );
// virtual destructor prototype provided by memory pool declaration

virtual UpdateSleepTime update();
virtual UpdateSleepTime update() override;

Bool isFreeToAssist() const;
void assistAttack( const Object *requestingObject, Object *victimObject );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class AutoDepositUpdate : public UpdateModule
// virtual destructor prototype provided by memory pool declaration

void awardInitialCaptureBonus( Player *player ); // Test and award the initial capture bonus
virtual UpdateSleepTime update();
virtual UpdateSleepTime update() override;

protected:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class AutoFindHealingUpdate : public UpdateModule
AutoFindHealingUpdate( Thing *thing, const ModuleData* moduleData );
// virtual destructor prototype provided by memory pool declaration

virtual void onObjectCreated();
virtual UpdateSleepTime update();
virtual void onObjectCreated() override;
virtual UpdateSleepTime update() override;

Object* scanClosestTarget();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,46 +117,46 @@ class AutoHealBehavior : public UpdateModule,
static Int getInterfaceMask() { return UpdateModule::getInterfaceMask() | MODULEINTERFACE_UPGRADE | MODULEINTERFACE_DAMAGE; }

// BehaviorModule
virtual UpgradeModuleInterface* getUpgrade() { return this; }
virtual DamageModuleInterface* getDamage() { return this; }
virtual UpgradeModuleInterface* getUpgrade() override { return this; }
virtual DamageModuleInterface* getDamage() override { return this; }

// DamageModuleInterface
virtual void onDamage( DamageInfo *damageInfo );
virtual void onHealing( DamageInfo *damageInfo ) { }
virtual void onBodyDamageStateChange(const DamageInfo* damageInfo, BodyDamageType oldState, BodyDamageType newState) { }
virtual void onDamage( DamageInfo *damageInfo ) override;
virtual void onHealing( DamageInfo *damageInfo ) override { }
virtual void onBodyDamageStateChange(const DamageInfo* damageInfo, BodyDamageType oldState, BodyDamageType newState) override { }

// UpdateModuleInterface
virtual UpdateSleepTime update();
virtual DisabledMaskType getDisabledTypesToProcess() const { return MAKE_DISABLED_MASK( DISABLED_HELD ); }
virtual UpdateSleepTime update() override;
virtual DisabledMaskType getDisabledTypesToProcess() const override { return MAKE_DISABLED_MASK( DISABLED_HELD ); }

void stopHealing();
void undoUpgrade(); ///<pretend like we have not been activated yet, so we can be reactivated later

protected:

virtual void upgradeImplementation()
virtual void upgradeImplementation() override
{
setWakeFrame(getObject(), UPDATE_SLEEP_NONE);
}

virtual void getUpgradeActivationMasks(UpgradeMaskType& activation, UpgradeMaskType& conflicting) const
virtual void getUpgradeActivationMasks(UpgradeMaskType& activation, UpgradeMaskType& conflicting) const override
{
getAutoHealBehaviorModuleData()->m_upgradeMuxData.getUpgradeActivationMasks(activation, conflicting);
}

virtual void performUpgradeFX()
virtual void performUpgradeFX() override
{
getAutoHealBehaviorModuleData()->m_upgradeMuxData.performUpgradeFX(getObject());
}

virtual Bool requiresAllActivationUpgrades() const
virtual Bool requiresAllActivationUpgrades() const override
{
return getAutoHealBehaviorModuleData()->m_upgradeMuxData.m_requiresAllTriggers;
}

Bool isUpgradeActive() const { return isAlreadyUpgraded(); }

virtual Bool isSubObjectsUpgrade() { return false; }
virtual Bool isSubObjectsUpgrade() override { return false; }


private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class BaikonurLaunchPower : public SpecialPowerModule

BaikonurLaunchPower( Thing *thing, const ModuleData *moduleData );

virtual void doSpecialPower( UnsignedInt commandOptions );
virtual void doSpecialPowerAtLocation( const Coord3D *loc, Real angle, UnsignedInt commandOptions );
virtual void doSpecialPower( UnsignedInt commandOptions ) override;
virtual void doSpecialPowerAtLocation( const Coord3D *loc, Real angle, UnsignedInt commandOptions ) override;

protected:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ class BaseRegenerateUpdate : public UpdateModule,
static Int getInterfaceMask() { return UpdateModule::getInterfaceMask() | MODULEINTERFACE_DAMAGE; }

// BehaviorModule
virtual DamageModuleInterface* getDamage() { return this; }
virtual DamageModuleInterface* getDamage() override { return this; }

// UpdateModuleInterface
virtual UpdateSleepTime update();
virtual UpdateSleepTime update() override;

// DamageModuleInterface
virtual void onDamage( DamageInfo *damageInfo );
virtual void onHealing( DamageInfo *damageInfo ) { }
virtual void onBodyDamageStateChange(const DamageInfo* damageInfo, BodyDamageType oldState, BodyDamageType newState) { }
virtual DisabledMaskType getDisabledTypesToProcess() const { return MAKE_DISABLED_MASK( DISABLED_UNDERPOWERED ); }
virtual void onDamage( DamageInfo *damageInfo ) override;
virtual void onHealing( DamageInfo *damageInfo ) override { }
virtual void onBodyDamageStateChange(const DamageInfo* damageInfo, BodyDamageType oldState, BodyDamageType newState) override { }
virtual DisabledMaskType getDisabledTypesToProcess() const override { return MAKE_DISABLED_MASK( DISABLED_UNDERPOWERED ); }

private:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,24 @@ class BattlePlanUpdate : public UpdateModule, public SpecialPowerUpdateInterface
// virtual destructor prototype provided by memory pool declaration

// SpecialPowerUpdateInterface
virtual Bool initiateIntentToDoSpecialPower(const SpecialPowerTemplate *specialPowerTemplate, const Object *targetObj, const Coord3D *targetPos, const Waypoint *way, UnsignedInt commandOptions );
virtual Bool isSpecialAbility() const { return false; }
virtual Bool isSpecialPower() const { return true; }
virtual Bool isActive() const {return m_status != TRANSITIONSTATUS_IDLE;}
virtual SpecialPowerUpdateInterface* getSpecialPowerUpdateInterface() { return this; }
virtual Bool doesSpecialPowerHaveOverridableDestinationActive() const { return false; } //Is it active now?
virtual Bool doesSpecialPowerHaveOverridableDestination() const { return false; } //Does it have it, even if it's not active?
virtual void setSpecialPowerOverridableDestination( const Coord3D *loc ) {}
virtual Bool isPowerCurrentlyInUse( const CommandButton *command = nullptr ) const;
virtual Bool initiateIntentToDoSpecialPower(const SpecialPowerTemplate *specialPowerTemplate, const Object *targetObj, const Coord3D *targetPos, const Waypoint *way, UnsignedInt commandOptions ) override;
virtual Bool isSpecialAbility() const override { return false; }
virtual Bool isSpecialPower() const override { return true; }
virtual Bool isActive() const override {return m_status != TRANSITIONSTATUS_IDLE;}
virtual SpecialPowerUpdateInterface* getSpecialPowerUpdateInterface() override { return this; }
virtual Bool doesSpecialPowerHaveOverridableDestinationActive() const override { return false; } //Is it active now?
virtual Bool doesSpecialPowerHaveOverridableDestination() const override { return false; } //Does it have it, even if it's not active?
virtual void setSpecialPowerOverridableDestination( const Coord3D *loc ) override {}
virtual Bool isPowerCurrentlyInUse( const CommandButton *command = nullptr ) const override;

//Returns the currently active battle plan -- unpacked and ready... returns PLANSTATUS_NONE if in transition!
BattlePlanStatus getActiveBattlePlan() const;

virtual void onObjectCreated();
virtual void onDelete();
virtual UpdateSleepTime update();
virtual void onObjectCreated() override;
virtual void onDelete() override;
virtual UpdateSleepTime update() override;

virtual CommandOption getCommandOption() const;
virtual CommandOption getCommandOption() const override;
protected:

void setStatus( TransitionStatus status );
Expand Down
Loading
Loading