diff --git a/code/game/PlayerStart.h b/code/game/PlayerStart.h index 0bef5dd7..37beee68 100644 --- a/code/game/PlayerStart.h +++ b/code/game/PlayerStart.h @@ -42,7 +42,7 @@ public: PlayerStart(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; void SetAngle( Event *ev ); void EventEnableSpawn( Event *ev ); diff --git a/code/game/VehicleCollisionEntity.h b/code/game/VehicleCollisionEntity.h index 1fdfc66a..d40171a3 100644 --- a/code/game/VehicleCollisionEntity.h +++ b/code/game/VehicleCollisionEntity.h @@ -40,7 +40,7 @@ public: VehicleCollisionEntity( Entity *ent ); VehicleCollisionEntity(); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; void Solid( void ); void NotSolid( void ); diff --git a/code/game/VehicleSlot.h b/code/game/VehicleSlot.h index 1f04c73b..b71c5dae 100644 --- a/code/game/VehicleSlot.h +++ b/code/game/VehicleSlot.h @@ -51,7 +51,7 @@ public: virtual void NotSolid( void ); virtual void Solid( void ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline @@ -80,9 +80,9 @@ class cTurretSlot : public cVehicleSlot { public: cTurretSlot(); - virtual void NotSolid( void ); - virtual void Solid( void ); - virtual void Archive( Archiver& arc ); + void NotSolid( void ) override; + void Solid( void ) override; + void Archive( Archiver& arc ) override; }; inline diff --git a/code/game/VehicleSoundEntity.h b/code/game/VehicleSoundEntity.h index bac4d179..3f389f58 100644 --- a/code/game/VehicleSoundEntity.h +++ b/code/game/VehicleSoundEntity.h @@ -42,8 +42,8 @@ public: void Start( void ); void Stop( void ); - virtual void Think( void ); - virtual void Archive( Archiver& arc ); + void Think( void ) override; + void Archive( Archiver& arc ) override; private: void EventPostSpawn( Event *ev ); diff --git a/code/game/actor.cpp b/code/game/actor.cpp index 64023a15..c3b682c9 100644 --- a/code/game/actor.cpp +++ b/code/game/actor.cpp @@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "g_local.h" #include "actor.h" #include "scriptthread.h" +#include "scriptclass.h" #include "doors.h" #include "gibs.h" #include "misc.h" diff --git a/code/game/actorenemy.h b/code/game/actorenemy.h index 292f3147..89fcb243 100644 --- a/code/game/actorenemy.h +++ b/code/game/actorenemy.h @@ -52,7 +52,7 @@ public: int GetThreat( void ) const; float GetRangeSquared( void ) const; - virtual void Archive( Archiver & ); + void Archive( Archiver & ) override; protected: float UpdateLMRF( Actor *pSelf, bool *pbInFovAndRange, bool *pbVisible ); @@ -102,7 +102,7 @@ public: void ConfirmEnemyIfCanSeeSharerOrEnemy( Actor *pSelf, Actor *pSharer, Sentient *pEnemy ); bool CaresAboutPerfectInfo( Sentient *pEnemy ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void ActorEnemySet::Archive diff --git a/code/game/actorpath.h b/code/game/actorpath.h index 709a1a67..4a94df51 100644 --- a/code/game/actorpath.h +++ b/code/game/actorpath.h @@ -81,7 +81,7 @@ public: bool IsSide( void ) const; void ForceShortLookahead( void ); - virtual void Archive( Archiver& arc ); + virtual void Archive( Archiver& arc ); }; inline void ActorPath::Archive diff --git a/code/game/ammo.h b/code/game/ammo.h index 97833370..3b8b3b9e 100644 --- a/code/game/ammo.h +++ b/code/game/ammo.h @@ -34,7 +34,7 @@ class AmmoEntity : public Item CLASS_PROTOTYPE( AmmoEntity ); AmmoEntity(); - virtual Item *ItemPickup( Entity *other, qboolean add_to_inventory ); + Item *ItemPickup( Entity *other, qboolean add_to_inventory ) override; }; class Ammo : public Class @@ -57,7 +57,7 @@ class Ammo : public Class void setName( str name); str getName( void ); int getIndex( void ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Ammo::Archive diff --git a/code/game/animate.h b/code/game/animate.h index 518a7632..270b2737 100644 --- a/code/game/animate.h +++ b/code/game/animate.h @@ -111,7 +111,7 @@ public: int NumAnims( void ); const char *AnimName( int slot = 0 ); float AnimTime( int slot = 0 ); - virtual void AnimFinished( int slot = 0 ); + virtual void AnimFinished( int slot = 0 ); void SetTime( int slot = 0, float time = 0.0f ); void SetNormalTime( int slot = 0, float normal = 1.0f ); float GetTime( int slot = 0 ); @@ -128,15 +128,15 @@ public: void StopAnimating( int slot = 0 ); void StopAnimatingAtEnd( int slot = 0 ); - virtual int CurrentAnim( int slot = 0 ); - virtual float CurrentTime( int slot = 0 ); + virtual int CurrentAnim( int slot = 0 ); + virtual float CurrentTime( int slot = 0 ); - virtual void PreAnimate( void ); - virtual void PostAnimate( void ); + void PreAnimate( void ) override; + void PostAnimate( void ) override; - virtual void DumpAnimInfo( void ); + virtual void DumpAnimInfo( void ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; void FrameDeltaEvent( Event *ev ); void ForwardExec( Event *ev ); diff --git a/code/game/armor.h b/code/game/armor.h index 884e1e6b..e1b97a5c 100644 --- a/code/game/armor.h +++ b/code/game/armor.h @@ -30,15 +30,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA class Armor : public Item { protected: - virtual void Setup( const char *model, int amount ); - virtual void Add( int amount ); + virtual void Setup( const char *model, int amount ); + void Add( int amount ) override; public: CLASS_PROTOTYPE( Armor ); Armor(); - virtual qboolean Pickupable( Entity *other ); + qboolean Pickupable( Entity *other ) override; }; #endif /* armor.h */ diff --git a/code/game/barrels.h b/code/game/barrels.h index 647c650a..f3860b57 100644 --- a/code/game/barrels.h +++ b/code/game/barrels.h @@ -64,7 +64,7 @@ public: void BarrelDamaged( Event *ev ); void BarrelKilled( Event *ev ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void BarrelObject::Archive diff --git a/code/game/beam.h b/code/game/beam.h index 7bd1d680..34baf3dd 100644 --- a/code/game/beam.h +++ b/code/game/beam.h @@ -97,8 +97,8 @@ public: void Shoot( Event *ev ); void SetIgnoreWalls( Event *ev ); - virtual void setAngles( Vector ang ); - virtual void Archive( Archiver &arc ); + void setAngles( Vector ang ) override; + void Archive( Archiver &arc ) override; friend FuncBeam *CreateBeam( const char *model, const char *shader, Vector start, Vector end, int numsegments = 4, float scale = 1.0f, float life = 1.0f, float damage = 0.0f, Entity *origin_target = NULL ); }; diff --git a/code/game/bspline.h b/code/game/bspline.h index af2fd10b..31c3ebba 100644 --- a/code/game/bspline.h +++ b/code/game/bspline.h @@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "g_local.h" #include "entity.h" -#include "Vector.h" +#include "vector.h" typedef enum { @@ -60,7 +60,7 @@ class BSplineControlPoint : public Class float *GetRoll( void ); float *GetSpeed( void ); void operator=( BSplineControlPoint &point ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void BSplineControlPoint::Archive @@ -279,7 +279,7 @@ class BSpline : public Class void GetControlPoint( int id, Vector& pos, Vector& orient, float& speed ); void SetControlPoint( int id, const Vector& new_control_point ); void SetControlPoint( int id, const Vector& new_control_point, const Vector& new_control_orient, const float& speed ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline BSpline::BSpline() @@ -533,7 +533,7 @@ class SplinePath : public Entity float GetFov( void ); void SetNext( SplinePath *node ); void SetPrev( SplinePath *node ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; typedef SafePtr SplinePathPtr; diff --git a/code/game/camera.h b/code/game/camera.h index 3a5491fd..359138b0 100644 --- a/code/game/camera.h +++ b/code/game/camera.h @@ -92,7 +92,7 @@ class CameraMoveState : public Class void Evaluate( Camera * camera ); void Initialize( Camera * camera ); void DoNodeEvents( Camera * camera ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void CameraMoveState::operator= @@ -156,7 +156,7 @@ class CameraWatchState : public Class void Evaluate( Camera * camera, CameraMoveState * move ); void Initialize( Camera * camera ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void CameraWatchState::Archive @@ -179,7 +179,7 @@ class CameraState : public Class void Evaluate( Camera * camera ); void Initialize( Camera * camera ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void CameraState::Archive @@ -254,8 +254,8 @@ class Camera : public Entity Vector CalculatePosition( void ); Vector CalculateOrientation( void ); float CalculateFov( void ); - virtual void bind( Entity *master, qboolean use_my_angles = false ); - virtual void unbind( void ); + virtual void bind( Entity *master, qboolean use_my_angles = false ); + void unbind( void ) override; public: CLASS_PROTOTYPE( Camera ); @@ -316,7 +316,7 @@ class Camera : public Entity Vector GetPositionOffset( void ); void SetPositionOffset( Vector vNewOfs ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline Vector Camera::GetPositionOffset @@ -444,7 +444,7 @@ class CameraManager : public Listener CameraManager(); void SetPath( str pathName ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void CameraManager::Archive diff --git a/code/game/consoleevent.h b/code/game/consoleevent.h index af41cbe7..6089223c 100644 --- a/code/game/consoleevent.h +++ b/code/game/consoleevent.h @@ -21,7 +21,7 @@ public: void SetConsoleEdict(gentity_t* edict); gentity_t* GetConsoleEdict(void); - virtual void ErrorInternal(Listener* l, str text); + void ErrorInternal(Listener* l, str text) override; }; extern MEM_BlockAlloc ConsoleEvent_allocator; diff --git a/code/game/crateobject.h b/code/game/crateobject.h index 84a63645..0446b012 100644 --- a/code/game/crateobject.h +++ b/code/game/crateobject.h @@ -53,7 +53,7 @@ public: void CrateDamaged( Event *ev ); void CrateKilled( Event *ev ); void CrateThink( Event *ev ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void CrateObject::Archive diff --git a/code/game/decals.h b/code/game/decals.h index 9a20e56d..7786cf06 100644 --- a/code/game/decals.h +++ b/code/game/decals.h @@ -41,7 +41,7 @@ class Decal : public Entity void setShader( str shader ); void setOrientation( str deg ); void setRadius( float rad ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Decal::Archive diff --git a/code/game/doors.h b/code/game/doors.h index f09dc1c8..4a712a5a 100644 --- a/code/game/doors.h +++ b/code/game/doors.h @@ -103,7 +103,7 @@ class Door : public ScriptSlave void EventDoorType( Event *ev ); qboolean BlocksAIMovement( void ) const; - qboolean AIDontFace( void ) const; + qboolean AIDontFace( void ) const override; void UpdatePathConnection( void ); void SetLocked( qboolean newLocked ); @@ -118,7 +118,7 @@ class Door : public ScriptSlave qboolean isOpen( void ); qboolean isCompletelyClosed( void ); qboolean CanBeOpenedBy( Entity *ent ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Door::Archive @@ -169,7 +169,7 @@ class RotatingDoor : public Door void DoOpen( Event *ev ); void DoClose( Event *ev ); void OpenAngle( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; RotatingDoor(); }; @@ -205,7 +205,7 @@ class SlidingDoor : public Door void SetSpeed( Event *ev ); void DoOpen( Event *ev ); void DoClose( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; SlidingDoor(); }; @@ -246,7 +246,7 @@ class ScriptDoor : public Door void SetOpenThread( Event *ev ); void SetCloseThread( Event *ev ); void SetInitThread( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; ScriptDoor(); }; diff --git a/code/game/earthquake.h b/code/game/earthquake.h index adcd8871..f93d8a25 100644 --- a/code/game/earthquake.h +++ b/code/game/earthquake.h @@ -57,7 +57,7 @@ public: void EventSetTimeDecay( Event *ev ); void EventSetDoneDeath( Event *ev ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void ViewJitter::Archive diff --git a/code/game/entity.h b/code/game/entity.h index 0543b9f1..6b4d5480 100644 --- a/code/game/entity.h +++ b/code/game/entity.h @@ -291,19 +291,19 @@ public: void SetKillTarget( const char *killtarget ); const char *KillTarget( void ); - virtual void setLocalOrigin( Vector org ); + virtual void setLocalOrigin( Vector org ); - virtual void setModel( const char *model ); + virtual void setModel( const char *model ); void setModel( str &mdl ); qboolean setModel( void ); void SetModelEvent( Event *ev ); void GetBrushModelEvent( Event *ev ); void GetModelEvent( Event *ev ); void SetTeamEvent( Event *ev ); - virtual void TriggerEvent( Event *ev ); + virtual void TriggerEvent( Event *ev ); void hideModel( void ); void EventHideModel( Event *ev ); - virtual void showModel( void ); + virtual void showModel( void ); void EventShowModel( Event *ev ); qboolean hidden( void ); void ProcessInitCommands( void ); @@ -317,17 +317,17 @@ public: void setSolidType( solid_t type ); int getSolidType( void ); - virtual void setContentsSolid( void ); + virtual void setContentsSolid( void ); - virtual Vector getParentVector( Vector vec ); + virtual Vector getParentVector( Vector vec ); Vector getLocalVector( Vector vec ); - virtual void setSize( Vector min, Vector max ); - virtual void setOrigin( Vector org ); - virtual void setOriginEvent( Vector org ); - virtual void setOrigin( void ); - virtual void addOrigin( Vector org ); - virtual void updateOrigin( void ); + virtual void setSize( Vector min, Vector max ); + void setOrigin( Vector org ) override; + void setOriginEvent( Vector org ) override; + virtual void setOrigin( void ); + virtual void addOrigin( Vector org ); + virtual void updateOrigin( void ); void GetRawTag( int tagnum, orientation_t * orient ); qboolean GetRawTag( const char * tagname, orientation_t * orient ); @@ -342,14 +342,14 @@ public: void GetTagAngles( Event *ev ); void GetTagPosition( Event *ev ); - virtual int CurrentFrame( bodypart_t part = legs ); - virtual int CurrentAnim( bodypart_t part = legs ); + virtual int CurrentFrame( bodypart_t part = legs ); + virtual int CurrentAnim( bodypart_t part = legs ); - virtual void setAngles( Vector ang ); - virtual void setAngles( void ); + void setAngles( Vector ang ) override; + virtual void setAngles( void ); void SetOrigin( Event *ev ); - virtual void ShowInfo( float fDot, float fDist ); + virtual void ShowInfo( float fDot, float fDist ); void GetControllerAngles( Event *ev ); Vector GetControllerAngles( int num ); @@ -367,8 +367,8 @@ public: qboolean droptofloor( float maxfall ); qboolean isClient( void ); - virtual void SetDeltaAngles( void ); - virtual void DamageEvent( Event *event ); + virtual void SetDeltaAngles( void ); + virtual void DamageEvent( Event *event ); void Damage( Entity *inflictor, Entity *attacker, float damage, @@ -382,13 +382,13 @@ public: void Stun( float time ); void DamageType( Event *ev ); - virtual qboolean CanDamage( Entity *target, Entity *skip_ent = NULL ); + virtual qboolean CanDamage( Entity *target, Entity *skip_ent = NULL ); - virtual void AddImmunity( Event *ev ); - virtual void RemoveImmunity( Event *ev ); + virtual void AddImmunity( Event *ev ); + virtual void RemoveImmunity( Event *ev ); qboolean Immune( int meansofdeath ); - virtual void Delete( void ); + virtual void Delete( void ); void Remove( Event *ev ); void EventSoundDone( Event *ev ); @@ -397,10 +397,10 @@ public: void EventInPVS( Event *ev ); qboolean FovCheck( float *delta, float fovdot ); - virtual bool CanSee( Entity *ent, float fov, float vision_distance ); + virtual bool CanSee( Entity *ent, float fov, float vision_distance ); void CanSee( Event *ev ); - virtual qboolean IsDead(); + virtual qboolean IsDead(); qboolean IsTouching( Entity *e1 ); void IsTouching( Event *ev ); @@ -413,9 +413,9 @@ public: void FadeIn( Event *ev ); void Fade( Event *ev ); - virtual void CheckGround( void ); - virtual qboolean HitSky( trace_t *trace ); - virtual qboolean HitSky( void ); + virtual void CheckGround( void ); + virtual qboolean HitSky( trace_t *trace ); + virtual qboolean HitSky( void ); void BecomeSolid( Event *ev ); void BecomeNonSolid( Event *ev ); @@ -481,9 +481,9 @@ public: void SetShaderData( Event *ev ); void DoForceActivate( void ); - virtual void ClientThink( void ); - virtual void Postthink( void ); - virtual void Think( void ); + virtual void ClientThink( void ); + virtual void Postthink( void ); + virtual void Think( void ); void DamageSkin( trace_t * trace, float damage ); @@ -516,10 +516,10 @@ public: void joinTeam( Entity *teammember ); void quitTeam( void ); qboolean isBoundTo( Entity *master ); - virtual void bind( Entity *master, qboolean use_my_angles = false, qboolean bBindChilds = false ); - virtual void unbind( void ); - virtual void glue( Entity *master, qboolean use_my_angles = true ); - virtual void unglue( void ); + virtual void bind( Entity *master, qboolean use_my_angles = false, qboolean bBindChilds = false ); + virtual void unbind( void ); + virtual void glue( Entity *master, qboolean use_my_angles = true ); + virtual void unglue( void ); void JoinTeam( Event *ev ); void EventQuitTeam( Event *ev ); @@ -530,7 +530,7 @@ public: void AddToSoundManager( Event *ev ); void NoLerpThisFrame( void ); - virtual void addAngles( Vector add ); + virtual void addAngles( Vector add ); void DeathSinkStart( Event *ev ); void DeathSink( Event *ev ); @@ -566,17 +566,17 @@ public: void EventSetRotatedBbox( Event *ev ); void EventGetRotatedBbox( Event *ev ); - virtual void EndFrame( void ); - virtual void CalcBlend( void ); + virtual void EndFrame( void ); + virtual void CalcBlend( void ); - virtual void VelocityModified( void ); + virtual void VelocityModified( void ); - virtual void PreAnimate( void ); - virtual void PostAnimate( void ); + virtual void PreAnimate( void ); + virtual void PostAnimate( void ); - virtual void Archive( Archiver &arc ); - virtual bool AutoArchiveModel( void ); - virtual void PathnodeClaimRevoked( class PathNode *node ); + void Archive( Archiver &arc ) override; + virtual bool AutoArchiveModel( void ); + virtual void PathnodeClaimRevoked( class PathNode *node ); virtual qboolean BlocksAIMovement( void ) const; virtual qboolean AIDontFace( void ) const; diff --git a/code/game/explosion.h b/code/game/explosion.h index e5213b82..19618004 100644 --- a/code/game/explosion.h +++ b/code/game/explosion.h @@ -45,7 +45,7 @@ class Exploder : public Trigger CLASS_PROTOTYPE( Exploder ); Exploder(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Exploder::Archive @@ -78,7 +78,7 @@ class MultiExploder : public Trigger CLASS_PROTOTYPE( MultiExploder ); MultiExploder(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void MultiExploder::Archive @@ -122,7 +122,7 @@ class ExplodeObject : public MultiExploder CLASS_PROTOTYPE( ExplodeObject ); ExplodeObject(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void ExplodeObject::Archive diff --git a/code/game/g_spawn.h b/code/game/g_spawn.h index 9c474e3e..59f15a0b 100644 --- a/code/game/g_spawn.h +++ b/code/game/g_spawn.h @@ -67,7 +67,7 @@ public: Listener *Spawn( void ); Listener *SpawnInternal( void ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; extern Container< SafePtr< Listener > > g_spawnlist; diff --git a/code/game/game.h b/code/game/game.h index 5e609805..ec931449 100644 --- a/code/game/game.h +++ b/code/game/game.h @@ -39,7 +39,7 @@ public: public: CLASS_PROTOTYPE( Game ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; Game(); ~Game(); diff --git a/code/game/gamescript.h b/code/game/gamescript.h index 1716d5f6..3a37a54a 100644 --- a/code/game/gamescript.h +++ b/code/game/gamescript.h @@ -84,7 +84,7 @@ public: public: StateScript(); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; bool AddLabel( str label, unsigned char *pos, bool private_section = false ); bool AddLabel( const_str label, unsigned char *pos, bool private_section = false ); @@ -127,7 +127,7 @@ public: GameScript( const char *filename ); ~GameScript(); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ); static void Archive( Archiver& arc, GameScript *&scr ); void ArchiveCodePos( Archiver& arc, unsigned char **codePos ); diff --git a/code/game/gibs.h b/code/game/gibs.h index aee8a20f..382d201d 100644 --- a/code/game/gibs.h +++ b/code/game/gibs.h @@ -56,7 +56,7 @@ class Gib : public Mover void Stop( Event *ev ); void Damage( Event *ev ); void ClipGibVelocity( void ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Gib::Archive diff --git a/code/game/gravpath.h b/code/game/gravpath.h index 1aae471f..efa56b6f 100644 --- a/code/game/gravpath.h +++ b/code/game/gravpath.h @@ -52,7 +52,7 @@ class GravPathNode : public Entity float Speed( void ); float MaxSpeed( void ); float Radius( void ) { return radius; }; - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void GravPathNode::Archive @@ -99,7 +99,7 @@ class GravPath : public Listener float Length(void); GravPathNode *Start(void); GravPathNode *End(void); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; Vector mins; Vector maxs; @@ -161,7 +161,7 @@ class GravPathManager : public Class void RemovePath(GravPath *p); Vector CalculateGravityPull(Entity &ent, Vector position, qboolean *force, float *max_speed); void DrawGravPaths( void ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void GravPathManager::Archive diff --git a/code/game/grenadehint.h b/code/game/grenadehint.h index f0eb4573..d0f06dfd 100644 --- a/code/game/grenadehint.h +++ b/code/game/grenadehint.h @@ -40,7 +40,7 @@ public: static void ResetHints( void ); static int GetClosestSet( GrenadeHint **ppHints, int nHints, Vector& vOrg, float fMaxRangeSquared ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void GrenadeHint::Archive diff --git a/code/game/health.h b/code/game/health.h index b139447b..cb0011f0 100644 --- a/code/game/health.h +++ b/code/game/health.h @@ -37,7 +37,7 @@ public: CLASS_PROTOTYPE( Health ); Health(); - virtual void PickupHealth( Event *ev ); + virtual void PickupHealth( Event *ev ); }; #endif /* health.h */ diff --git a/code/game/hud.h b/code/game/hud.h index 4c7e92c7..155915cc 100644 --- a/code/game/hud.h +++ b/code/game/hud.h @@ -115,7 +115,7 @@ private: public: CLASS_PROTOTYPE( Hud ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; static Hud *Find( int index ); static Hud *FindOrCreate( int index ); diff --git a/code/game/item.h b/code/game/item.h index 745661a0..efea04bf 100644 --- a/code/game/item.h +++ b/code/game/item.h @@ -70,48 +70,48 @@ public: Item(); ~Item(); - virtual void PlaceItem( void ); - virtual void SetOwner( Sentient *ent ); + virtual void PlaceItem( void ); + virtual void SetOwner( Sentient *ent ); virtual Sentient* GetOwner( void ); - virtual void Delete( void ); + void Delete( void ) override; void RemoveFromOwner( void ); void SetNoRemove( Event *ev ); - virtual void DropToFloor( Event *ev ); + virtual void DropToFloor( Event *ev ); virtual Item *ItemPickup( Entity *other, qboolean add_to_inventory = qtrue ); - virtual void Respawn( Event *ev ); - virtual void setRespawn( qboolean flag ); + virtual void Respawn( Event *ev ); + virtual void setRespawn( qboolean flag ); void setRespawn( Event *ev ); - virtual qboolean Respawnable( void ); - virtual void setRespawnTime( float time ); + virtual qboolean Respawnable( void ); + virtual void setRespawnTime( float time ); void setRespawnTime( Event *ev ); - virtual float RespawnTime( void ); + virtual float RespawnTime( void ); void RespawnDone( Event *ev ); void PickupDone( Event *ev ); virtual int GetItemIndex( void ) { return item_index; }; - virtual int getAmount( void ); - virtual void setAmount( int startamount ); + virtual int getAmount( void ); + virtual void setAmount( int startamount ); - virtual int MaxAmount( void ); - virtual qboolean Pickupable( Entity *other ); + virtual int MaxAmount( void ); + virtual qboolean Pickupable( Entity *other ); - virtual void setName( const char *i ); - virtual str getName( void ); - virtual int getIndex( void ); - virtual void SetAmountEvent( Event *ev ); - virtual void SetDMAmountEvent(Event *ev); - virtual void SetMaxAmount( Event *ev ); - virtual void SetItemName( Event *ev ); + virtual void setName( const char *i ); + virtual str getName( void ); + virtual int getIndex( void ); + virtual void SetAmountEvent( Event *ev ); + virtual void SetDMAmountEvent(Event *ev); + virtual void SetMaxAmount( Event *ev ); + virtual void SetItemName( Event *ev ); - virtual void SetMax( int maxamount ); - virtual void Add( int num ); - virtual void Remove( int num ); - virtual qboolean Use( int amount ); - virtual qboolean Removable( void ); - virtual void Pickup( Event *ev ); - virtual qboolean Drop( void ); - virtual void RespawnSound( Event *ev ); - virtual void DialogNeeded( Event *ev ); - virtual str GetDialogNeeded( void ); + virtual void SetMax( int maxamount ); + virtual void Add( int num ); + virtual void Remove( int num ); + virtual qboolean Use( int amount ); + virtual qboolean Removable( void ); + virtual void Pickup( Event *ev ); + virtual qboolean Drop( void ); + virtual void RespawnSound( Event *ev ); + virtual void DialogNeeded( Event *ev ); + virtual str GetDialogNeeded( void ); void Landed( Event *ev ); void CoolItemEvent( Event *ev ); void ForceCoolItemEvent( Event *ev ); @@ -123,7 +123,7 @@ public: void EventViewModelPrefix( Event *ev ); void updatePrefix( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Item::Archive diff --git a/code/game/level.h b/code/game/level.h index fb921e01..7b1f6aa1 100644 --- a/code/game/level.h +++ b/code/game/level.h @@ -276,7 +276,7 @@ public: qboolean Reborn( void ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; extern Level level; diff --git a/code/game/lodthing.h b/code/game/lodthing.h index 16d2093f..d5c4ed2e 100644 --- a/code/game/lodthing.h +++ b/code/game/lodthing.h @@ -34,7 +34,7 @@ public: void Spawn( Event *ev ); void PassEvent( Event *ev ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void LODMaster::Archive @@ -62,7 +62,7 @@ public: void SetModelEvent( Event *ev ); void Delete( Event *ev ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void LODSlave::Archive diff --git a/code/game/misc.h b/code/game/misc.h index 3547eb3b..ff0c8902 100644 --- a/code/game/misc.h +++ b/code/game/misc.h @@ -95,12 +95,12 @@ class ExplodingWall : public Trigger void SetExplosions( Event *ev ); void SetupSecondStage( void ); void Explode( Event *ev ); - void DamageEvent( Event *ev ); + void DamageEvent( Event *ev ) override; void GroundDamage( Event *ev ); void TouchFunc( Event *ev ); void StopRotating( Event *ev ); void CheckOnGround( Event *ev ); - void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void ExplodingWall::Archive @@ -134,11 +134,11 @@ class Teleporter : public Trigger CLASS_PROTOTYPE( Teleporter ); Teleporter(); - virtual void StartTeleport( Event *ev ); - virtual void Teleport( Event *ev ); - virtual void StopTeleport( Event *ev ); - void SetThread( Event *ev ); - virtual void Archive( Archiver &arc ); + virtual void StartTeleport( Event *ev ); + virtual void Teleport( Event *ev ); + virtual void StopTeleport( Event *ev ); + void SetThread( Event *ev ); + void Archive( Archiver &arc ) override; }; inline void Teleporter::Archive @@ -160,7 +160,7 @@ class TeleporterDestination : public Entity TeleporterDestination(); void SetMoveDir( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TeleporterDestination::Archive @@ -191,7 +191,7 @@ class UseAnim : public Entity CLASS_PROTOTYPE( UseAnim ); UseAnim(); - virtual void Touched( Event *ev ); + virtual void Touched( Event *ev ); void Reset( Event *ev ); void SetThread( Event * ev ); void SetTriggerTarget( Event * ev ); @@ -205,7 +205,7 @@ class UseAnim : public Entity bool canBeUsed( Entity *activator ); bool GetInformation( Entity *activator, Vector * org, Vector * angles, str * animatoin, int * loopcount, str * state, str * camera ); void TriggerTargets( Entity *activator ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void UseAnim::Archive @@ -253,7 +253,7 @@ class UseAnimDestination : public Entity int GetNumLoops( void ); str GetAnim( void ); str GetState( void ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void UseAnimDestination::Archive @@ -313,7 +313,7 @@ class UseObject : public Animate void ActivateEvent( Event *ev ); void DeactivateEvent( Event *ev ); void UseMaterialEvent( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void UseObject::Archive @@ -357,7 +357,7 @@ public: CLASS_PROTOTYPE( VehiclePoint ); void SetSpawnFlags( Event *ev ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void VehiclePoint::Archive @@ -381,7 +381,7 @@ class MonkeyBars : public Entity MonkeyBars(); void SetAngleEvent( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void MonkeyBars::Archive @@ -405,7 +405,7 @@ class HorizontalPipe : public Entity HorizontalPipe(); void SetAngleEvent( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void HorizontalPipe::Archive @@ -436,7 +436,7 @@ class TossObject : public Animate void SetBounceSound( str bounce ); void SetBounceSoundChance( float chance ); void SetVelocity( float severity ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TossObject::Archive @@ -473,7 +473,7 @@ class PushObject : public Entity Entity *getOwner( void ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void PushObject::Archive @@ -517,7 +517,7 @@ class FallingRock : public Entity Entity *SetNextBounceDir( void ); void SetBounceSound( str sound ); void SetBounceSound( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; public: CLASS_PROTOTYPE( FallingRock ); @@ -564,7 +564,7 @@ class SupplyWater : public Trigger void Activate( Event *ev ); void MaxWater( Event *ev ); void ChargeOff( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void SupplyWater::Archive diff --git a/code/game/mover.h b/code/game/mover.h index c49f9ccb..d39eed77 100644 --- a/code/game/mover.h +++ b/code/game/mover.h @@ -49,7 +49,7 @@ class Mover : public Trigger void MoveDone( Event *ev ); void MoveTo( Vector tdest, Vector angdest, float tspeed, Event &event ); void LinearInterpolate( Vector tdest, Vector angdest, float time, Event &event ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Mover::Archive diff --git a/code/game/nature.h b/code/game/nature.h index e3c4dda0..765d4023 100644 --- a/code/game/nature.h +++ b/code/game/nature.h @@ -34,7 +34,7 @@ class Emitter : public Entity public: CLASS_PROTOTYPE( Emitter ); Emitter(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Emitter::Archive @@ -60,7 +60,7 @@ class Rain : public Emitter public: CLASS_PROTOTYPE( Rain ); Rain(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Rain::Archive diff --git a/code/game/navigate.h b/code/game/navigate.h index 5d8f66bd..03d74509 100644 --- a/code/game/navigate.h +++ b/code/game/navigate.h @@ -181,7 +181,7 @@ class PathNode : public SimpleEntity PathNode(); virtual ~PathNode(); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; void ArchiveDynamic( Archiver& arc ); void ArchiveStatic( Archiver& arc ); @@ -200,7 +200,7 @@ class PathNode : public SimpleEntity const_str GetSpecialAttack( class Actor *pActor ); void IsTouching( Event *ev ); qboolean IsTouching( Entity *e1 ); - void setOriginEvent( Vector org ); + void setOriginEvent( Vector org ) override; }; @@ -351,7 +351,7 @@ public: void SetTeam( Event *ev ); void SetUse( Event *ev ); - void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; typedef SafePtr< AttractiveNode > AttractiveNodePtr; diff --git a/code/game/parm.h b/code/game/parm.h index fc667fab..b942324d 100644 --- a/code/game/parm.h +++ b/code/game/parm.h @@ -43,7 +43,7 @@ public: public: CLASS_PROTOTYPE( Parm ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; void GetOther( Event *ev ); void GetOwner( Event *ev ); diff --git a/code/game/player.h b/code/game/player.h index 5e14dbd5..36afae5e 100644 --- a/code/game/player.h +++ b/code/game/player.h @@ -491,9 +491,9 @@ public: void EndLevel( Event *ev ); void Respawn( Event *ev ); - virtual Vector GunTarget( bool bNoCollision = false ); - void SetDeltaAngles( void ); - virtual void setAngles( Vector ang ); + Vector GunTarget( bool bNoCollision = false ) override; + void SetDeltaAngles( void ) override; + void setAngles( Vector ang ) override; qboolean canUse(); qboolean canUse( Entity *entity, bool requiresLookAt ); @@ -503,7 +503,7 @@ public: void Killed( Event *ev ); void KilledPlayerInDeathmatch( Player *killed ); void Dead( Event *ev ); - void ArmorDamage( Event *ev ); + void ArmorDamage( Event *ev ) override; void Pain( Event *ev ); void DeadBody( void ); void DeadBody( Event *ev ); @@ -521,11 +521,11 @@ public: // void CheckFeet( void ); void CheckMoveFlags( void ); void ClientInactivityTimer( void ); - virtual void ClientThink( void ); + void ClientThink( void ) override; void UpdateEnemies( void ); - virtual void Think(); - virtual void Postthink(); + void Think() override; + void Postthink() override; void InitLegsStateTable( void ); void InitTorsoStateTable( void ); @@ -533,7 +533,7 @@ public: void ResetState( Event *ev ); void EvaluateState( State *forceTorso = NULL, State *forceLegs = NULL ); - void CheckGround( void ); + void CheckGround( void ) override; void UpdateViewAngles( usercmd_t *cmd ); qboolean AnimMove( Vector &move, Vector *endpos = NULL ); qboolean TestMove( Vector &pos, Vector *endpos = NULL ); @@ -581,7 +581,7 @@ public: float CalcRoll( void ); void WorldEffects( void ); void AddBlend( float r, float g, float b, float a ); - void CalcBlend( void ); + void CalcBlend( void ) override; void DamageFeedback( void ); void CopyStats( Player *player ); @@ -609,11 +609,11 @@ public: void SwingAngles( float destination, float swingTolerance, float clampTolerance, float speed, float *angle, qboolean *swinging ); void PlayerAngles( void ); void FinishMove( void ); - virtual void EndFrame( void ); + void EndFrame( void ) override; void TestThread( Event *ev ); - void useWeapon( const char *weaponname, weaponhand_t hand = WEAPON_MAIN ); - void useWeapon( Weapon *weapon, weaponhand_t hand = WEAPON_MAIN ); + void useWeapon( const char *weaponname, weaponhand_t hand = WEAPON_MAIN ) override; + void useWeapon( Weapon *weapon, weaponhand_t hand = WEAPON_MAIN ) override; void GotKill( Event *ev ); void SetPowerupTimer( Event *ev ); @@ -627,7 +627,7 @@ public: void ChangeMusicVolume( float volume, float fade_time ); void RestoreMusicVolume( float fade_time ); - void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; void ArchivePersistantData( Archiver &arc ); void GiveOxygen( float time ); @@ -640,12 +640,12 @@ public: void Jump( Event *ev ); void JumpXY( Event *ev ); - virtual Vector EyePosition( void ); + virtual Vector EyePosition( void ); void GetViewangles( Event *ev ); void SetViewangles( Event *ev ); - virtual void SetViewAngles( Vector angles ); - virtual Vector GetViewAngles( void ); + void SetViewAngles( Vector angles ) override; + Vector GetViewAngles( void ) override; void SetFov( float newFov ); void EventSetSelectedFov( Event *ev ); void SetSelectedFov( float newFov ); @@ -744,13 +744,13 @@ public: painDirection_t Pain_string_to_int( str pain ); inline Vector GetVAngles( void ){ return v_angle; } void SpawnDamageEffect( meansOfDeath_t mod ); - virtual void GetStateAnims( Container *c ); - virtual void VelocityModified( void ); + void GetStateAnims( Container *c ) override; + void VelocityModified( void ) override; int GetKnockback( int original_knockback, qboolean blocked ); int GetMoveResult( void ); - virtual void ReceivedItem( Item * item ); - virtual void RemovedItem( Item * item ); - virtual void AmmoAmountChanged( Ammo * ammo, int inclip = 0 ); + void ReceivedItem( Item * item ) override; + void RemovedItem( Item * item ) override; + void AmmoAmountChanged( Ammo * ammo, int inclip = 0 ) override; void PhysicsOn( Event *ev ); void PhysicsOff( Event *ev ); @@ -772,7 +772,7 @@ public: void WeaponsNotHolstered( void ); void Loaded( void ); void PlayerShowModel( Event *ev ); - virtual void showModel( void ); + void showModel( void ) override; void ResetHaveItem( Event *ev ); void Join_DM_Team( Event *ev ); void Auto_Join_DM_Team( Event *ev ); @@ -794,7 +794,7 @@ public: void EventIPrint( Event *ev ); qboolean ViewModelAnim( str anim, qboolean force_restart, qboolean bFullAnim ); void FindAlias( str &output, str name, AliasListNode_t **node ); - virtual void Spawned( void ); + virtual void Spawned( void ); bool IsReady( void ) const; void EventGetReady( Event *ev ); diff --git a/code/game/scriptmaster.h b/code/game/scriptmaster.h index b40a27f7..b8590189 100644 --- a/code/game/scriptmaster.h +++ b/code/game/scriptmaster.h @@ -82,7 +82,7 @@ public: virtual ~ScriptMaster(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; void ArchiveString( Archiver& arc, const_str& s ); const_str AddString( const char *s ); @@ -180,7 +180,7 @@ public: public: CLASS_PROTOTYPE( ScriptEvent ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; bool IsRegistered( void ); void Trigger( Event *ev ); diff --git a/code/game/scriptslave.h b/code/game/scriptslave.h index 3f185ea6..160af630 100644 --- a/code/game/scriptslave.h +++ b/code/game/scriptslave.h @@ -98,7 +98,7 @@ class ScriptSlave : public Mover void SetAnglesEvent( Event *ev ); void SetAngleEvent( Event *ev ); void SetModelEvent( Event *ev ); - void TriggerEvent( Event *ev ); + void TriggerEvent( Event *ev ) override; void GotoNextWaypoint( Event *ev ); void JumpTo( Event *ev ); void MoveToEvent( Event *ev ); @@ -155,7 +155,7 @@ class ScriptSlave : public Mover void EventModifyFlyPath( Event *ev ); void SetupPath( cSpline< 4, 512 > *pPath, SimpleEntity *se ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void ScriptSlave::Archive diff --git a/code/game/scriptthread.h b/code/game/scriptthread.h index 8390d093..fb1e96c5 100644 --- a/code/game/scriptthread.h +++ b/code/game/scriptthread.h @@ -43,7 +43,7 @@ public: void DelayExecute(Event* ev = NULL); ScriptClass* GetScriptClass(void); - str ScriptThread::FileName(void); + str FileName(void); int GetThreadState(void); void Pause(void); diff --git a/code/game/sentient.h b/code/game/sentient.h index 0dd84ad7..59e1540e 100644 --- a/code/game/sentient.h +++ b/code/game/sentient.h @@ -156,12 +156,12 @@ class Sentient : public Animate float m_fHelmetSpeed; bool m_bDontDropWeapons; - virtual void EventTake( Event *ev ); - virtual void EventFreeInventory( Event *ev ); - virtual void EventGiveAmmo( Event *ev ); - virtual void EventGiveItem( Event *ev ); - void SetBloodModel( Event *ev ); - virtual void EventGiveTargetname( Event *ev ); + virtual void EventTake( Event *ev ); + virtual void EventFreeInventory( Event *ev ); + virtual void EventGiveAmmo( Event *ev ); + virtual void EventGiveItem( Event *ev ); + void SetBloodModel( Event *ev ); + virtual void EventGiveTargetname( Event *ev ); void EventGerman( Event *ev ); void EventAmerican( Event *ev ); @@ -183,8 +183,8 @@ class Sentient : public Animate void DisbandSquadMate( Sentient *pExFriendly ); bool IsSquadMate( Sentient *pFriendly ); - virtual void ArmorDamage( Event *ev ); - virtual qboolean CanBlock( int meansofdeath, qboolean full_block ); + virtual void ArmorDamage( Event *ev ); + virtual qboolean CanBlock( int meansofdeath, qboolean full_block ); void AddBloodSpurt( Vector direction ); qboolean ShouldBleed( int meansofdeath, qboolean dead ); qboolean ShouldGib( int meansofdeath, float damage ); @@ -192,9 +192,9 @@ class Sentient : public Animate str GetBloodSplatName( void ); float GetBloodSplatSize( void ); str GetGibName( void ); - virtual void TurnOffShadow( Event *ev ); - virtual void TurnOnShadow( Event *ev ); - virtual void WeaponKnockedFromHands( void ); + virtual void TurnOffShadow( Event *ev ); + virtual void TurnOnShadow( Event *ev ); + virtual void WeaponKnockedFromHands( void ); void UpdateOffsetColor( Event *ev ); @@ -265,8 +265,8 @@ class Sentient : public Animate virtual ~Sentient(); Vector EyePosition( void ); - virtual Vector GunPosition( void ); - virtual Vector GunTarget( bool bNoCollision = false ); + virtual Vector GunPosition( void ); + virtual Vector GunTarget( bool bNoCollision = false ); void FireWeapon( Event *ev ); void FireWeapon( int number, firemode_t mode ); void StopFireWeapon( Event *ev ); @@ -280,8 +280,8 @@ class Sentient : public Animate Weapon *WorstWeapon( Weapon *ignore = NULL, qboolean bGetItem = false, int iIgnoreClass = 0 ); Weapon *NextWeapon( Weapon *weapon ); Weapon *PreviousWeapon( Weapon *weapon ); - virtual void useWeapon( const char *weaponname, weaponhand_t hand ); - virtual void useWeapon( Weapon *weapon, weaponhand_t hand ); + virtual void useWeapon( const char *weaponname, weaponhand_t hand ); + virtual void useWeapon( Weapon *weapon, weaponhand_t hand ); qboolean WeaponsOut( void ); void Holster( qboolean putaway ); void SafeHolster( qboolean putaway ); @@ -315,20 +315,20 @@ class Sentient : public Animate int NumInventoryItems( void ); Item *NextItem( Item *item ); Item *PrevItem( Item *item ); - virtual void DropInventoryItems( void ); + virtual void DropInventoryItems( void ); void ListInventory( void ); - bool CanSee( Entity *ent, float fov, float vision_distance ); - virtual void SetViewAngles( Vector angles ); - virtual Vector GetViewAngles( void ); + bool CanSee( Entity *ent, float fov, float vision_distance ) override; + virtual void SetViewAngles( Vector angles ); + virtual Vector GetViewAngles( void ); qboolean PowerupActive( void ); - virtual void setModel( const char *model ); - virtual void Archive( Archiver &arc ); + void setModel( const char *model ) override; + void Archive( Archiver &arc ) override; void ArchivePersistantData( Archiver &arc ); void DoubleArmor( void ); - virtual qboolean DoGib( int meansofdeath, Entity *inflictor ); + virtual qboolean DoGib( int meansofdeath, Entity *inflictor ); void JumpXY( Event *ev ); void MeleeAttackStart( Event *ev ); void MeleeAttackEnd( Event *ev ); @@ -338,9 +338,9 @@ class Sentient : public Animate void StunEnd( Event *ev ); void SetAttackBlocked( bool blocked ); void SetOffsetColor( float r, float g, float b, float time ); - virtual void ReceivedItem( Item * item ); - virtual void RemovedItem( Item * item ); - virtual void AmmoAmountChanged( Ammo * ammo, int inclip = 0 ); + virtual void ReceivedItem( Item * item ); + virtual void RemovedItem( Item * item ); + virtual void AmmoAmountChanged( Ammo * ammo, int inclip = 0 ); void AmmoAmountInClipChanged( str ammo_type, int amount ); void PutawayWeapon( Event *ev ); @@ -356,7 +356,7 @@ class Sentient : public Animate void StopOnFire( Event *ev ); void SpawnBloodyGibs( Event *ev ); void SetMaxGibs( Event *ev ); - virtual void GetStateAnims( Container *c ); + virtual void GetStateAnims( Container *c ); void SpawnEffect( str modelname, Vector pos ); }; diff --git a/code/game/simpleactor.h b/code/game/simpleactor.h index d117eac2..69ddfca7 100644 --- a/code/game/simpleactor.h +++ b/code/game/simpleactor.h @@ -135,12 +135,12 @@ public: SimpleActor(); - virtual void Archive( Archiver & arc ); - virtual void SetMoveInfo( mmove_t *mm ); - virtual void GetMoveInfo( mmove_t *mm ); - bool CanSeeFrom( vec3_t pos, Entity *ent ); - virtual bool CanTarget( void ); - virtual bool IsImmortal( void ); + void Archive( Archiver & arc ) override; + virtual void SetMoveInfo(mmove_t* mm); + virtual void GetMoveInfo(mmove_t* mm); + bool CanSeeFrom(vec3_t pos, Entity* ent); + virtual bool CanTarget(void); + virtual bool IsImmortal(void); bool DoesTheoreticPathExist( Vector vDestPos, float fMaxPath ); void SetPath( Vector vDestPos, const char *description, int iMaxDirtyTime, float *vLeashHome, float fLeashDistSquared ); void SetPath( SimpleEntity *pDestNode, char *description, int iMaxDirtyTime ); @@ -188,7 +188,7 @@ public: void ChangeActionAnim( void ); void ChangeSayAnim( void ); void StopAnimating( int slot ); - void AnimFinished( int slot ); + void AnimFinished( int slot ) override; void UpdateAim( void ); void UpdateAimMotion( void ); void EventAIOn( Event *ev ); diff --git a/code/game/simpleentity.h b/code/game/simpleentity.h index 25d1d8cf..30cceb36 100644 --- a/code/game/simpleentity.h +++ b/code/game/simpleentity.h @@ -60,11 +60,11 @@ public: virtual ~SimpleEntity(); void SimpleArchive( Archiver& arc ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; - virtual void setOrigin( Vector origin ); - virtual void setOriginEvent( Vector origin ); - virtual void setAngles( Vector angles ); + virtual void setOrigin(Vector origin); + virtual void setOriginEvent(Vector origin); + virtual void setAngles(Vector angles); void SetTarget( str target ); void SetTargetName( str targetname ); diff --git a/code/game/soundman.h b/code/game/soundman.h index 2dd2c54b..3ac6e758 100644 --- a/code/game/soundman.h +++ b/code/game/soundman.h @@ -74,7 +74,7 @@ class SoundManager : public Listener void Reset( void ); void Load( void ); void AddEntity( Entity * ent ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void SoundManager::Archive diff --git a/code/game/spawners.h b/code/game/spawners.h index 8e32eebc..b69a4ed2 100644 --- a/code/game/spawners.h +++ b/code/game/spawners.h @@ -50,14 +50,14 @@ class Spawn : public ScriptSlave protected: void SetArgs( SpawnArgs &args ); - virtual void DoSpawn( Event *ev ); + virtual void DoSpawn( Event *ev ); public: CLASS_PROTOTYPE( Spawn ); Spawn(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Spawn::Archive @@ -92,7 +92,7 @@ class RandomSpawn : public Spawn RandomSpawn(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void RandomSpawn::Archive @@ -109,7 +109,7 @@ inline void RandomSpawn::Archive class ReSpawn : public Spawn { protected: - virtual void DoSpawn( Event *ev ); + void DoSpawn( Event *ev ) override; public: CLASS_PROTOTYPE( ReSpawn ); }; @@ -117,7 +117,7 @@ class ReSpawn : public Spawn class SpawnOutOfSight : public Spawn { protected: - virtual void DoSpawn( Event *ev ); + void DoSpawn( Event *ev ) override; public: CLASS_PROTOTYPE( SpawnOutOfSight ); }; @@ -125,7 +125,7 @@ class SpawnOutOfSight : public Spawn class SpawnChain : public Spawn { protected: - virtual void DoSpawn( Event *ev ); + void DoSpawn( Event *ev ) override; public: CLASS_PROTOTYPE( SpawnChain ); }; diff --git a/code/game/specialfx.h b/code/game/specialfx.h index 0cf975ac..2e52e41a 100644 --- a/code/game/specialfx.h +++ b/code/game/specialfx.h @@ -53,7 +53,7 @@ class Fulcrum : public ScriptSlave void Reset( Event *ev ); void Touched( Event *ev ); void Adjust( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Fulcrum::Archive @@ -95,7 +95,7 @@ class RunThrough : public Entity CLASS_PROTOTYPE( RunThrough ); RunThrough(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void RunThrough::Archive @@ -150,7 +150,7 @@ class SinkObject : public ScriptSlave void SetSinkSound( Event *ev ); void MakeActive( Event *ev ); void MakeNonActive( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void SinkObject::Archive diff --git a/code/game/trigger.h b/code/game/trigger.h index ab3ec0ab..c39e915c 100644 --- a/code/game/trigger.h +++ b/code/game/trigger.h @@ -80,7 +80,7 @@ class Trigger : public Animate virtual ~Trigger(); // override this to allow objects other than players, projectiles, and monsters to activate the trigger - virtual qboolean respondTo( Entity *other ); + virtual qboolean respondTo( Entity *other ); // override this to redirect messages to an entity other than the one who triggered it virtual Entity *getActivator( Entity *other ); @@ -121,7 +121,7 @@ class Trigger : public Animate void StartThread( Event *ev ); void TriggerStuff( Event *ev ); void ActivateTargets( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Trigger::Archive @@ -160,7 +160,7 @@ class TriggerVehicle : public Trigger public: CLASS_PROTOTYPE( TriggerVehicle ); - virtual qboolean respondTo( Entity *other ); + qboolean respondTo( Entity *other ) override; }; class TriggerAllEntry @@ -181,7 +181,7 @@ private: public: CLASS_PROTOTYPE( TriggerAll ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; void TriggerStuff( Event *ev ); bool IsTriggerable( Entity *other ); @@ -209,9 +209,9 @@ class TouchField : public Trigger CLASS_PROTOTYPE( TouchField ); TouchField(); - virtual void Setup( Entity *ownerentity, Event &ontouch, Vector min, Vector max, int respondto ); + virtual void Setup( Entity *ownerentity, Event &ontouch, Vector min, Vector max, int respondto ); void SendEvent( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TouchField::Archive @@ -244,7 +244,7 @@ public: void SaveGame( Event *ev ); void EventSaveName( Event *ev ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void TriggerSave::Archive @@ -287,7 +287,7 @@ class TriggerPush : public Trigger void Push( Event *ev ); void SetPushDir( Event *ev ); void SetPushSpeed( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TriggerPush::Archive @@ -311,7 +311,7 @@ class TriggerPushAny : public Trigger TriggerPushAny(); void Push( Event *ev ); void SetSpeed( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TriggerPushAny::Archive @@ -352,7 +352,7 @@ class TriggerPlaySound : public Trigger void SetVolume( float vol ); void SetMinDist( float dist ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TriggerPlaySound::Archive @@ -414,7 +414,7 @@ class RandomSpeaker : public TriggerSpeaker void SetChance( float value ); void ScheduleSound( void ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void RandomSpeaker::Archive @@ -444,7 +444,7 @@ public: void ChangeLevel(Event* ev); const char* Map(void); const char* SpawnSpot(void); - virtual void Archive(Archiver& arc); + void Archive(Archiver& arc) override; }; class TriggerExit : public Trigger @@ -486,7 +486,7 @@ class TriggerHurt : public TriggerUse CLASS_PROTOTYPE( TriggerHurt ); TriggerHurt(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TriggerHurt::Archive @@ -512,7 +512,7 @@ class TriggerDamageTargets : public Trigger TriggerDamageTargets(); void PassDamage( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TriggerDamageTargets::Archive @@ -569,7 +569,7 @@ class TriggerMusic : public Trigger void SetAltMood( str crnt, str fback ); void SetOneShot( qboolean once ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TriggerMusic::Archive @@ -613,7 +613,7 @@ class TriggerReverb : public Trigger void SetAltReverb( int type, float level ); void SetOneShot( qboolean once ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TriggerReverb::Archive @@ -641,10 +641,10 @@ class TriggerByPushObject : public TriggerOnce public: CLASS_PROTOTYPE( TriggerByPushObject ); - virtual qboolean respondTo( Entity *other ); - virtual Entity *getActivator( Entity *other ); + qboolean respondTo( Entity *other ) override; + Entity *getActivator( Entity *other ) override; - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TriggerByPushObject::Archive @@ -670,7 +670,7 @@ class TriggerGivePowerup : public Trigger void SetOneShot( Event *ev ); void SetPowerupName( Event *ev ); void GivePowerup( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void TriggerGivePowerup::Archive @@ -693,7 +693,7 @@ public: TriggerClickItem(); void SetClickItemModelEvent( Event *ev ); - void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void TriggerClickItem::Archive diff --git a/code/game/vehicle.h b/code/game/vehicle.h index 159cdc64..3b2a004f 100644 --- a/code/game/vehicle.h +++ b/code/game/vehicle.h @@ -91,7 +91,7 @@ public: CLASS_PROTOTYPE( VehicleBase ); VehicleBase( void ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void VehicleBase::Archive @@ -319,8 +319,8 @@ protected: virtual void VehicleStart( Event *ev ); virtual void VehicleTouched( Event *ev ); virtual void VehicleBlocked( Event *ev ); - virtual void Think( void ); - virtual void Postthink( void ); + void Think( void ) override; + void Postthink( void ) override; virtual void Drivable( Event *ev ); virtual void UnDrivable( Event *ev ); virtual void Jumpable( Event *ev ); @@ -360,35 +360,35 @@ protected: virtual void SpawnTurret( Event *ev ); void EventLockMovement( Event *ev ); void EventUnlockMovement( Event *ev ); - virtual void QueryFreePassengerSlot( Event *ev ); - virtual void QueryFreeDriverSlot( Event *ev ); - virtual void QueryFreeTurretSlot( Event *ev ); - virtual void QueryPassengerSlotPosition( Event *ev ); - virtual void QueryDriverSlotPosition( Event *ev ); - virtual void QueryTurretSlotPosition( Event *ev ); - virtual void QueryPassengerSlotAngles( Event *ev ); - virtual void QueryDriverSlotAngles( Event *ev ); - virtual void QueryTurretSlotAngles( Event *ev ); - virtual void QueryPassengerSlotStatus( Event *ev ); - virtual void QueryDriverSlotStatus( Event *ev ); - virtual void QueryTurretSlotStatus( Event *ev ); - virtual void QueryPassengerSlotEntity( Event *ev ); - virtual void QueryDriverSlotEntity( Event *ev ); - virtual void QueryTurretSlotEntity( Event *ev ); - virtual void AttachPassengerSlot( Event *ev ); - virtual void AttachDriverSlot( Event *ev ); - virtual void AttachTurretSlot( Event *ev ); - virtual void DetachPassengerSlot( Event *ev ); - virtual void DetachDriverSlot( Event *ev ); - virtual void DetachTurretSlot( Event *ev ); - virtual void SetWheelCorners( Event *ev ); - virtual void EventDriveInternal( Event *ev, bool wait ); - virtual void EventDrive( Event *ev ); - virtual void EventDriveNoWait( Event *ev ); - virtual void EventStop( Event *ev ); - virtual void EventFullStop( Event *ev ); - virtual void EventModifyDrive( Event *ev ); - virtual void EventNextDrive( Event *ev ); + virtual void QueryFreePassengerSlot(Event* ev); + virtual void QueryFreeDriverSlot(Event* ev); + virtual void QueryFreeTurretSlot(Event* ev); + virtual void QueryPassengerSlotPosition(Event* ev); + virtual void QueryDriverSlotPosition(Event* ev); + virtual void QueryTurretSlotPosition(Event* ev); + virtual void QueryPassengerSlotAngles(Event* ev); + virtual void QueryDriverSlotAngles(Event* ev); + virtual void QueryTurretSlotAngles(Event* ev); + virtual void QueryPassengerSlotStatus(Event* ev); + virtual void QueryDriverSlotStatus(Event* ev); + virtual void QueryTurretSlotStatus(Event* ev); + virtual void QueryPassengerSlotEntity(Event* ev); + virtual void QueryDriverSlotEntity(Event* ev); + virtual void QueryTurretSlotEntity(Event* ev); + virtual void AttachPassengerSlot(Event* ev); + virtual void AttachDriverSlot(Event* ev); + virtual void AttachTurretSlot(Event* ev); + virtual void DetachPassengerSlot(Event* ev); + virtual void DetachDriverSlot(Event* ev); + virtual void DetachTurretSlot(Event* ev); + virtual void SetWheelCorners(Event* ev); + virtual void EventDriveInternal(Event* ev, bool wait); + virtual void EventDrive(Event* ev); + virtual void EventDriveNoWait(Event* ev); + virtual void EventStop(Event* ev); + virtual void EventFullStop(Event* ev); + virtual void EventModifyDrive(Event* ev); + virtual void EventNextDrive(Event* ev); void EventModel( Event *ev ); void EventRemoveOnDeath( Event *ev ); void EventSetExplosionModel( Event *ev ); @@ -449,7 +449,7 @@ protected: virtual qboolean ShowWeapon( void ); Entity *Driver( void ); virtual qboolean IsDrivable( void ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; str GetSoundSet( void ); virtual int QueryFreePassengerSlot( void ); virtual int QueryFreeDriverSlot( void ); @@ -853,8 +853,8 @@ public: virtual void Think() override; virtual void Postthink() override; virtual void CalculateOriginOffset() override; - virtual void UpdateSound(); - virtual void AttachDriverSlot(Event* ev); + void UpdateSound() override; + void AttachDriverSlot(Event* ev) override; }; class VehicleHalfTrack : public DrivableVehicle diff --git a/code/game/vehicleturret.h b/code/game/vehicleturret.h index aadab317..2b3c1d1d 100644 --- a/code/game/vehicleturret.h +++ b/code/game/vehicleturret.h @@ -63,7 +63,7 @@ public: VehicleTurretGun(); virtual ~VehicleTurretGun(); - virtual void Think( void ); + void Think( void ) override; void SetBaseOrientation( float( *borientation )[ 3 ], float *bangles ); void SetBaseEntity( Entity *e ); void SetVehicleOwner( Entity *e ); @@ -76,8 +76,8 @@ public: void SetBaseEntity( Event *ev ); void PlaceTurret( Event *ev ); void TurretBeginUsed( Sentient *pEnt ); - virtual void TurretEndUsed( void ); - virtual void TurretUsed( Sentient *pEnt ); + void TurretEndUsed( void ) override; + void TurretUsed( Sentient *pEnt ) override; void TurretUsed( Event *ev ); void EventKilled( Event *ev ); void EventDamage( Event *ev ); @@ -93,7 +93,7 @@ public: void UnLock( void ); bool UseRemoteControl( void ); Sentient *GetRemoteOwner( void ); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; inline void VehicleTurretGun::Archive diff --git a/code/game/viewthing.h b/code/game/viewthing.h index 49e6232a..29763439 100644 --- a/code/game/viewthing.h +++ b/code/game/viewthing.h @@ -44,7 +44,7 @@ class ViewMaster : public Listener void SetModelEvent( Event *ev ); void PassEvent( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void ViewMaster::Archive @@ -96,7 +96,7 @@ class Viewthing : public Animate void SaveSurfaces( Event *ev ); void SetAnim( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Viewthing::Archive diff --git a/code/game/weapon.h b/code/game/weapon.h index cb448486..08298c88 100644 --- a/code/game/weapon.h +++ b/code/game/weapon.h @@ -219,7 +219,7 @@ class Weapon : public Item qboolean CheckReload( firemode_t mode ); void DoneReloading( Event *ev ); void SetAimAnim( Event *ev ); - virtual void Shoot( Event *ev ); + virtual void Shoot( Event *ev ); void Secondary( Event *ev ); void SetFireType( Event *ev ); void SetAIRange( Event *ev ); @@ -270,8 +270,8 @@ class Weapon : public Item Weapon( const char *file ); ~Weapon(); - virtual void Delete( void ); - virtual Listener *GetScriptOwner( void ); + void Delete( void ) override; + Listener *GetScriptOwner( void ) override; int GetRank( void ); int GetOrder( void ); int GetWeaponClass( void ) const { return weapon_class; }; @@ -286,12 +286,12 @@ class Weapon : public Item void SetMinRange( float val ); qboolean IsSecondaryWeapon( void ); void ForceIdle( void ); - virtual qboolean SetWeaponAnim( const char *anim, Event *ev = NULL ); + virtual qboolean SetWeaponAnim( const char *anim, Event *ev = NULL ); qboolean SetWeaponAnim( const char *anim, Event& ev ); void SetWeaponAnimEvent( Event *ev ); void SetWeaponIdleAnim( void ); void SetWeaponIdleAnimEvent( Event *ev ); - virtual void StopWeaponAnim( void ); + virtual void StopWeaponAnim( void ); void SetAmmoRequired( Event *ev ); void SetDMAmmoRequired( Event *ev ); @@ -309,7 +309,7 @@ class Weapon : public Item void SetAmmoInClip( Event *ev ); void SetShareClip( Event *ev ); void SetModels( const char *world, const char *view ); - void SetOwner( Sentient *ent ); + void SetOwner( Sentient *ent ) override; void SetMaxChargeTime( Event *ev ); void SetMinChargeTime( Event *ev ); float GetMinChargeTime( firemode_t ); @@ -323,13 +323,13 @@ class Weapon : public Item qboolean ReadyToFire( firemode_t mode, qboolean playsound=qtrue ); qboolean MuzzleClear( void ); void PutAway( void ); - qboolean Drop( void ); + qboolean Drop( void ) override; void Fire( firemode_t mode ); void Charge( firemode_t mode ); void ReleaseFire( firemode_t mode, float chargetime ); void ClientFireDone( void ); - qboolean Removable( void ); - qboolean Pickupable( Entity *other ); + qboolean Removable( void ) override; + qboolean Pickupable( Entity *other ) override; void DetachFromOwner( void ); void AttachToOwner( weaponhand_t hand ); void WeaponSound( Event *ev ); @@ -375,7 +375,7 @@ class Weapon : public Item void WorldHitSpawn( firemode_t mode, Vector org, Vector angles, float life ); void MakeNoise( Event *ev ); void FallingAngleAdjust( Event *ev ); - void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Weapon::Archive diff --git a/code/game/weapturret.h b/code/game/weapturret.h index e7f0d8ea..3365109d 100644 --- a/code/game/weapturret.h +++ b/code/game/weapturret.h @@ -82,7 +82,7 @@ public: TurretGun(); virtual ~TurretGun(); - virtual void Think( void ); + void Think( void ) override; qboolean UserAim( usercmd_s *ucmd ); void PlaceTurret( Event *ev ); @@ -127,14 +127,14 @@ public: void CreateViewModel( void ); void DeleteViewModel( void ); - virtual qboolean SetWeaponAnim( const char *anim, Event *ev = NULL ); - virtual void StopWeaponAnim( void ); + qboolean SetWeaponAnim( const char *anim, Event *ev = NULL ) override; + void StopWeaponAnim( void ) override; virtual bool CanTarget( float *pos ); virtual float FireDelay( firemode_t mode ); - virtual void ShowInfo( float fDot, float fDist ); + void ShowInfo( float fDot, float fDist ) override; - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; }; #endif // __WEAPTURRET_H__ diff --git a/code/game/weaputils.h b/code/game/weaputils.h index 2978fc14..2e8d1b67 100644 --- a/code/game/weaputils.h +++ b/code/game/weaputils.h @@ -89,10 +89,10 @@ public: SafePtr m_pOwnerPtr; Projectile(); - virtual void Archive( Archiver &arc ); - virtual void Touch( Event *ev ); - virtual void Explode( Event *ev ); - virtual void DoDecal( void ); + void Archive( Archiver &arc ) override; + virtual void Touch( Event *ev ); + virtual void Explode( Event *ev ); + virtual void DoDecal( void ); void SetAvelocity( Event *ev ); void SetAddVelocity( Event *ev ); @@ -210,7 +210,7 @@ class Explosion : public Projectile void DamageAgain( Event *ev ); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; }; inline void Explosion::Archive diff --git a/code/game/windows.h b/code/game/windows.h index dae0d245..ce0f9e20 100644 --- a/code/game/windows.h +++ b/code/game/windows.h @@ -42,7 +42,7 @@ public: WindowObject(); - virtual void Archive( Archiver& arc ); + void Archive( Archiver& arc ) override; void WindowSetup( Event *ev ); void WindowDebrisType( Event *ev ); diff --git a/code/qcommon/class.cpp b/code/qcommon/class.cpp index 520756a6..c8387ac3 100644 --- a/code/qcommon/class.cpp +++ b/code/qcommon/class.cpp @@ -911,7 +911,24 @@ ClassDefHook::ClassDefHook() this->classdef = NULL; } -CLASS_DECLARATION( NULL, Class, NULL ) +ClassDef Class::ClassInfo("Class", NULL, NULL, (ResponseDef*)Class::Responses, Class::_newInstance, sizeof(Class)); + +void* Class::_newInstance(void) +{ + return new Class(); +} + +ClassDef* Class::classinfo(void) const +{ + return &(Class::ClassInfo); +} +ClassDef* Class::classinfostatic(void) +{ + return &(Class::ClassInfo); +} + + +ResponseDef Class::Responses[] = { { NULL, NULL } -}; +}; \ No newline at end of file diff --git a/code/qcommon/class.h b/code/qcommon/class.h index c3803049..3f9f76b9 100644 --- a/code/qcommon/class.h +++ b/code/qcommon/class.h @@ -91,7 +91,7 @@ class Event; static ClassDefHook _ClassInfo_; \ static void *_newInstance( void ); \ static ClassDef *classinfostatic(void); \ - virtual ClassDef *classinfo(void) const; \ + ClassDef *classinfo(void) const override; \ static void AddWaitTill( str s ); \ static void AddWaitTill( const_str s ); \ static void RemoveWaitTill( str s ); \ @@ -129,7 +129,7 @@ class Event; static ClassDefHook _ClassInfo_; \ static void *_newInstance( void ); \ static ClassDef *classinfostatic(void); \ - virtual ClassDef *classinfo(void) const; \ + ClassDef *classinfo(void) const override; \ static ResponseDef Responses[] #endif @@ -250,8 +250,6 @@ private: void ClearSafePointers(); public: - CLASS_PROTOTYPE( Class ); - #ifndef _DEBUG_MEM void * operator new( size_t ); void operator delete( void * ); @@ -262,6 +260,13 @@ public: virtual void Archive( Archiver& arc ); + static ClassDef ClassInfo; + static ClassDefHook _ClassInfo_; + static void *_newInstance( void ); + static ClassDef *classinfostatic(void); + virtual ClassDef *classinfo(void) const; + static ResponseDef Responses[]; + const char *getClassID( void ) const; const char *getClassname( void ) const; const char *getSuperclass( void ) const; diff --git a/code/qcommon/listener.cpp b/code/qcommon/listener.cpp index 72e2fe22..dc0668e8 100644 --- a/code/qcommon/listener.cpp +++ b/code/qcommon/listener.cpp @@ -747,11 +747,11 @@ void EV_Print( FILE *stream, const char *format, ... ) if( stream ) { - fprintf( stream, buffer ); + fprintf(stream, "%s", buffer); } else { - EVENT_DPrintf( buffer ); + EVENT_DPrintf(buffer); } va_end( va ); diff --git a/code/qcommon/listener.h b/code/qcommon/listener.h index a7c44901..44434492 100644 --- a/code/qcommon/listener.h +++ b/code/qcommon/listener.h @@ -481,7 +481,7 @@ public: Listener(); virtual ~Listener(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; void CancelEventsOfType( Event *ev ); void CancelEventsOfType( Event &ev ); diff --git a/code/script/scriptclass.h b/code/script/scriptclass.h index 6db93021..6f90ce59 100644 --- a/code/script/scriptclass.h +++ b/code/script/scriptclass.h @@ -54,15 +54,15 @@ public: ScriptClass(GameScript* gameScript, Listener* self); ScriptClass(); - virtual ~ScriptClass(); + ~ScriptClass(); - virtual void Archive(Archiver& arc); + void Archive(Archiver& arc) override; void ArchiveInternal(Archiver& arc); static void ArchiveScript(Archiver& arc, ScriptClass** obj); void ArchiveCodePos(Archiver& arc, unsigned char** codePos); - virtual ScriptThread* CreateThreadInternal(const ScriptVariable& label); - virtual ScriptThread* CreateScriptInternal(const ScriptVariable& label); + ScriptThread* CreateThreadInternal(const ScriptVariable& label) override; + ScriptThread* CreateScriptInternal(const ScriptVariable& label) override; void AddThread(ScriptVM* m_ScriptVM); void KillThreads(void); diff --git a/code/script/scriptvariable.cpp b/code/script/scriptvariable.cpp index bec3082b..f5c3f712 100644 --- a/code/script/scriptvariable.cpp +++ b/code/script/scriptvariable.cpp @@ -2389,11 +2389,6 @@ ScriptVariable ScriptVariable::operator--( int ) return *this; } -CLASS_DECLARATION( Class, ScriptVariable, NULL ) -{ - { NULL, NULL } -}; - #ifndef NO_SCRIPTENGINE ScriptVariableList::ScriptVariableList() diff --git a/code/script/scriptvariable.h b/code/script/scriptvariable.h index 9c8e8047..87759e34 100644 --- a/code/script/scriptvariable.h +++ b/code/script/scriptvariable.h @@ -142,8 +142,6 @@ private: void ClearPointerInternal(); public: - CLASS_PROTOTYPE( ScriptVariable ); - ScriptVariable(); ScriptVariable( const ScriptVariable& variable ); @@ -284,7 +282,7 @@ public: ScriptVariableList(); - virtual void Archive( Archiver &arc ); + void Archive( Archiver &arc ) override; void ClearList( void );