Windows: ...

* reenabled Warning C4100 (expect many warnings during compile)
* added Q_UNUSED Macro
* fixed C4100 in all listed files
This commit is contained in:
Walter Julius Hennecke 2012-12-31 15:05:16 +01:00
parent 1cb7700134
commit 2024236a3f
17 changed files with 204 additions and 197 deletions

View file

@ -233,6 +233,7 @@ void DocFileOutput::OutputArguments(Event *ev)
//================================================================
void DocFileOutput::OutputArgument(EventArgDef *evarg)
{
Q_UNUSED(evarg)
// Function does nothing. This is the last level of nesting, and there
// is nothing else to go print from here.
}

View file

@ -127,7 +127,7 @@ public:
void Archive(Archiver &arc);
};
inline void GameplayObject::Archive(Archiver &arc)
inline void GameplayObject::Archive(Archiver &)
{
// TODO: Archive the container of GameplayProperties
// TODO: Archive the container of GameplayObjects
@ -182,7 +182,7 @@ public:
void Archive(Archiver &arc);
};
inline void GameplayDatabase::Archive(Archiver &arc)
inline void GameplayDatabase::Archive(Archiver &)
{
// TODO: Archive the container of GameplayObjects
}

View file

@ -48,46 +48,46 @@ void ClearBehaviorPackageList( void );
// sophisticated
//
class Strategos
{
public:
Strategos() { }
Strategos( Actor *act ) { }
virtual ~Strategos() { }
virtual void Evaluate() { }
virtual void NotifySightStatusChanged ( Entity *enemy , qboolean canSee ) { }
virtual void NotifyDamageChanged( Entity *enemy , float damage ) { }
virtual void Attack ( Entity *enemy ) { }
virtual void DoArchive( Archiver &arc , Actor *act );
/* virtual */ void Archive( Archiver &arc );
virtual void SetBehaviorPackage( const str &packageName ) { }
{
public:
Strategos() { }
Strategos( Actor *act ) { Q_UNUSED(act) }
virtual ~Strategos() { }
virtual float GetCheckYawMin() { assert( 0 ); return 0; }
virtual float GetCheckYawMax() { assert( 0 ); return 0; }
virtual float GetCheckInConeDistMax() { assert( 0 ); return 0; }
virtual void SetCheckInConeDistMax( float distance ) { assert( 0 ); }
//Accessors and Mutators
void SetEvaluateInterval( float interval ) { _evaluateInterval = interval; }
float GetEvaluateInterval() { return _evaluateInterval; }
void SetNextEvaluateTime( float time ) { _nextEvaluateTime = time; }
float GetNextEvaluateTime() { return _nextEvaluateTime; }
virtual void Evaluate() { }
virtual void NotifySightStatusChanged ( Entity *enemy , qboolean canSee ) { Q_UNUSED(enemy) Q_UNUSED(canSee) }
virtual void NotifyDamageChanged( Entity *enemy , float damage ) { Q_UNUSED(enemy) Q_UNUSED(damage) }
void SetSightBasedHate( float hate ) { _sightBasedHate = hate; }
float GetSightBasedHate() { return _sightBasedHate; }
virtual void Attack ( Entity *enemy ) { Q_UNUSED(enemy) }
virtual void DoArchive( Archiver & , Actor * );
void Archive( Archiver &arc );
virtual void SetBehaviorPackage( const str &packageName ) { Q_UNUSED(packageName) }
virtual float GetCheckYawMin() { assert( 0 ); return 0; }
virtual float GetCheckYawMax() { assert( 0 ); return 0; }
virtual float GetCheckInConeDistMax() { assert( 0 ); return 0; }
virtual void SetCheckInConeDistMax( float ) { assert( 0 ); }
//Accessors and Mutators
void SetEvaluateInterval( float interval ) { _evaluateInterval = interval; }
float GetEvaluateInterval() { return _evaluateInterval; }
void SetNextEvaluateTime( float time ) { _nextEvaluateTime = time; }
float GetNextEvaluateTime() { return _nextEvaluateTime; }
void SetSightBasedHate( float hate ) { _sightBasedHate = hate; }
float GetSightBasedHate() { return _sightBasedHate; }
private:
float _sightBasedHate;
float _nextEvaluateTime;
float _evaluateInterval;
private:
float _sightBasedHate;
float _nextEvaluateTime;
float _evaluateInterval;
};
};
//============================
@ -115,30 +115,30 @@ public:
float GetCheckYawMin();
float GetCheckYawMax();
float GetCheckInConeDistMax();
void SetCheckInConeDistMax( float distance );
void Attack ( Entity *enemy );
void DoArchive ( Archiver &arc, Actor *actor );
/* virtual */ void Archive( Archiver &arc );
private: // Functions
void _EvaluateEnemies();
void _EvaluatePackages();
void _EvaluateWorld();
void _CheckForInTheWay();
void _CheckForInConeOfFire();
private: // Member Variables
Actor *act;
float _checkYawMin;
float _checkYawMax;
float _checkInConeDistMax;
};
@ -154,34 +154,34 @@ private: // Member Variables
//
class PackageManager
{
public:
PackageManager();
PackageManager( Actor *actor );
~PackageManager();
void RegisterPackage( const str &packageName );
void UnregisterPackage( const str &packageName );
{
public:
PackageManager();
PackageManager( Actor *actor );
~PackageManager();
void EvaluatePackages( FuzzyEngine *fEngine );
int GetHighestScoringPackage();
int GetCurrentFVarIndex();
float GetCurrentFVarLastExecuteTime();
void SetLastExecutionTime(int packageIndex);
void UpdateCurrentPackageIndex( int packageIndex );
int GetPackageIndex( const str &packageName );
str GetCurrentPackageName();
void RegisterPackage( const str &packageName );
void UnregisterPackage( const str &packageName );
void DoArchive( Archiver &arc , Actor *actor );
void EvaluatePackages( FuzzyEngine *fEngine );
int GetHighestScoringPackage();
int GetCurrentFVarIndex();
float GetCurrentFVarLastExecuteTime();
void SetLastExecutionTime(int packageIndex);
void UpdateCurrentPackageIndex( int packageIndex );
int GetPackageIndex( const str &packageName );
str GetCurrentPackageName();
private: // Member Variables
Actor *act;
Container<BehaviorPackageEntry_t> _BehaviorPackages;
void DoArchive( Archiver &arc , Actor *actor );
int _currentFVarIndex;
float _currentFVarLastExecuteTime;
int _currentPackageIndex;
};
private: // Member Variables
Actor *act;
Container<BehaviorPackageEntry_t> _BehaviorPackages;
int _currentFVarIndex;
float _currentFVarLastExecuteTime;
int _currentPackageIndex;
};
//============================
@ -195,51 +195,51 @@ class PackageManager
//
class Personality
{
public:
Personality();
Personality( Actor *actor );
~Personality();
{
public:
Personality();
Personality( Actor *actor );
~Personality();
void SetBehaviorTendency( const str& packageName , float tendency );
void SetTendency ( const str& tendencyName , float tendencyValue );
void SetBehaviorTendency( const str& packageName , float tendency );
void SetTendency ( const str& tendencyName , float tendencyValue );
qboolean WantsToExecuteCurrentPackage(float interval);
qboolean ExecutedPackageInLastTimeFrame(float interval);
qboolean WantsToExecuteCurrentPackage(float interval);
qboolean ExecutedPackageInLastTimeFrame(float interval);
void SetAggressiveness( float aggressiveness );
float GetAggressiveness();
void SetAggressiveness( float aggressiveness );
float GetAggressiveness();
void SetTalkiness( float talkiness );
float GetTalkiness();
void SetTalkiness( float talkiness );
float GetTalkiness();
float GetTendency( const str& tendencyName );
float GetTendency( const str& tendencyName );
virtual void Archive( Archiver &arc );
void DoArchive ( Archiver &arc, Actor *actor );
virtual void Archive( Archiver &arc );
void DoArchive ( Archiver &arc, Actor *actor );
protected: // Member Functions
float _clampValue( float value );
qboolean _wantsToExecutePackage(PackageTendency_t *tendency);
protected: // Member Functions
float _clampValue( float value );
qboolean _wantsToExecutePackage(PackageTendency_t *tendency);
private: // Emotions and Tendencies
float _aggressiveness;
float _talkiness;
float _anger;
float _fear;
// Package Tendencies
Container<PackageTendency_t> _PackageTendencies;
Container<Tendency_t> _Tendencies;
private: // Member Variables
Actor *act;
private: // Emotions and Tendencies
};
float _aggressiveness;
float _talkiness;
float _anger;
float _fear;
// Package Tendencies
Container<PackageTendency_t> _PackageTendencies;
Container<Tendency_t> _Tendencies;
private: // Member Variables
Actor *act;
};
#endif /* __RAGE_AI_H__ */

