Initial Prey Game integration support.

This commit is contained in:
Justin Marshall
2026-05-05 15:01:01 -07:00
parent a6c6f1ed26
commit 8d5f678b25
552 changed files with 265551 additions and 209 deletions
+49
View File
@@ -0,0 +1,49 @@
// Copyright (C) 2004 Id Software, Inc.
//
#ifndef __FORCE_DRAG_H__
#define __FORCE_DRAG_H__
/*
===============================================================================
Drag force
===============================================================================
*/
class idForce_Drag : public idForce {
public:
CLASS_PROTOTYPE( idForce_Drag );
idForce_Drag( void );
virtual ~idForce_Drag( void );
// initialize the drag force
void Init( float damping );
// set physics object being dragged
void SetPhysics( idPhysics *physics, int id, const idVec3 &p );
// set position to drag towards
void SetDragPosition( const idVec3 &pos );
// get the position dragged towards
const idVec3 & GetDragPosition( void ) const;
// get the position on the dragged physics object
const idVec3 GetDraggedPosition( void ) const;
public: // common force interface
virtual void Evaluate( int time );
virtual void RemovePhysics( const idPhysics *phys );
private:
// properties
float damping;
// positioning
idPhysics * physics; // physics object
int id; // clip model id of physics object
idVec3 p; // position on clip model
idVec3 dragPosition; // drag towards this position
};
#endif /* !__FORCE_DRAG_H__ */