From caac73bec9eda0a475f082e2e44f9ca6aeffdc1d Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Tue, 30 Jul 2024 20:20:07 -0700 Subject: [PATCH] NSProjectile: don't spawn debris on monsters. NSIO: change EntWarning to EntLog for unknown spawn data keys. --- src/shared/NSClientSpectator.h | 20 +++--- src/shared/NSDebris.h | 18 +++++- src/shared/NSDecal.h | 8 ++- src/shared/NSEntity.h | 72 +++++++++++----------- src/shared/NSEntity.qc | 4 +- src/shared/NSIO.h | 30 +++++---- src/shared/NSIO.qc | 2 +- src/shared/NSPhysicsConstraint.h | 1 - src/shared/NSPhysicsEntity.h | 48 +++++++-------- src/shared/NSProjectile.h | 102 +++++++++++++++---------------- src/shared/NSProjectile.qc | 14 ++--- src/shared/NSRenderableEntity.h | 72 +++++++++++----------- src/shared/NSSound.h | 29 +++++++-- src/shared/NSSoundScape.h | 15 +++++ src/shared/NSSpraylogo.h | 12 ++-- src/shared/NSTimer.h | 16 ++--- src/shared/NSVehicle.h | 38 ++++++------ 17 files changed, 273 insertions(+), 228 deletions(-) diff --git a/src/shared/NSClientSpectator.h b/src/shared/NSClientSpectator.h index e2acf68e..aab0365c 100644 --- a/src/shared/NSClientSpectator.h +++ b/src/shared/NSClientSpectator.h @@ -67,17 +67,6 @@ of type NSClientSpectator. class NSClientSpectator:NSClient { -private: - PREDICTED_FLOAT(spec_ent) - PREDICTED_FLOAT(spec_flags) - NSClientSpectatorMode_t spec_mode; NSClientSpectatorMode_t spec_mode_net; - float m_flDeathCam; - float m_flLastSpecTargetChange; - - vector spec_org; - - int sequence; - public: void NSClientSpectator(void); @@ -120,6 +109,15 @@ public: nonvirtual void SpectatorDeathcam(NSRenderableEntity, NSEntity, float); #endif + +private: + PREDICTED_FLOAT(spec_ent) + PREDICTED_FLOAT(spec_flags) + NSClientSpectatorMode_t spec_mode; NSClientSpectatorMode_t spec_mode_net; + float m_flDeathCam; + float m_flLastSpecTargetChange; + vector spec_org; + int sequence; }; #ifdef CLIENT diff --git a/src/shared/NSDebris.h b/src/shared/NSDebris.h index 502fa633..f84c3b77 100644 --- a/src/shared/NSDebris.h +++ b/src/shared/NSDebris.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-2024 Vera Visions LLC. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER + * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ + #ifdef CLIENT class NSDebris:NSPhysicsEntity @@ -11,4 +27,4 @@ public: private: string m_strImpactDecal; }; -#endif \ No newline at end of file +#endif diff --git a/src/shared/NSDecal.h b/src/shared/NSDecal.h index bec97be5..41a5ff84 100644 --- a/src/shared/NSDecal.h +++ b/src/shared/NSDecal.h @@ -24,9 +24,7 @@ class NSDecal { - string m_strShader; - string m_strTexture; - +public: void NSDecal(void); #ifdef SERVER @@ -39,6 +37,10 @@ NSDecal /** Paint the given decal at the specified position. */ virtual void Place(vector, string); + +private: + string m_strShader; + string m_strTexture; }; typedef struct diff --git a/src/shared/NSEntity.h b/src/shared/NSEntity.h index 02c7c7b1..40a05c96 100644 --- a/src/shared/NSEntity.h +++ b/src/shared/NSEntity.h @@ -52,42 +52,6 @@ what you are doing. Otherwise, you will deal with loss of savegames and much mor */ class NSEntity:NSTrigger { -private: - float m_flSpawnTime; - bool m_bHidden; /**< decides whether the entity is visible or not, without affecting collision */ - vector m_vecMins; /**< REAL min bounding box value, without .scale affecting it */ - vector m_vecMaxs; /**< REAL max bounding box value, without .scale affecting it */ - - bool m_bIsBrush; - vector m_vecEditorColor; - - PREDICTED_FLOAT(entityDefID) - PREDICTED_VECTOR_N(origin) - PREDICTED_VECTOR_N(angles) - PREDICTED_FLOAT_N(modelindex) - PREDICTED_VECTOR_N(size) - PREDICTED_VECTOR_N(mins) - PREDICTED_VECTOR_N(maxs) - PREDICTED_FLOAT_N(solid) - PREDICTED_FLOAT_N(movetype) - PREDICTED_FLOAT_N(scale) - PREDICTED_FLOAT_N(flags) - PREDICTED_FLOAT_N(vv_flags) - PREDICTED_VECTOR_N(velocity) - PREDICTED_VECTOR_N(avelocity) - -#ifdef SERVER - string m_parent; - string m_parent_old; - string m_parent_attachment; - PREDICTED_FLOAT_N(frame) - PREDICTED_FLOAT_N(skin) - PREDICTED_FLOAT_N(effects) -#endif - - /** Will read from the named def to perform a projectile attack. */ - nonvirtual bool _ProjectileAttack(string, bool); - public: /** The constructor. Not much may be known of what the entity will be just yet. */ @@ -424,6 +388,42 @@ public: /** Sets the @ref bot_info tag on this entity to the desired botInfo_t tag. */ nonvirtual void SetBotTag(botInfo_t); + +private: + float m_flSpawnTime; + bool m_bHidden; /**< decides whether the entity is visible or not, without affecting collision */ + vector m_vecMins; /**< REAL min bounding box value, without .scale affecting it */ + vector m_vecMaxs; /**< REAL max bounding box value, without .scale affecting it */ + + bool m_bIsBrush; + vector m_vecEditorColor; + + PREDICTED_FLOAT(entityDefID) + PREDICTED_VECTOR_N(origin) + PREDICTED_VECTOR_N(angles) + PREDICTED_FLOAT_N(modelindex) + PREDICTED_VECTOR_N(size) + PREDICTED_VECTOR_N(mins) + PREDICTED_VECTOR_N(maxs) + PREDICTED_FLOAT_N(solid) + PREDICTED_FLOAT_N(movetype) + PREDICTED_FLOAT_N(scale) + PREDICTED_FLOAT_N(flags) + PREDICTED_FLOAT_N(vv_flags) + PREDICTED_VECTOR_N(velocity) + PREDICTED_VECTOR_N(avelocity) + +#ifdef SERVER + string m_parent; + string m_parent_old; + string m_parent_attachment; + PREDICTED_FLOAT_N(frame) + PREDICTED_FLOAT_N(skin) + PREDICTED_FLOAT_N(effects) +#endif + + /** Will read from the named def to perform a projectile attack. */ + nonvirtual bool _ProjectileAttack(string, bool); }; /** Returns a new entity. Guaranteed to be something. Never __NULL__ diff --git a/src/shared/NSEntity.qc b/src/shared/NSEntity.qc index 37970eaf..e9b012cf 100644 --- a/src/shared/NSEntity.qc +++ b/src/shared/NSEntity.qc @@ -120,12 +120,12 @@ NSEntity::Visible(entity ent) traceline(origin, ent.origin, MOVE_NORMAL, this); if (trace_fraction == 1.0f || trace_ent == ent) { - print(sprintf("%s can see %s\n", classname, ent.classname)); + /*print(sprintf("%s can see %s\n", classname, ent.classname));*/ return (true); } } - print(sprintf("%s can not see %s\n", classname, ent.classname)); + /*print(sprintf("%s can not see %s\n", classname, ent.classname));*/ return (false); } diff --git a/src/shared/NSIO.h b/src/shared/NSIO.h index 899ca9f3..5577d3df 100644 --- a/src/shared/NSIO.h +++ b/src/shared/NSIO.h @@ -25,24 +25,9 @@ Use NSEntity as a basis for your classes. */ class NSIO { - -private: +public: void NSIO(void); - string m_strSpawnData; - -#ifdef SERVER - string m_strOnTrigger; - string m_strOnUser1; - string m_strOnUser2; - string m_strOnUser3; - string m_strOnUser4; - - /* entityDef powered modelevent callbacks */ - string m_strModelEventCB; -#endif - -public: /** Called when the entity is fulled initialized. Any spawn key/value info pairs have already been dealt with. So now we can make full decisions on the entity. @@ -194,6 +179,19 @@ public: nonvirtual void DebugBool(string,bool); /** Debug print for a given entity. */ nonvirtual void DebugEntity(string,entity); + +private: + string m_strSpawnData; +#ifdef SERVER + string m_strOnTrigger; + string m_strOnUser1; + string m_strOnUser2; + string m_strOnUser3; + string m_strOnUser4; + + /* entityDef powered modelevent callbacks */ + string m_strModelEventCB; +#endif }; .bool _mapspawned; diff --git a/src/shared/NSIO.qc b/src/shared/NSIO.qc index fb74a4eb..e6d3a761 100644 --- a/src/shared/NSIO.qc +++ b/src/shared/NSIO.qc @@ -874,7 +874,7 @@ NSIO::SpawnKey(string strKey, string strValue) #endif default: #ifdef SERVER - EntWarning("%s has unknown key %S with value %S", + EntLog("%s has unknown key %S with value %S", classname, strKey, strValue); #endif break; diff --git a/src/shared/NSPhysicsConstraint.h b/src/shared/NSPhysicsConstraint.h index 0d9723c7..05caf478 100644 --- a/src/shared/NSPhysicsConstraint.h +++ b/src/shared/NSPhysicsConstraint.h @@ -37,7 +37,6 @@ NSPhysicsConstraint:NSEntity public: void NSPhysicsConstraint(void); - virtual void SpawnKey(string, string); #ifdef SERVER diff --git a/src/shared/NSPhysicsEntity.h b/src/shared/NSPhysicsEntity.h index 2ede4ba9..60524a90 100644 --- a/src/shared/NSPhysicsEntity.h +++ b/src/shared/NSPhysicsEntity.h @@ -87,30 +87,6 @@ You will find the API to be mostly compatible of that offered by Garry's Mod. */ class NSPhysicsEntity:NSSurfacePropEntity { -private: - int m_iEnabled; - int m_iShape; - int m_iMaterial; - int m_iFlags; - float m_flInertiaScale; - float m_flBuoyancyRatio; - bool m_bInvincible; - float m_flVolume; - - /* performance sanity checks */ - vector m_vecPrevOrigin; - vector m_vecPrevAngles; - float m_flCheckTime; - PREDICTED_FLOAT(m_flMass) - - virtual void _TouchThink(void); - -#ifdef SERVER - PREDICTED_VECTOR(m_vecNetAngles) - - string m_strOnDamaged; -#endif - public: void NSPhysicsEntity(void); @@ -216,6 +192,30 @@ public: nonvirtual void Wake(void); /** Call to freeze physics simulation on this entity. */ nonvirtual void Sleep(void); + +private: + int m_iEnabled; + int m_iShape; + int m_iMaterial; + int m_iFlags; + float m_flInertiaScale; + float m_flBuoyancyRatio; + bool m_bInvincible; + float m_flVolume; + + /* performance sanity checks */ + vector m_vecPrevOrigin; + vector m_vecPrevAngles; + float m_flCheckTime; + PREDICTED_FLOAT(m_flMass) + + virtual void _TouchThink(void); + +#ifdef SERVER + PREDICTED_VECTOR(m_vecNetAngles) + + string m_strOnDamaged; +#endif }; noref .bool isPhysics; \ No newline at end of file diff --git a/src/shared/NSProjectile.h b/src/shared/NSProjectile.h index ba4b9eb1..948de82e 100644 --- a/src/shared/NSProjectile.h +++ b/src/shared/NSProjectile.h @@ -46,6 +46,57 @@ Objects such as rockets, grenades, bolts etc. should ideally be this. */ class NSProjectile:NSSurfacePropEntity { +public: + void NSProjectile(void); + +#ifdef CLIENT + virtual void ReceiveEntity(float, float); + virtual float predraw(void); +#endif + +#ifdef SERVER + /** Sets the function that'll be called upon impact of the projectile onto a surface. */ + nonvirtual void SetImpact(void(entity, entity)); + /** When called, will animated between two frame positions at a specified framerate on loop. */ + nonvirtual void Animate(int, int, float); + /** When called, will animated between two frame positions at a specified framerate and remove itself when it has finished playing the sequence. */ + nonvirtual void AnimateOnce(int, int, float); + + /** Called upon the projectile touching another object. */ + virtual void Touch(entity); + virtual void Spawned(void); + virtual void Pain(entity, entity, int, vector, int); + virtual void Death(entity, entity, int, vector, int); + + virtual void SpawnKey(string, string); + virtual void EvaluateEntity(void); + virtual float SendEntity(entity, float); + virtual void Save(float); + virtual void Restore(string, string); + + virtual void Trigger(entity, triggermode_t); + + nonvirtual void _FuseEnded(void); + nonvirtual void _Explode(entity); + + virtual void _LaunchHitscan(vector, vector, float); + + /* launch the projectile into the world */ + virtual void Launch(vector, vector, float, float, float); + + nonvirtual void SetLightColor(vector); + nonvirtual void SetLightRadius(float); + + nonvirtual void EnableDetonateOnFuse(bool); + nonvirtual void EnableDetonateOnDeath(bool); + nonvirtual void EnableDetonateOnWorld(bool); + nonvirtual void EnableDetonateOnActor(bool); + nonvirtual void EnableStickToWorld(bool); + nonvirtual void EnableStickToActor(bool); + nonvirtual void EnableThrustHoming(bool); + nonvirtual void EnableInheritVelocity(bool); +#endif + private: NETWORKED_FLOAT_N(traileffectnum) NETWORKED_VECTOR(m_vecLightColor) @@ -132,57 +183,6 @@ private: virtual void OnRemoveEntity(void); #endif - -public: - void NSProjectile(void); - -#ifdef CLIENT - virtual void ReceiveEntity(float, float); - virtual float predraw(void); -#endif - -#ifdef SERVER - /** Sets the function that'll be called upon impact of the projectile onto a surface. */ - nonvirtual void SetImpact(void(entity, entity)); - /** When called, will animated between two frame positions at a specified framerate on loop. */ - nonvirtual void Animate(int, int, float); - /** When called, will animated between two frame positions at a specified framerate and remove itself when it has finished playing the sequence. */ - nonvirtual void AnimateOnce(int, int, float); - - /** Called upon the projectile touching another object. */ - virtual void Touch(entity); - virtual void Spawned(void); - virtual void Pain(entity, entity, int, vector, int); - virtual void Death(entity, entity, int, vector, int); - - virtual void SpawnKey(string, string); - virtual void EvaluateEntity(void); - virtual float SendEntity(entity, float); - virtual void Save(float); - virtual void Restore(string, string); - - virtual void Trigger(entity, triggermode_t); - - nonvirtual void _FuseEnded(void); - nonvirtual void _Explode(void); - - virtual void _LaunchHitscan(vector, vector, float); - - /* launch the projectile into the world */ - virtual void Launch(vector, vector, float, float, float); - - nonvirtual void SetLightColor(vector); - nonvirtual void SetLightRadius(float); - - nonvirtual void EnableDetonateOnFuse(bool); - nonvirtual void EnableDetonateOnDeath(bool); - nonvirtual void EnableDetonateOnWorld(bool); - nonvirtual void EnableDetonateOnActor(bool); - nonvirtual void EnableStickToWorld(bool); - nonvirtual void EnableStickToActor(bool); - nonvirtual void EnableThrustHoming(bool); - nonvirtual void EnableInheritVelocity(bool); -#endif }; #ifdef SERVER diff --git a/src/shared/NSProjectile.qc b/src/shared/NSProjectile.qc index 0a95b1c2..1b5be610 100644 --- a/src/shared/NSProjectile.qc +++ b/src/shared/NSProjectile.qc @@ -486,7 +486,7 @@ NSProjectile::Restore(string strKey, string strValue) void NSProjectile::Trigger(entity theActivator, triggermode_t theMode) { - _Explode(); + _Explode(this); } void @@ -514,13 +514,13 @@ NSProjectile::Touch(entity eToucher) if (m_bDetonateOnWorld) { if (eToucher == world || eToucher.takedamage == DAMAGE_NO) { - _Explode(); + _Explode(eToucher); return; } } if (m_bDetonateOnActor) { if (eToucher.takedamage != DAMAGE_NO) { - _Explode(); + _Explode(eToucher); return; } } @@ -547,7 +547,7 @@ void NSProjectile::Death(entity inflictor, entity attacker, int damage, vector dir, int location) { if (m_bDetonateOnDeath) { - _Explode(); + _Explode(this); return; } @@ -674,7 +674,7 @@ void NSProjectile::_FuseEnded(void) { if (m_bDetonateOnFuse) { - _Explode(); + _Explode(this); return; } @@ -687,7 +687,7 @@ NSProjectile::_FuseEnded(void) } void -NSProjectile::_Explode(void) +NSProjectile::_Explode(entity explodedOn) { vector newAngles, aimFwd, aimRgt, aimUp; vector debrisPos; @@ -733,7 +733,7 @@ NSProjectile::_Explode(void) } /* another def that'll be spawned when this one detonates */ - if (m_defProjectileDebris) { + if (m_defProjectileDebris && !explodedOn && explodedOn != this) { float movementAmount = 360.0f / (float)m_iDebrisCount; for (int i = 0; i < m_iDebrisCount; i++) { diff --git a/src/shared/NSRenderableEntity.h b/src/shared/NSRenderableEntity.h index 7ad07de5..6a61a7eb 100644 --- a/src/shared/NSRenderableEntity.h +++ b/src/shared/NSRenderableEntity.h @@ -92,39 +92,6 @@ and bone control settings. */ class NSRenderableEntity:NSEntity { -private: - /* new */ - PREDICTED_FLOAT(m_flBoneControl1) - PREDICTED_FLOAT(m_flBoneControl2) - PREDICTED_FLOAT(m_flBoneControl3) - PREDICTED_FLOAT(m_flBoneControl4) - PREDICTED_FLOAT(m_flBoneControl5) - PREDICTED_FLOAT_N(modelflags) - PREDICTED_INT(m_iBody) - PREDICTED_FLOAT_N(colormap) - PREDICTED_VECTOR_N(glowmod) - PREDICTED_FLOAT_N(frame1time) - - PREDICTED_FLOAT(m_iRenderFX) - PREDICTED_FLOAT(m_iRenderMode) - PREDICTED_FLOAT(m_flRenderAmt) - PREDICTED_VECTOR(m_vecRenderColor) - PREDICTED_VECTOR(m_vecAxialScale) - - /* either a sprite model or a particle */ - PREDICTED_INT(m_iMuzzleModel) - PREDICTED_INT(m_iMuzzlePart) - PREDICTED_FLOAT(m_flMuzzleScale) - - /* model events */ - float m_flBaseTime; - -#ifdef CLIENT - float m_iNumBones; - nonvirtual void _UpdateGeomset(); - nonvirtual void _UpdateBoneCount(); -#endif - public: void NSRenderableEntity(void); @@ -204,10 +171,43 @@ public: /** Returns the axial/anisotropic scale of the entity, same as input format (forward, right, up) */ nonvirtual vector GetAxialScale(void); - #ifdef CLIENT +#ifdef CLIENT /** Called by predraw(); and will set the appropriate rendering specific fields. */ nonvirtual void RenderFXPass(void); nonvirtual void RenderAxialScale(void); nonvirtual void RenderGLQuakeShadow(void); - #endif -}; \ No newline at end of file +#endif + +private: + /* new */ + PREDICTED_FLOAT(m_flBoneControl1) + PREDICTED_FLOAT(m_flBoneControl2) + PREDICTED_FLOAT(m_flBoneControl3) + PREDICTED_FLOAT(m_flBoneControl4) + PREDICTED_FLOAT(m_flBoneControl5) + PREDICTED_FLOAT_N(modelflags) + PREDICTED_INT(m_iBody) + PREDICTED_FLOAT_N(colormap) + PREDICTED_VECTOR_N(glowmod) + PREDICTED_FLOAT_N(frame1time) + + PREDICTED_FLOAT(m_iRenderFX) + PREDICTED_FLOAT(m_iRenderMode) + PREDICTED_FLOAT(m_flRenderAmt) + PREDICTED_VECTOR(m_vecRenderColor) + PREDICTED_VECTOR(m_vecAxialScale) + + /* either a sprite model or a particle */ + PREDICTED_INT(m_iMuzzleModel) + PREDICTED_INT(m_iMuzzlePart) + PREDICTED_FLOAT(m_flMuzzleScale) + + /* model events */ + float m_flBaseTime; + +#ifdef CLIENT + float m_iNumBones; + nonvirtual void _UpdateGeomset(); + nonvirtual void _UpdateBoneCount(); +#endif +}; diff --git a/src/shared/NSSound.h b/src/shared/NSSound.h index 7388deca..2937c13e 100644 --- a/src/shared/NSSound.h +++ b/src/shared/NSSound.h @@ -1,11 +1,21 @@ +/* + * Copyright (c) 2024 Vera Visions LLC. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER + * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ class NSSound:NSPointTrigger { - float m_radius; - float m_volume; - string m_sample; - bool m_omniDirectional; - float m_offset; - +public: void NSSound( void ); nonvirtual void SetSample( string ); @@ -17,6 +27,13 @@ class NSSound:NSPointTrigger { nonvirtual void EnableReverb( void ); nonvirtual void DisableReverb( void ); nonvirtual virtual void Play( void ); + +private: + float m_radius; + float m_volume; + string m_sample; + bool m_omniDirectional; + float m_offset; }; void NSSound::NSSound( void ) { diff --git a/src/shared/NSSoundScape.h b/src/shared/NSSoundScape.h index ca8e00b8..2fe4e6f7 100644 --- a/src/shared/NSSoundScape.h +++ b/src/shared/NSSoundScape.h @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Vera Visions LLC. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER + * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ enumflags { diff --git a/src/shared/NSSpraylogo.h b/src/shared/NSSpraylogo.h index 6ed2b049..4a5d5356 100644 --- a/src/shared/NSSpraylogo.h +++ b/src/shared/NSSpraylogo.h @@ -21,6 +21,12 @@ */ class NSSpraylogo:NSEntity { +public: + void NSSpraylogo(void); + + virtual float predraw(void); + virtual void RendererRestarted(void); + private: vector m_vecColor; vector m_vecPosition; @@ -30,12 +36,6 @@ private: string m_m_strPath; bool m_bInitialized; bool m_bMonochrome; - -public: - void NSSpraylogo(void); - - virtual float predraw(void); - virtual void RendererRestarted(void); }; void Spray_Parse(void); diff --git a/src/shared/NSTimer.h b/src/shared/NSTimer.h index 2dd1a198..8cb5ff46 100644 --- a/src/shared/NSTimer.h +++ b/src/shared/NSTimer.h @@ -24,14 +24,6 @@ It has the ability to clean itself up afterwards, too. class NSTimer:NSEntity { -private: - entity m_eReceiver; - float m_flTime; - bool m_bRepeats; - - virtual void _TimerThink(void); - virtual void _TempTimerThink(void); - public: void NSTimer(void); @@ -56,4 +48,12 @@ public: virtual void Save(float); virtual void Restore(string, string); #endif + +private: + entity m_eReceiver; + float m_flTime; + bool m_bRepeats; + + virtual void _TimerThink(void); + virtual void _TempTimerThink(void); }; diff --git a/src/shared/NSVehicle.h b/src/shared/NSVehicle.h index 8ab26cd1..ce7212f3 100644 --- a/src/shared/NSVehicle.h +++ b/src/shared/NSVehicle.h @@ -31,25 +31,6 @@ _NSVehicle_Log(string className, string functionName, float edictNum, string war */ class NSVehicle:NSSurfacePropEntity { -private: - int m_iVehicleFlags; - int m_iMoveButtons; - vector m_vecMoveValues; - NSEntity m_eDriver; - NSEntity m_eDriver_net; - NSEntity m_eDriverLast; - vector m_vecPlayerPos; - vector m_vecExitPos; - - /* FIXME: Aren't those already defined in parent classes? */ - PREDICTED_VECTOR_N(angles) - PREDICTED_VECTOR_N(origin) - PREDICTED_VECTOR_N(velocity) - -#ifdef CLIENT - PREDICTED_FLOAT(driver_entnum) -#endif - public: void NSVehicle(void); @@ -84,6 +65,25 @@ public: virtual bool CanDriverCrouch(void); virtual bool PreventPlayerMovement(void); virtual bool PreventPlayerFire(void); + +private: + int m_iVehicleFlags; + int m_iMoveButtons; + vector m_vecMoveValues; + NSEntity m_eDriver; + NSEntity m_eDriver_net; + NSEntity m_eDriverLast; + vector m_vecPlayerPos; + vector m_vecExitPos; + + /* FIXME: Aren't those already defined in parent classes? */ + PREDICTED_VECTOR_N(angles) + PREDICTED_VECTOR_N(origin) + PREDICTED_VECTOR_N(velocity) + +#ifdef CLIENT + PREDICTED_FLOAT(driver_entnum) +#endif }; enumflags