Skip to content

Commit

Permalink
xrGame: inherited typedef usage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Jul 1, 2018
1 parent a826f66 commit dcb8fe8
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 19 deletions.
21 changes: 13 additions & 8 deletions src/xrGame/ActorEffector.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class CActor;

class CActorCameraManager : public CCameraManager
{
typedef CCameraManager inherited;

SCamEffectorInfo m_cam_info_hud;

protected:
using inherited = CCameraManager;

virtual void UpdateCamEffectors();
virtual bool ProcessCameraEffector(CEffectorCam* eff);

Expand Down Expand Up @@ -51,10 +51,11 @@ class CEffectorController

class CAnimatorCamEffector : public CEffectorCam
{
typedef CEffectorCam inherited;
bool m_bCyclic;

protected:
using inherited = CEffectorCam;

virtual bool Cyclic() const { return m_bCyclic; }
CObjectAnimator* m_objectAnimator;

Expand All @@ -74,10 +75,11 @@ class CAnimatorCamEffector : public CEffectorCam

class CAnimatorCamEffectorScriptCB : public CAnimatorCamEffector
{
typedef CAnimatorCamEffector inherited;

shared_str cb_name;

protected:
using inherited = CAnimatorCamEffector;

public:
CAnimatorCamEffectorScriptCB(LPCSTR _cb) { cb_name = _cb; };
virtual BOOL Valid();
Expand All @@ -88,7 +90,7 @@ class CAnimatorCamEffectorScriptCB : public CAnimatorCamEffector
class CAnimatorCamLerpEffector : public CAnimatorCamEffector
{
protected:
typedef CAnimatorCamEffector inherited;
using inherited = CAnimatorCamEffector;
GET_KOEFF_FUNC m_func;

public:
Expand Down Expand Up @@ -123,7 +125,8 @@ class CCameraEffectorControlled : public CAnimatorCamLerpEffector

class SndShockEffector : public CEffectorController
{
typedef CEffectorController inherited;
protected:
using inherited = CEffectorController;

public:
float m_snd_length; // ms
Expand All @@ -147,8 +150,10 @@ class SndShockEffector : public CEffectorController
//////////////////////////////////////////////////////////////////////////
class CControllerPsyHitCamEffector : public CEffectorCam
{
typedef CEffectorCam inherited;
protected:
using inherited = CEffectorCam;

private:
float m_time_total;
float m_time_current;
Fvector m_dangle_target;
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CustomMonster.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CCustomMonster : public CEntityAlive,
public Feel::Sound,
public Feel::Touch
{
private:
protected:
typedef CEntityAlive inherited;

private:
Expand Down
5 changes: 4 additions & 1 deletion src/xrGame/DestroyablePhysicsObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ class CDestroyablePhysicsObject : public CPhysicObject,
public CHitImmunity,
public CDamageManager
{
typedef CPhysicObject inherited;
protected:
using inherited = CPhysicObject;

private:
float m_fHealth;
ref_sound m_destroy_sound;
shared_str m_destroy_particles;
Expand Down
5 changes: 4 additions & 1 deletion src/xrGame/PhysicObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ struct net_updatePhData

class CPhysicObject : public CPhysicsShellHolder, public CPHSkeleton
{
typedef CPhysicsShellHolder inherited;
protected:
using inherited = CPhysicsShellHolder;

private:
EPOType m_type;
float m_mass;
ICollisionHitCallback* m_collision_hit_callback;
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/agent_manager_planner.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class IGameObject;

class CAgentManagerPlanner : public CActionPlanner<CAgentManager>
{
private:
typedef CActionPlanner<CAgentManager> inherited;
protected:
using inherited = CActionPlanner<CAgentManager>;

public:
virtual void setup(CAgentManager* object);
Expand Down
4 changes: 3 additions & 1 deletion src/xrGame/ai/monsters/basemonster/base_monster.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class anti_aim_ability;

class CBaseMonster : public CCustomMonster, public CStepManager
{
typedef CCustomMonster inherited;
protected:
using inherited = CCustomMonster;

public:
CBaseMonster();
Expand All @@ -72,6 +73,7 @@ class CBaseMonster : public CCustomMonster, public CStepManager
virtual CScriptEntity* cast_script_entity() { return this; }
virtual CBaseMonster* cast_base_monster() { return this; }
virtual CGameObject* cast_game_object() { return this; }

public:
virtual BOOL renderable_ShadowReceive() { return TRUE; }
virtual void Die(IGameObject* who);
Expand Down
3 changes: 2 additions & 1 deletion src/xrGame/ai/monsters/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class CState
template <typename _Object>
class CStateMove : public CState<_Object>
{
typedef CState<_Object> inherited;
protected:
using inherited = CState<_Object>;

public:
CStateMove(_Object* obj, void* data = 0) : inherited(obj, data) {}
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/ai/stalker/ai_stalker.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class CRestrictedObject;

class CAI_Stalker : public CCustomMonster, public CObjectHandler, public CAI_PhraseDialogManager, public CStepManager
{
private:
typedef CCustomMonster inherited;
protected:
using inherited = CCustomMonster;

public:
using inherited::useful;
Expand Down
3 changes: 2 additions & 1 deletion src/xrGame/ai/trader/ai_trader.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class CTraderAnimation;

class CAI_Trader : public CEntityAlive, public CInventoryOwner, public CScriptEntity, public CAI_PhraseDialogManager
{
typedef CEntityAlive inherited;
protected:
using inherited = CEntityAlive;

private:
bool m_busy_now;
Expand Down
5 changes: 4 additions & 1 deletion src/xrGame/entity_alive.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class CVisualMemoryManager;
class CBlend;
class CEntityAlive : public CEntity
{
typedef CEntity inherited;
protected:
using inherited = CEntity;

private:
u32 m_used_time;

public:
Expand Down

0 comments on commit dcb8fe8

Please sign in to comment.