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
+45
View File
@@ -0,0 +1,45 @@
#ifndef __HH_PHYSICS_AI
#define __HH_PHYSICS_AI
class hhPhysics_AI : public idPhysics_Monster {
CLASS_PROTOTYPE( hhPhysics_AI );
public:
hhPhysics_AI();
bool Evaluate( int timeStepMSec, int endTimeMSec );
const idVec3& GetLinearVelocity( int id = 0 ) const;
virtual void SetLinearVelocity( const idVec3 &newLinearVelocity, int id = 0 );
void AddForce( const int id, const idVec3 &point, const idVec3 &force );
void ApplyImpulse( const int id, const idVec3 &point, const idVec3 &impulse );
idVec3 GetLocalOrigin( void ) { return current.localOrigin; }
idEntity* GetLastMoveTouch(void) {return lastMoveTouch.GetEntity();}
void EnableGravity(bool tf = true) {useGravity = tf;}
bool IsGravityEnabled(void) const {return useGravity;}
void SetMaster( idEntity *master, const bool orientated );
void SetGravity( const idVec3 &newGravity );
void SetGravClipModelAxis( bool enable ) { bGravClipModelAxis = enable; }
void Save( idSaveGame *savefile ) const;
void Restore( idRestoreGame *savefile );
protected:
idVec3 ApplyFriction( const idVec3& vel, const float deltaTime );
virtual monsterMoveResult_t FlyMove( idVec3 &start, idVec3 &velocity, const idVec3 &delta );
virtual monsterMoveResult_t SlideMove( idVec3 &start, idVec3 &velocity, const idVec3 &delta, idList<int> *touched = NULL );
// HUMANHEAD nla - Constants
public:
static const int NO_FLY_DIRECTION;
idMat3 localAxis;
protected:
int flyStepDirection; // Direction we were last stepping in
idEntityPtr<idEntity> lastMoveTouch; // Entity we touched on last slidemove
bool useGravity;
bool bGravClipModelAxis; // Set clipmodel axis for gravity changes
};
#endif