Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Generals/Code/GameEngine/Include/GameLogic/AI.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ class AICommandParmsStorage
Path* m_path;

public:
void store(const AICommandParms& parms);
void store(AICommandParms& parms);
void reconstitute(AICommandParms& parms) const;
void doXfer(Xfer *xfer);
};
Expand All @@ -452,7 +452,7 @@ class AICommandInterface
{
public:

virtual void aiDoCommand(const AICommandParms* parms) = 0;
virtual void aiDoCommand(AICommandParms* parms) = 0;

inline void aiMoveToPosition( const Coord3D *pos, CommandSourceType cmdSource )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class AIUpdateInterface : public UpdateModule, public AICommandInterface
virtual void onObjectCreated();
virtual void doQuickExit( const std::vector<Coord3D>* path ); ///< get out of this Object

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

virtual const Coord3D *getGuardLocation( void ) const { return &m_locationToGuard; }
virtual ObjectID getGuardObject( void ) const { return m_objectToGuard; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ 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 void aiDoCommand(AICommandParms* parms);
virtual Bool isIdle() const;
virtual UpdateSleepTime update();
virtual AssaultTransportAIInterface* getAssaultTransportAIInterface() { return this; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ChinookAIUpdate : public SupplyTruckAIUpdate
// virtual destructor prototype provided by memory pool declaration

virtual UpdateSleepTime update();
virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);
virtual Bool chooseLocomotorSet(LocomotorSetType wst);
// this is present solely for some transports to override, so that they can land before
// allowing people to exit...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class DeployStyleAIUpdate : public AIUpdateInterface
DeployStyleAIUpdate( Thing *thing, const ModuleData* moduleData );
// virtual destructor prototype provided by memory pool declaration

virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);
virtual Bool isIdle() const;
virtual UpdateSleepTime update();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class DozerAIUpdate : public AIUpdateInterface, public DozerAIInterface
// the following methods must be overridden so that if a player issues a command the dozer
// can exit the internal state machine and do whatever the player says
//
virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);


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

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

Real getPackUnpackVariationFactor() const { return getHackInternetAIUpdateModuleData()->m_packUnpackVariationFactor; }
UnsignedInt getUnpackTime() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class JetAIUpdate : public AIUpdateInterface
virtual void onObjectCreated();
virtual void onDelete();

virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);
virtual Bool chooseLocomotorSet(LocomotorSetType wst);
virtual void setLocomotorGoalNone();
virtual Bool isIdle() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class POWTruckAIUpdate : public AIUpdateInterface,
// the following methods must be overridden so that if a player issues a command the dozer
// can exit the internal state machine and do whatever the player says
//
virtual void aiDoCommand( const AICommandParms *parms );
virtual void aiDoCommand( AICommandParms *parms );

protected:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class RailedTransportAIUpdate : public AIUpdateInterface
// virtual destructor prototype provided by memory pool declaration

// AIUpdate interface methods
virtual void aiDoCommand( const AICommandParms *parms );
virtual void aiDoCommand( AICommandParms *parms );
virtual UpdateSleepTime update( void );

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class WorkerAIUpdate : public AIUpdateInterface, public DozerAIInterface, public
// the following methods must be overridden so that if a player issues a command the dozer
// can exit the internal state machine and do whatever the player says
//
virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);

// Supply truck stuff
virtual Int getNumberBoxes() const { return m_numberBoxes; }
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ AICommandParms::AICommandParms(AICommandType cmd, CommandSourceType cmdSource) :
}