View file

@ -47,7 +47,7 @@ WeaponDualWield::~WeaponDualWield()
// Returns: None
//
//--------------------------------------------------------------
void WeaponDualWield::AttachToOwner( weaponhand_t hand )
void WeaponDualWield::AttachToOwner( weaponhand_t )
{
_leftweapon->SetOwner(owner);
_rightweapon->SetOwner(owner);
@ -69,7 +69,7 @@ void WeaponDualWield::AttachToOwner( weaponhand_t hand )
// Returns: None
//
//--------------------------------------------------------------
void WeaponDualWield::processGameplayData( Event *ev )
void WeaponDualWield::processGameplayData( Event * )
{
ClassDef *cls;

View file

@ -40,13 +40,13 @@ class ActorGameComponent : public Listener
CLASS_PROTOTYPE( ActorGameComponent );
ActorGameComponent() {}
virtual void HandleEvent( Event *ev ) {}
virtual void HandleArmorDamage( Event *ev ) {}
virtual void HandleDeath( const Entity *ent ) {}
virtual void HandleThink() {}
virtual void HandleEvent( Event * ) {}
virtual void HandleArmorDamage( Event * ) {}
virtual void HandleDeath( const Entity * ) {}
virtual void HandleThink() {}
virtual qboolean DoCheck( const Conditional &condition ) { return false; }
virtual void DoArchive( Archiver &arc, const Actor *act ) {}
virtual qboolean DoCheck( const Conditional & ) { return false; }
virtual void DoArchive( Archiver &, const Actor * ) {}
};

View file

@ -860,7 +860,7 @@ class Entity : public Listener
// GameplayManager interfaces to health and damage
void setGameplayHealth( Event *ev );
void setGameplayDamage( Event *ev );
virtual void processGameplayData( Event *ev ) {}
virtual void processGameplayData( Event* ) {}
// Think interface

View file

@ -276,6 +276,9 @@
<ObjectFileName>$(ProjectDir)Debug\</ObjectFileName>
<ProgramDataBaseFileName>$(ProjectDir)Debug\</ProgramDataBaseFileName>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
<XMLDocumentationFileName>
</XMLDocumentationFileName>
</ClCompile>
<Midl>
<SuppressStartupBanner>true</SuppressStartupBanner>

View file

@ -136,7 +136,7 @@ class Item : public Trigger
void postSpawn( Event *ev );
virtual void Archive( Archiver &arc );
virtual void ArchivePersistantData( Archiver &arc ) {};
virtual void ArchivePersistantData( Archiver& ) {};
};
inline void Item::SetSkillLevel( float skillLevel )

