29 #include "../../idlib/precompiled.h"
32 #include "../Game_local.h"
56 self->SetPhysics(
NULL );
94 savefile->
ReadObject( reinterpret_cast<idClass *&>(
self ) );
250 memset( info, 0,
sizeof( *info ) );
447 memset( &results, 0,
sizeof(
trace_t ) );
456 memset( &results, 0,
sizeof(
trace_t ) );
739 if ( ent && ent !=
self ) {
796 length *= angularScale;
797 if ( length > 0.1
f ) {
798 if ( length < 60.0
f ) {
801 else if ( length > 360.0
f ) {
809 vec -= vec * dir * vec;
813 for ( a = 20.0
f; a <
length; a += 20.0f ) {
void ReadContactInfo(contactInfo_t &contactInfo)
const idVec3 & GetGravity(void) const
void WriteToSnapshot(idBitMsgDelta &msg) const
void RemoveContactEntity(idEntity *e)
void ClipTranslation(trace_t &results, const idVec3 &translation, const idClipModel *model) const
void DrawVelocity(int id, float linearScale, float angularScale) const
void SetMass(float mass, int id=-1)
assert(prefInfo.fullscreenBtn)
idMat3 mat3_identity(idVec3(1, 0, 0), idVec3(0, 1, 0), idVec3(0, 0, 1))
void GetImpactInfo(const int id, const idVec3 &point, impactInfo_t *info) const
void WriteObject(const idClass *obj)
virtual void DebugArrow(const idVec4 &color, const idVec3 &start, const idVec3 &end, int size, const int lifetime=0)=0
int GetNumClipModels(void) const
void SetAxis(const idMat3 &newAxis, int id=-1)
void AddForce(const int id, const idVec3 &point, const idVec3 &force)
int Contacts(contactInfo_t *contacts, const int maxContacts, const idVec3 &start, const idVec6 &dir, const float depth, const idClipModel *mdl, const idMat3 &trmAxis, int contentMask, const idEntity *passEntity)
void SetNum(int newnum, bool resize=true)
bool IsOutsideWorld(void) const
const idMat3 & GetAxis(void) const
virtual void RemoveContactEntity(idEntity *ent)
const idVec3 & SubVec3(int index) const
bool EvaluateContacts(void)
idBounds bounds_zero(vec3_zero, vec3_zero)
idClipModel * GetClipModel(int id=0) const
void UpdateTime(int endTimeMSec)
static void DeletePhysics(const idPhysics *phys)
const idVec3 & GetOrigin(void) const
int GetNumContacts(void) const
const contactInfo_t & GetContact(int num) const
const idMat3 & GetAxis(int id=0) const
void WriteVec3(const idVec3 &vec)
void Save(idSaveGame *savefile) const
idEntity * GetBlockingEntity(void) const
const idBounds & GetBounds(int id=-1) const
void SetClipModel(idClipModel *model, float density, int id=0, bool freeOld=true)
const idBounds & GetWorldBounds(void) const
void SetOrigin(const idVec3 &newOrigin, int id=-1)
void ApplyImpulse(const int id, const idVec3 &point, const idVec3 &impulse)
int GetAngularEndTime(void) const
idVec3 & Truncate(float length)
void SetSelf(idEntity *e)
void AddContactEntity(idEntity *e)
idPhysics * GetPhysics(void) const
virtual void DebugLine(const idVec4 &color, const idVec3 &start, const idVec3 &end, const int lifetime=0, const bool depthTest=false)=0
bool IsGroundClipModel(int entityNum, int id) const
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
float GetMass(int id=-1) const
const idVec3 & GetLinearVelocity(int id=0) const
static float Fabs(float f)
const idVec3 & GetGravityNormal(void) const
void Rotate(const idRotation &rotation, int id=-1)
const idBounds & GetAbsBounds(int id=-1) const
const idVec3 & GetGravity(void) const
void AddGroundContacts(const idClipModel *clipModel)
void ClipRotation(trace_t &results, const idRotation &rotation, const idClipModel *model) const
void SetLinearVelocity(const idVec3 &newLinearVelocity, int id=0)
float LengthSqr(void) const
GLubyte GLubyte GLubyte a
idBounds Expand(const float d) const
virtual void AddContactEntity(idEntity *ent)
void WriteInt(const int value)
void SetPushed(int deltaTime)
idList< contactInfo_t > contacts
idEntity * entities[MAX_GENTITIES]
bool IsGroundEntity(int entityNum) const
void AddContactEntitiesForContacts(void)
int GetRestStartTime(void) const
int GetContents(int id=-1) const
int GetLinearEndTime(void) const
void SetClipMask(int mask, int id=-1)
void Restore(idRestoreGame *savefile)
void SetAngularVelocity(const idVec3 &newAngularVelocity, int id=0)
const idMat3 & ToMat3(void) const
int GetClipMask(int id=-1) const
bool RemoveIndex(int index)
bool IntersectsBounds(const idBounds &a) const
const idVec3 & GetOrigin(int id=0) const
const idVec3 & GetPushedLinearVelocity(const int id=0) const
#define CLASS_DECLARATION(nameofsuperclass, nameofclass)
GLsizei const GLcharARB const GLint * length
void ReadVec3(idVec3 &vec)
void WriteContactInfo(const contactInfo_t &contactInfo)
void SetContents(int contents, int id=-1)
int ClipContents(const idClipModel *model) const
bool IsPushable(void) const
bool HasGroundContacts(void) const
bool Evaluate(int timeStepMSec, int endTimeMSec)
void SetMaster(idEntity *master, const bool orientated=true)
void ActivateContactEntities(void)
void SetGravity(const idVec3 &newGravity)
void ReadFromSnapshot(const idBitMsgDelta &msg)
idRenderWorld * gameRenderWorld
const idVec3 & GetAngularVelocity(int id=0) const
idList< contactEntity_t > contactEntities
const idVec3 & GetPushedAngularVelocity(const int id=0) const
const trace_t * GetBlockingInfo(void) const
virtual void ActivatePhysics(idEntity *ent)
void ReadObject(idClass *&obj)
void Translate(const idVec3 &translation, int id=-1)
bool IsAtRest(void) const