summaryrefslogtreecommitdiff
path: root/public/vphysics/player_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'public/vphysics/player_controller.h')
-rw-r--r--public/vphysics/player_controller.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/public/vphysics/player_controller.h b/public/vphysics/player_controller.h
new file mode 100644
index 0000000..6fbe1b0
--- /dev/null
+++ b/public/vphysics/player_controller.h
@@ -0,0 +1,47 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef PLAYER_CONTROLLER_H
+#define PLAYER_CONTROLLER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+class IPhysicsPlayerControllerEvent
+{
+public:
+ virtual int ShouldMoveTo( IPhysicsObject *pObject, const Vector &position ) = 0;
+};
+
+class IPhysicsPlayerController
+{
+public:
+ virtual ~IPhysicsPlayerController( void ) {}
+
+ virtual void Update( const Vector &position, const Vector &velocity, float secondsToArrival, bool onground, IPhysicsObject *ground ) = 0;
+ virtual void SetEventHandler( IPhysicsPlayerControllerEvent *handler ) = 0;
+ virtual bool IsInContact( void ) = 0;
+ virtual void MaxSpeed( const Vector &maxVelocity ) = 0;
+
+ // allows game code to change collision models
+ virtual void SetObject( IPhysicsObject *pObject ) = 0;
+ // UNDONE: Refactor this and shadow controllers into a single class/interface through IPhysicsObject
+ virtual int GetShadowPosition( Vector *position, QAngle *angles ) = 0;
+ virtual void StepUp( float height ) = 0;
+ virtual void Jump() = 0;
+ virtual void GetShadowVelocity( Vector *velocity ) = 0;
+ virtual IPhysicsObject *GetObject() = 0;
+ virtual void GetLastImpulse( Vector *pOut ) = 0;
+
+ virtual void SetPushMassLimit( float maxPushMass ) = 0;
+ virtual void SetPushSpeedLimit( float maxPushSpeed ) = 0;
+
+ virtual float GetPushMassLimit() = 0;
+ virtual float GetPushSpeedLimit() = 0;
+ virtual bool WasFrozen() = 0;
+};
+
+#endif // PLAYER_CONTROLLER_H