View file

@ -151,7 +151,7 @@ public:
virtual void playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath );
virtual void addPlayer( Player *player );
virtual void removePlayer( Player *player );
virtual void update( float frameTime ) {};
virtual void update( float frameTime ) { Q_UNUSED(frameTime) };
virtual int getStat( Player *player, int statNum, int value );
virtual int getIcon( Player *player, int statNum, int value );

View file

@ -134,9 +134,9 @@ class MultiplayerModeBase : public Class
virtual void init( int maxPlayers );
virtual void initItems( void );
virtual void start( void ) {};
virtual bool shouldKeepItem( MultiplayerItem *item ) { return false; }
virtual bool shouldKeepItem( MultiplayerItem *item ) { Q_UNUSED(item) return false; }
virtual bool shouldKeepNormalItem( Item *item );
virtual void itemKept( MultiplayerItem *item ) {};
virtual void itemKept( MultiplayerItem *item ) { Q_UNUSED(item) };
virtual void update( float frameTime );
virtual void matchOver( void ) {};
@ -147,7 +147,7 @@ class MultiplayerModeBase : public Class
int findPlayer( const Player *player );
virtual bool canGivePlayerItem( int entnum, const str &itemName ) { return true; }
virtual bool canGivePlayerItem( int entnum, const str &itemName ) { Q_UNUSED(entnum) Q_UNUSED(itemName) return true; }
// Queries
virtual bool isEndOfMatch( void );
@ -166,14 +166,14 @@ class MultiplayerModeBase : public Class
int getKills( Player *player );
int getDeaths( Player *player );
Team* getPlayersTeam( const Player *player );
virtual int getTeamPoints( Player *player ) { return 0; }
virtual int getTeamPoints( const str & teamName ) { return 0; }
virtual void addTeamPoints( const str & teamName, int points ) { return; }
virtual int getTeamPoints( Player *player ) { Q_UNUSED(player) return 0; }
virtual int getTeamPoints( const str & teamName ) { Q_UNUSED(teamName) return 0; }
virtual void addTeamPoints( const str & teamName, int points ) { Q_UNUSED(teamName) Q_UNUSED(points) return; }
virtual int getStat( Player *player, int statNum, int value );
virtual int getIcon( Player *player, int statNum, int value );
virtual int getScoreIcon( Player *player, int index, int value ) { return value; }
virtual int getInfoIcon( Player *player ) { return 0; }
virtual int getScoreIcon( Player *player, int index, int value ) { Q_UNUSED(player) Q_UNUSED(index) return value; }
virtual int getInfoIcon( Player *player ) { Q_UNUSED(player) return 0; }
virtual Player * getLastKilledByPlayer( Player *player, int *meansOfDeath );
virtual Player * getLastKillerOfPlayer( Player *player, int *meansOfDeath );
@ -202,34 +202,34 @@ class MultiplayerModeBase : public Class
virtual bool canJoinTeam( Player *player, const str &teamName );
virtual void joinTeam( Player *player, const str &teamName );
virtual bool canPickup( Player *player, MultiplayerItemType itemType, const char *item_name ) { return true; }
virtual void pickedupItem( Player *player, MultiplayerItemType itemType, const char *itemName ) {};
virtual bool canPickup( Player *player, MultiplayerItemType itemType, const char *item_name ) { Q_UNUSED(player) Q_UNUSED(itemType) Q_UNUSED(item_name) return true; }
virtual void pickedupItem( Player *player, MultiplayerItemType itemType, const char *itemName ) { Q_UNUSED(player) Q_UNUSED(itemType) Q_UNUSED(itemName) };
virtual void applySpeedModifiers( Player *player, int *moveSpeed );
virtual void applyJumpModifiers( Player *player, int *jumpSpeed ) {};
virtual void applyAirAccelerationModifiers( Player *player, int *airAcceleration ) {};
virtual void applyJumpModifiers( Player *player, int *jumpSpeed ) { Q_UNUSED(player) Q_UNUSED(jumpSpeed) };
virtual void applyAirAccelerationModifiers( Player *player, int *airAcceleration ) { Q_UNUSED(player) Q_UNUSED(airAcceleration) };
virtual void setupMultiplayerUI( Player *player );
virtual void playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath );
virtual float playerDamaged( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath );
virtual void playerTookDamage( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath );
virtual void playerFired( Player *attackingPlayer ) {};
virtual void playerFired( Player *attackingPlayer ) { Q_UNUSED(attackingPlayer) };
virtual void obituary( Player *killedPlayer, Player *attackingPlayer, int meansOfDeath );
virtual void playerDead( Player *player );
virtual void itemTouched( Player *player, MultiplayerItem *item ) {};
virtual void itemDestroyed( Player *player, MultiplayerItem *item ) {};
virtual float itemDamaged( MultiplayerItem *item, Player *attackingPlayer, float damage, int meansOfDeath ) { return damage; }
virtual void itemUsed( Entity *entity, MultiplayerItem *item ) {};
virtual void itemTouched( Player *player, MultiplayerItem *item ) { Q_UNUSED(player) Q_UNUSED(item) };
virtual void itemDestroyed( Player *player, MultiplayerItem *item ) { Q_UNUSED(player) Q_UNUSED(item) };
virtual float itemDamaged( MultiplayerItem *item, Player *attackingPlayer, float damage, int meansOfDeath ) { Q_UNUSED(item) Q_UNUSED(attackingPlayer) Q_UNUSED(meansOfDeath) return damage; }
virtual void itemUsed( Entity *entity, MultiplayerItem *item ) { Q_UNUSED(entity) Q_UNUSED(item) };
virtual void playerUsed( Player *usedPlayer, Player *usingPlayer, Equipment *equipment ) {};
virtual void playerUsed( Player *usedPlayer, Player *usingPlayer, Equipment *equipment ) { Q_UNUSED(usedPlayer) Q_UNUSED(usingPlayer) Q_UNUSED(equipment) };
virtual void score( const Player *player );
virtual void respawnPlayer( Player *player ) {};
virtual void respawnPlayer( Player *player ) { Q_UNUSED(player) };
virtual void playerEventNotification( const char *eventName, const char *eventItemName, Player *eventPlayer ) {};
virtual void playerEventNotification( const char *eventName, const char *eventItemName, Player *eventPlayer ) { Q_UNUSED(eventName) Q_UNUSED(eventItemName) Q_UNUSED(eventPlayer) };
// Utility functions
void AddStartingWeapon(const str& weaponViewmodel);
@ -245,19 +245,19 @@ class MultiplayerModeBase : public Class
void endMatch( void );
void restartMatch( void );
virtual bool checkGameType( const char *rule ) { return false; }
virtual bool doesPlayerHaveItem( Player *player, const char *itemName ) { return false; }
virtual bool checkGameType( const char *rule ) { Q_UNUSED(rule) return false; }
virtual bool doesPlayerHaveItem( Player *player, const char *itemName ) { Q_UNUSED(player) Q_UNUSED(itemName) return false; }
virtual void playerCommand( Player *player, const char *command, const char *parm ) {};
virtual void playerCommand( Player *player, const char *command, const char *parm ) { Q_UNUSED(player) Q_UNUSED(command) Q_UNUSED(parm) };
virtual void teamPointsChanged( Team *team, int oldPoints, int newPoints ) {};
virtual void teamPointsChanged( Team *team, int oldPoints, int newPoints ) { Q_UNUSED(team) Q_UNUSED(oldPoints) Q_UNUSED(newPoints) };
virtual bool checkRule( const char *rule, bool defaultValue, Player *player = NULL ) { return defaultValue; }
virtual bool checkRule( const char *rule, bool defaultValue, Player *player = NULL ) { Q_UNUSED(rule) Q_UNUSED(player) return defaultValue; }
virtual int getHighestPoints( void );
virtual bool isValidPlayerModel( Player *player, str modelToUse, bool defaultValue ) { return defaultValue; }
virtual str getDefaultPlayerModel( Player *player, str modelName ) { return modelName; }
virtual bool isValidPlayerModel( Player *player, str modelToUse, bool defaultValue ) { Q_UNUSED(player) Q_UNUSED(modelToUse) return defaultValue; }
virtual str getDefaultPlayerModel( Player *player, str modelName ) { Q_UNUSED(player) return modelName; }
virtual void playerChangedModel( Player *player ) {};