//----------------------------------------------------------------------------------------------------------
void AICommandParmsStorage::store(const AICommandParms& parms)
void AICommandParmsStorage::store(AICommandParms& parms)
{
m_cmd = parms.m_cmd;
m_cmdSource = parms.m_cmdSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2554,7 +2554,7 @@ Bool AIUpdateInterface::isAllowedToRespondToAiCommands(const AICommandParms* par
}

//-------------------------------------------------------------------------------------------------
void AIUpdateInterface::aiDoCommand(const AICommandParms* parms)
void AIUpdateInterface::aiDoCommand(AICommandParms* parms)
{
// TheSuperHackers @info The AiCommandParms for m_obj, m_otherObj and m_team should be null tested before use.
// These variables could relate to a deleted object when a pending command is reconstituted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ AssaultTransportAIUpdate::~AssaultTransportAIUpdate( void )
}

//-------------------------------------------------------------------------------------------------
void AssaultTransportAIUpdate::aiDoCommand(const AICommandParms* parms)
void AssaultTransportAIUpdate::aiDoCommand(AICommandParms* parms)
{
//Inspect the command and reset everything when necessary.
if( parms->m_cmdSource != CMD_FROM_AI )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ void ChinookAIUpdate::privateCombatDrop( Object* target, const Coord3D& pos, Com
}

//-------------------------------------------------------------------------------------------------
void ChinookAIUpdate::aiDoCommand(const AICommandParms* parms)
void ChinookAIUpdate::aiDoCommand(AICommandParms* parms)
{
// this gets reset every time a command is issued.
setAirfieldForHealing(INVALID_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void DeployStyleAIUpdate::reset()
}

//-------------------------------------------------------------------------------------------------
void DeployStyleAIUpdate::aiDoCommand( const AICommandParms* parms )
void DeployStyleAIUpdate::aiDoCommand( AICommandParms* parms )
{
if (!isAllowedToRespondToAiCommands(parms))
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ Real DozerAIUpdate::getBoredRange( void ) const
///////////////////////////////////////////////////////////////////////////////////////////////////

//-------------------------------------------------------------------------------------------------
void DozerAIUpdate::aiDoCommand(const AICommandParms* parms)
void DozerAIUpdate::aiDoCommand(AICommandParms* parms)
{

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ UpdateSleepTime HackInternetAIUpdate::update( void )
}

//-------------------------------------------------------------------------------------------------
void HackInternetAIUpdate::aiDoCommand(const AICommandParms* parms)
void HackInternetAIUpdate::aiDoCommand(AICommandParms* parms)
{
if (!isAllowedToRespondToAiCommands(parms))
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2303,7 +2303,7 @@ Bool JetAIUpdate::isParkedAt(const Object* obj) const
}

//-------------------------------------------------------------------------------------------------
void JetAIUpdate::aiDoCommand(const AICommandParms* parms)
void JetAIUpdate::aiDoCommand(AICommandParms* parms)
{
// call this from aiDoCommand as well as update, because this can
// be called before update ever is... if the unit is placed on a map,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void POWTruckAIUpdate::onDelete( void )

// ------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
void POWTruckAIUpdate::aiDoCommand( const AICommandParms *parms )
void POWTruckAIUpdate::aiDoCommand( AICommandParms *parms )
{

if (!isAllowedToRespondToAiCommands(parms))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ UpdateSleepTime RailedTransportAIUpdate::update( void )

// ------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
void RailedTransportAIUpdate::aiDoCommand( const AICommandParms *parms )
void RailedTransportAIUpdate::aiDoCommand( AICommandParms *parms )
{

// if not allowed to respond to any command get out of here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ const Coord3D* WorkerAIUpdate::getDockPoint( DozerTask task, DozerDockPoint poin
// ------------------------------------------------------------------------------------------------

//-------------------------------------------------------------------------------------------------
void WorkerAIUpdate::aiDoCommand(const AICommandParms* parms)
void WorkerAIUpdate::aiDoCommand(AICommandParms* parms)
{

//
Expand Down
4 changes: 2 additions & 2 deletions GeneralsMD/Code/GameEngine/Include/GameLogic/AI.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ class AICommandParmsStorage
Path* m_path;

public:
void store(const AICommandParms& parms);
void store(AICommandParms& parms);
void reconstitute(AICommandParms& parms) const;
void doXfer(Xfer *xfer);
AICommandType getCommandType() const { return m_cmd; }
Expand All @@ -466,7 +466,7 @@ class AICommandInterface
{
public:

virtual void aiDoCommand(const AICommandParms* parms) = 0;
virtual void aiDoCommand(AICommandParms* parms) = 0;

inline void aiMoveToPosition( const Coord3D *pos, CommandSourceType cmdSource )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ class AIUpdateInterface : public UpdateModule, public AICommandInterface
virtual void onObjectCreated();
virtual void doQuickExit( const std::vector<Coord3D>* path ); ///< get out of this Object

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

virtual const Coord3D *getGuardLocation( void ) const { return &m_locationToGuard; }
virtual ObjectID getGuardObject( void ) const { return m_objectToGuard; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ 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 void aiDoCommand(AICommandParms* parms);
virtual Bool isIdle() const;
virtual UpdateSleepTime update();
virtual AssaultTransportAIInterface* getAssaultTransportAIInterface() { return this; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ChinookAIUpdate : public SupplyTruckAIUpdate
// virtual destructor prototype provided by memory pool declaration

virtual UpdateSleepTime update();
virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);
virtual Bool chooseLocomotorSet(LocomotorSetType wst);
// this is present solely for some transports to override, so that they can land before
// allowing people to exit...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class DeployStyleAIUpdate : public AIUpdateInterface
DeployStyleAIUpdate( Thing *thing, const ModuleData* moduleData );
// virtual destructor prototype provided by memory pool declaration

virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);
virtual Bool isIdle() const;
virtual UpdateSleepTime update();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class DozerAIUpdate : public AIUpdateInterface, public DozerAIInterface
// the following methods must be overridden so that if a player issues a command the dozer
// can exit the internal state machine and do whatever the player says
//
virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);


protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class FlightDeckBehavior : public AIUpdateInterface,
virtual Bool calcBestParkingAssignment( ObjectID id, Coord3D *pos, Int *oldIndex = NULL, Int *newIndex = NULL );

// AIUpdateInterface
virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);

virtual const std::vector<Coord3D>* getTaxiLocations( ObjectID id ) const;
virtual const std::vector<Coord3D>* getCreationLocations( ObjectID id ) const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class HackInternetAIUpdate : public AIUpdateInterface, public HackInternetAIInte
HackInternetAIUpdate( Thing *thing, const ModuleData* moduleData );
// virtual destructor prototype provided by memory pool declaration

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

Real getPackUnpackVariationFactor() const { return getHackInternetAIUpdateModuleData()->m_packUnpackVariationFactor; }
UnsignedInt getUnpackTime() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class JetAIUpdate : public AIUpdateInterface
virtual JetAIUpdate* getJetAIUpdate() { return this; }
virtual const JetAIUpdate* getJetAIUpdate() const { return this; }

virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);
virtual Bool chooseLocomotorSet(LocomotorSetType wst);
virtual void setLocomotorGoalNone();
virtual Bool isIdle() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class POWTruckAIUpdate : public AIUpdateInterface,
// the following methods must be overridden so that if a player issues a command the dozer
// can exit the internal state machine and do whatever the player says
//
virtual void aiDoCommand( const AICommandParms *parms );
virtual void aiDoCommand( AICommandParms *parms );

protected:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class RailedTransportAIUpdate : public AIUpdateInterface
// virtual destructor prototype provided by memory pool declaration

// AIUpdate interface methods
virtual void aiDoCommand( const AICommandParms *parms );
virtual void aiDoCommand( AICommandParms *parms );
virtual UpdateSleepTime update( void );

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class WorkerAIUpdate : public AIUpdateInterface, public DozerAIInterface, public
// the following methods must be overridden so that if a player issues a command the dozer
// can exit the internal state machine and do whatever the player says
//
virtual void aiDoCommand(const AICommandParms* parms);
virtual void aiDoCommand(AICommandParms* parms);

// Supply truck stuff
virtual Int getNumberBoxes() const { return m_numberBoxes; }
Expand Down
3 changes: 1 addition & 2 deletions GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
#include "GameLogic/Module/PhysicsUpdate.h"
#include "GameLogic/Module/StealthUpdate.h"


static Bool cannotPossiblyAttackObject( State *thisState, void* userData );

//----------------------------------------------------------------------------------------------------------
Expand All @@ -90,7 +89,7 @@ AICommandParms::AICommandParms(AICommandType cmd, CommandSourceType cmdSource) :
}

//----------------------------------------------------------------------------------------------------------
void AICommandParmsStorage::store(const AICommandParms& parms)
void AICommandParmsStorage::store(AICommandParms& parms)
{
m_cmd = parms.m_cmd;
m_cmdSource = parms.m_cmdSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ void FlightDeckBehavior::unreserveDoorForExit( ExitDoorType exitDoor )
}

//-------------------------------------------------------------------------------------------------
void FlightDeckBehavior::aiDoCommand(const AICommandParms* parms)
void FlightDeckBehavior::aiDoCommand(AICommandParms* parms)
{
//Inspect the command and reset everything when necessary.
if( parms->m_cmdSource != CMD_FROM_AI )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2615,7 +2615,7 @@ Bool AIUpdateInterface::isAllowedToRespondToAiCommands(const AICommandParms* par
}

//-------------------------------------------------------------------------------------------------
void AIUpdateInterface::aiDoCommand(const AICommandParms* parms)
void AIUpdateInterface::aiDoCommand(AICommandParms* parms)
{
// TheSuperHackers @info The AiCommandParms for m_obj, m_otherObj and m_team should be null tested before use.
// These variables could relate to a deleted object when a pending command is reconstituted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ AssaultTransportAIUpdate::~AssaultTransportAIUpdate( void )
}

//-------------------------------------------------------------------------------------------------
void AssaultTransportAIUpdate::aiDoCommand(const AICommandParms* parms)
void AssaultTransportAIUpdate::aiDoCommand(AICommandParms* parms)
{
//Inspect the command and reset everything when necessary.
if( parms->m_cmdSource != CMD_FROM_AI )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ void ChinookAIUpdate::privateCombatDrop( Object* target, const Coord3D& pos, Com
}

//-------------------------------------------------------------------------------------------------
void ChinookAIUpdate::aiDoCommand(const AICommandParms* parms)
void ChinookAIUpdate::aiDoCommand(AICommandParms* parms)
{
// this gets reset every time a command is issued.
setAirfieldForHealing(INVALID_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Bool DeployStyleAIUpdate::isIdle() const
}

//-------------------------------------------------------------------------------------------------
void DeployStyleAIUpdate::aiDoCommand( const AICommandParms* parms )
void DeployStyleAIUpdate::aiDoCommand( AICommandParms* parms )
{
if (!isAllowedToRespondToAiCommands(parms))
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2334,7 +2334,7 @@ Real DozerAIUpdate::getBoredRange( void ) const
///////////////////////////////////////////////////////////////////////////////////////////////////

//-------------------------------------------------------------------------------------------------
void DozerAIUpdate::aiDoCommand(const AICommandParms* parms)
void DozerAIUpdate::aiDoCommand(AICommandParms* parms)
{

//
Expand Down
Loading
Loading