View file

@ -34,70 +34,70 @@ public:
MultiplayerModifier() {};
virtual ~MultiplayerModifier() {};
virtual void init( int maxPlayers ) {};
virtual void init( int maxPlayers ) { Q_UNUSED(maxPlayers) };
virtual void initItems( void ) {};
virtual void start( void ) {};
virtual bool shouldKeepItem( MultiplayerItem *item ) { return false; }
virtual bool shouldKeepNormalItem( Item *item ) { return true; }
virtual void itemKept( MultiplayerItem *item ) {};
virtual bool checkRule( const char *rule, bool defaultValue, Player *player = NULL ) { return defaultValue; }
virtual bool checkGameType( const char *rule ) { return false; }
virtual bool doesPlayerHaveItem( Player *player, const char *itemName ) { return false; }
virtual bool shouldKeepItem( MultiplayerItem *item ) { Q_UNUSED(item) return false; }
virtual bool shouldKeepNormalItem( Item *item ) { Q_UNUSED(item) return true; }
virtual void itemKept( MultiplayerItem *item ) { Q_UNUSED(item) };
virtual bool checkRule( const char *rule, bool defaultValue, Player *player = NULL ) { Q_UNUSED(rule) Q_UNUSED(player) return defaultValue; }
virtual bool checkGameType( const char *rule ) { Q_UNUSED(rule) return false; }
virtual bool doesPlayerHaveItem( Player *player, const char *itemName ) { Q_UNUSED(player) Q_UNUSED(itemName) return false; }
virtual int getStat( Player *player, int statNum, int value ) { return value; }
virtual int getIcon( Player *player, int statNum, int value ) { return value; }
virtual int getScoreIcon( Player *player, int index, int value ) { return value; }
virtual int getInfoIcon( Player *player ) { return 0; }
virtual int getStat( Player *player, int statNum, int value ) { Q_UNUSED(player) Q_UNUSED(statNum) return value; }
virtual int getIcon( Player *player, int statNum, int value ) { Q_UNUSED(player) Q_UNUSED(statNum) return value; }
virtual int getScoreIcon( Player *player, int index, int value ) { Q_UNUSED(player) Q_UNUSED(index) return value; }
virtual int getInfoIcon( Player *player ) { Q_UNUSED(player) return 0; }
virtual float playerDamaged( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath ) { return damage; };
virtual void playerFired( Player *attackingPlayer ) {};
virtual void playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath ) {};
virtual void playerSpawned( Player *player ) {};
virtual float playerDamaged( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath ) { Q_UNUSED(damagedPlayer) Q_UNUSED(attackingPlayer) Q_UNUSED(meansOfDeath) return damage; };
virtual void playerFired( Player *attackingPlayer ) { Q_UNUSED(attackingPlayer) };
virtual void playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath ) { Q_UNUSED(killedPlayer) Q_UNUSED(attackingPlayer) Q_UNUSED(inflictor) Q_UNUSED(meansOfDeath) };
virtual void playerSpawned( Player * ) {};
virtual void matchOver( void ) {};
virtual void itemTouched( Player *player, MultiplayerItem *item ) {};
virtual void itemDestroyed( Player *player, MultiplayerItem *item ) {};
virtual float itemDamaged( MultiplayerItem *item, Player *attackingPlayer, float damage, int meansOfDeath ) { return damage; }
virtual void itemUsed( Entity *entity, MultiplayerItem *item ) {};
virtual void itemTouched( Player *player, MultiplayerItem *item ) { Q_UNUSED(player) Q_UNUSED(item) };
virtual void itemDestroyed( Player *player, MultiplayerItem *item ) { Q_UNUSED(player) Q_UNUSED(item) };
virtual float itemDamaged( MultiplayerItem *item, Player *attackingPlayer, float damage, int meansOfDeath ) { Q_UNUSED(item) Q_UNUSED(attackingPlayer) Q_UNUSED(meansOfDeath) return damage; }
virtual void itemUsed( Entity *entity, MultiplayerItem *item ) { Q_UNUSED(entity) Q_UNUSED(item) };
virtual void playerUsed( Player *usedPlayer, Player *usingPlayer, Equipment *equipment ) {};
virtual void playerUsed( Player *usedPlayer, Player *usingPlayer, Equipment *equipment ) { Q_UNUSED(usedPlayer) Q_UNUSED(usingPlayer) Q_UNUSED(equipment) };
virtual bool canGivePlayerItem( int entnum, const str &itemName ) { return true; }
virtual bool canGivePlayerItem( int entnum, const str &itemName ) { Q_UNUSED(entnum) Q_UNUSED(itemName) return true; }
virtual void addPlayer( Player *player ) {};
virtual void removePlayer( Player *player ) {};
virtual void addPlayer( Player * ) {};
virtual void removePlayer( Player * ) {};
virtual void joinedTeam( Player *player, const str &teamName ) {};
virtual void joinedTeam( Player *player, const str &teamName ) { Q_UNUSED(player) Q_UNUSED(teamName) };
virtual void applySpeedModifiers( Player *player, int *moveSpeed ) {};
virtual void applyJumpModifiers( Player *player, int *jumpSpeed ) {};
virtual void applyAirAccelerationModifiers( Player *player, int *airAcceleration ) {};
virtual void applySpeedModifiers( Player *player, int *moveSpeed ) { Q_UNUSED(player) Q_UNUSED(moveSpeed) };
virtual void applyJumpModifiers( Player *player, int *jumpSpeed ) { Q_UNUSED(player) Q_UNUSED(jumpSpeed) };
virtual void applyAirAccelerationModifiers( Player *player, int *airAcceleration ) { Q_UNUSED(player) Q_UNUSED(airAcceleration) };
virtual bool canPickup( Player *player, MultiplayerItemType itemType, const char *item_name ) { return true; }
virtual void pickedupItem( Player *player, MultiplayerItemType itemType, const char *itemName ) {};
virtual bool canPickup( Player *player, MultiplayerItemType itemType, const char *item_name ) { Q_UNUSED(player) Q_UNUSED(itemType) Q_UNUSED(item_name) return true; }
virtual void pickedupItem( Player *player, MultiplayerItemType itemType, const char *itemName ) { Q_UNUSED(player) Q_UNUSED(itemType) Q_UNUSED(itemName) };
virtual void update( float frameTime ) {};
virtual void update( float frameTime ) { Q_UNUSED(frameTime) };
virtual int getPointsForKill( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath, int points ) { return points; }
virtual int getPointsForKill( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath, int points ) { Q_UNUSED(killedPlayer) Q_UNUSED(attackingPlayer) Q_UNUSED(inflictor) Q_UNUSED(meansOfDeath) return points; }
virtual void playerEventNotification( const char *eventName, const char *eventItemName, Player *eventPlayer ) {};
virtual void playerEventNotification( const char *eventName, const char *eventItemName, Player *eventPlayer ) { Q_UNUSED(eventName) Q_UNUSED(eventItemName) Q_UNUSED(eventPlayer) };
virtual void playerCommand( Player *player, const char *command, const char *parm ) {};
virtual void playerCommand( Player *player, const char *command, const char *parm ) { Q_UNUSED(player) Q_UNUSED(command) Q_UNUSED(parm) };
virtual void matchStarted( void ) {};
virtual void matchStarting( void ) {};
virtual void matchRestarted( void ) {};
virtual void matchEnded( void ) {};
virtual str getSpawnPointType( Player *player ) { return ""; }
virtual float getSpawnPointPriority( Player *player ) { return 0.0f; }
virtual str getSpawnPointType( Player * ) { return ""; }
virtual float getSpawnPointPriority( Player * ) { return 0.0f; }
virtual bool isValidPlayerModel( Player *player, str modelToUse, bool defaultValue ) { return defaultValue; }
virtual str getDefaultPlayerModel( Player *player, str modelName ) { return modelName; }
virtual bool isValidPlayerModel( Player *player, str modelToUse, bool defaultValue ) { Q_UNUSED(player) Q_UNUSED(modelToUse) return defaultValue; }
virtual str getDefaultPlayerModel( Player *player, str modelName ) { Q_UNUSED(player) return modelName; }
virtual void playerChangedModel( Player *player ) {};
virtual void playerChangedModel( Player * ) {};
virtual bool skipWeaponReloads( void ) { return false; }
};
@ -516,7 +516,7 @@ public:
/* virtual */ void playerCommand( Player *player, const char *command, const char *parm );
/* virtual */ str getSpawnPointType( Player *player );
/* virtual */ float getSpawnPointPriority( Player *player ) { return 100.0f; }
/* virtual */ float getSpawnPointPriority( Player * ) { return 100.0f; }
/* virtual */ void playerChangedModel( Player *player );
};
@ -641,7 +641,7 @@ public:
/* virtual */ void update( float frameTime );
/* virtual */ str getSpawnPointType( Player *player );
/* virtual */ float getSpawnPointPriority( Player *player ) { return 10.0f; }
/* virtual */ float getSpawnPointPriority( Player * ) { return 10.0f; }
/* virtual */ bool checkRule( const char *rule, bool defaultValue, Player *player = NULL );
};

View file

@ -418,7 +418,7 @@ void PuzzleObject::setCanceledThread(Event* event)
//
// Returns:
//-----------------------------------------------------
void PuzzleObject::failed(Event* event)
void PuzzleObject::failed(Event*)
{
// close and lapse into locked mode
_puzzleState = PUZZLE_STATE_CLOSING_LOCKED;
@ -447,7 +447,7 @@ void PuzzleObject::failed(Event* event)
//
// Returns:
//-----------------------------------------------------
void PuzzleObject::canceled(Event* event)
void PuzzleObject::canceled(Event*)
{
// close and lapse into normal mode
_puzzleState = PUZZLE_STATE_CLOSING;
@ -476,7 +476,7 @@ void PuzzleObject::canceled(Event* event)
//
// Returns:
//-----------------------------------------------------
void PuzzleObject::solved(Event* event)
void PuzzleObject::solved(Event*)
{
// close and lapse into solved mode
_puzzleState = PUZZLE_STATE_CLOSING_SOLVED;
@ -501,7 +501,7 @@ void PuzzleObject::solved(Event* event)
//
// Returns:
//-----------------------------------------------------
void PuzzleObject::animationDone(Event* event)
void PuzzleObject::animationDone(Event*)
{
if( _puzzleState == PUZZLE_STATE_OPENING )
{
@ -715,7 +715,7 @@ void PuzzleObject::hideTimerHud( void )
//
// Returns:
//-----------------------------------------------------
void PuzzleObject::reset( Event* event )
void PuzzleObject::reset( Event* )
{
_puzzleState = PUZZLE_STATE_IDLE;
animate->RandomAnimate( "puzzle_idle" );
@ -724,12 +724,12 @@ void PuzzleObject::reset( Event* event )
_usedTime = 0.0f;
}
void PuzzleObject::activate( Event* event )
void PuzzleObject::activate( Event* )
{
_puzzleState = _saveState;
}
void PuzzleObject::deActivate( Event* event )
void PuzzleObject::deActivate( Event* )
{
_saveState = _puzzleState;
_puzzleState = PUZZLE_STATE_DEACTIVATED;

View file

@ -34,9 +34,9 @@
//#pragma warning(disable : 4018) // signed/unsigned mismatch
//#pragma warning(disable : 4032) // formal parameter 'number' has different type when promoted
#pragma warning(disable : 4051) // type conversion, possible loss of data
#pragma warning(disable : 4057) // slightly different base types
#pragma warning(disable : 4100) // unreferenced formal parameter
//#pragma warning(disable : 4051) // type conversion, possible loss of data
//#pragma warning(disable : 4057) // slightly different base types
//#pragma warning(disable : 4100) // unreferenced formal parameter
#pragma warning(disable : 4115) // 'type' : named type definition in parentheses
//#pragma warning(disable : 4125) // decimal digit terminates octal escape sequence
#pragma warning(disable : 4127) // conditional expression is constant
@ -175,6 +175,8 @@ void Sys_PumpEvents( void );
#endif
#define Q_UNUSED(x) (void)x;
//=============================================================
#define DATATYPE_SCHAR_MIN -128

View file

@ -145,13 +145,13 @@ void StationaryVehicle::PositionVehicleAndDriver(void)
}
}
/// Adjust the yaw and normalize the degrees based upon the location of our yaw seam.
// Adjust the yaw and normalize the degrees based upon the location of our yaw seam.
angles[YAW] += _yawDeltaDegrees;
angles[YAW] = AngleNormalizeArbitrary( angles[YAW], _yawSeam);
if( _restrictYaw )
{
/// Clamp yaw to the range [ _minimumRotate, _maximumRotate ]
// Clamp yaw to the range [ _minimumRotate, _maximumRotate ]
if( angles[ YAW ] > _maximumYaw )
{
angles[ YAW ] = _maximumYaw;

View file

@ -591,7 +591,7 @@ inline bool operator==
)
{
/// Check if lengths are equal
// Check if lengths are equal
if( a.length() != b.length() )
return( false );

View file

@ -918,12 +918,12 @@ inline void TriggerEntryAndExit::ExitTrigger()
_entered = false;
}
inline void TriggerEntryAndExit::EnterTrigger( Event *ev )
inline void TriggerEntryAndExit::EnterTrigger( Event* )
{
EnterTrigger();
}
inline void TriggerEntryAndExit::ExitTrigger( Event *ev )
inline void TriggerEntryAndExit::ExitTrigger( Event* )
{
ExitTrigger();
}

View file

@ -605,7 +605,8 @@ class Weapon : public Item
bool shouldAutoSwitch( firemode_t mode );
virtual int getStat( int statNum ) { return 0; }
/* Arguments: statNum */
virtual int getStat( int ) { return 0; }
void autoSwitch();