29 #include "../../idlib/precompiled.h"
33 #include "../Game_local.h"
47 axis[2].NormalVectors( axis[0], axis[1] );
50 center = origin + dir;
51 top = center + dir * (3.0f * radius);
52 lastp = center + radius * axis[1];
54 for ( i = 20; i <= 360; i += 20 ) {
55 p = center + sin(
DEG2RAD(i) ) * radius * axis[0] + cos(
DEG2RAD(i) ) * radius * axis[1];
117 int i,
j, numEdges, firstEdge;
130 for ( i = 0; i < numEdges; i++ ) {
151 int i, numFaces, firstFace;
163 for ( i = 0; i < numFaces; i++ ) {
167 for ( reach = area->
reach; reach; reach = reach->
next ) {
187 static int lastAreaNum;
208 if ( areaNum != lastAreaNum ) {
227 lastAreaNum = areaNum;
230 if ( org != origin ) {
232 bnds[ 1 ].z = bnds[ 0 ].z;
245 int i, areaNum, curAreaNum, travelTime;
257 curAreaNum = areaNum;
259 for ( i = 0; i < 100; i++ ) {
291 int i, areaNum, curAreaNum, travelTime;
303 curAreaNum = areaNum;
305 for ( i = 0; i < 100; i++ ) {
337 int i, areaNum, numEdges, edges[1024];
348 for ( i = 0; i < numEdges; i++ ) {
349 GetEdge( edges[i], start, end );
361 int areaNum, numObstacles;
390 idVec3 areaCenter, dir, vel;
idPlayer * GetLocalPlayer() const
void DrawArea(int areaNum) const
virtual void ShowFlyPath(const idVec3 &origin, int goalAreaNum, const idVec3 &goalOrigin) const
const idAASSettings & GetSettings(void) const
virtual void Test(const idVec3 &origin)
virtual void DebugArrow(const idVec4 &color, const idVec3 &start, const idVec3 &end, int size, const int lifetime=0)=0
void Printf(const char *fmt,...) const id_attribute((format(printf
const aasEdge_t & GetEdge(int index) const
const aasFace_t & GetFace(int index) const
void DrawFace(int faceNum, bool side) const
void ShowArea(const idVec3 &origin) const
virtual void PushPointIntoAreaNum(int areaNum, idVec3 &origin) const
idCVar aas_showPushIntoArea("aas_showPushIntoArea","0", CVAR_GAME|CVAR_BOOL,"")
virtual void GetEdge(int edgeNum, idVec3 &start, idVec3 &end) const
#define AREACONTENTS_OBSTACLE
const aasVertex_t & GetVertex(int index) const
virtual const idVec3 & GetLinearVelocity(int id=0) const =0
idAngles & Normalize180(void)
virtual void SetLinearVelocity(const idVec3 &newLinearVelocity, int id=0)=0
#define AREA_REACHABLE_FLY
idBounds boundingBoxes[MAX_AAS_BOUNDING_BOXES]
const aasIndex_t & GetEdgeIndex(int index) const
void SetDeltaViewAngles(const idAngles &delta)
void RandomPullPlayer(const idVec3 &origin) const
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
idAngles ToAngles(void) const
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
const idAngles & GetDeltaViewAngles(void) const
idCVar aas_showFlyPath("aas_showFlyPath","0", CVAR_GAME|CVAR_INTEGER,"")
void ShowPushIntoArea(const idVec3 &origin) const
virtual bool RouteToGoalArea(int areaNum, const idVec3 origin, int goalAreaNum, int travelFlags, int &travelTime, idReachability **reach) const
idCVar aas_showHideArea("aas_showHideArea","0", CVAR_GAME|CVAR_INTEGER,"")
idCVar aas_showAreas("aas_showAreas","0", CVAR_GAME|CVAR_BOOL,"")
idCVar aas_showPath("aas_showPath","0", CVAR_GAME|CVAR_INTEGER,"")
const aasIndex_t & GetFaceIndex(int index) const
void SetInteger(const int value)
int GetInteger(void) const
int GetNumAreas(void) const
void ShowHideArea(const idVec3 &origin, int targerAreaNum) const
virtual bool FindNearestGoal(aasGoal_t &goal, int areaNum, const idVec3 origin, const idVec3 &target, int travelFlags, aasObstacle_t *obstacles, int numObstacles, idAASCallback &callback) const
virtual bool FlyPathToGoal(aasPath_t &path, int areaNum, const idVec3 &origin, int goalAreaNum, const idVec3 &goalOrigin, int travelFlags) const
virtual void DrawText(const char *text, const idVec3 &origin, float scale, const idVec4 &color, const idMat3 &viewAxis, const int align=1, const int lifetime=0, bool depthTest=false)=0
idBounds Expand(const float d) const
GLdouble GLdouble GLdouble top
virtual int PointReachableAreaNum(const idVec3 &origin, const idBounds &searchBounds, const int areaFlags) const
const idBounds & DefaultSearchBounds(void) const
bool PullPlayer(const idVec3 &origin, int toAreaNum) const
virtual bool WalkPathToGoal(aasPath_t &path, int areaNum, const idVec3 &origin, int goalAreaNum, const idVec3 &goalOrigin, int travelFlags) const
void DrawEdge(int edgeNum, bool arrow) const
#define AREA_REACHABLE_WALK
virtual const idBounds & GetAbsBounds(int id=-1) const =0
void DrawReachability(const idReachability *reach) const
void DrawCone(const idVec3 &origin, const idVec3 &dir, float radius, const idVec4 &color) const
const idPlane & GetPlane(int index) const
virtual void DebugBounds(const idVec4 &color, const idBounds &bounds, const idVec3 &org=vec3_origin, const int lifetime=0)=0
virtual void ShowWalkPath(const idVec3 &origin, int goalAreaNum, const idVec3 &goalOrigin) const
idRenderWorld * gameRenderWorld
idCVar aas_randomPullPlayer("aas_randomPullPlayer","0", CVAR_GAME|CVAR_BOOL,"")
idCVar aas_goalArea("aas_goalArea","0", CVAR_GAME|CVAR_INTEGER,"")
char * va(const char *fmt,...)
virtual int GetWallEdges(int areaNum, const idBounds &bounds, int travelFlags, int *edges, int maxEdges) const
const aasArea_t & GetArea(int index)
bool ContainsPoint(const idVec3 &p) const
idCVar aas_pullPlayer("aas_pullPlayer","0", CVAR_GAME|CVAR_INTEGER,"")
void ShowWallEdges(const idVec3 &origin) const
#define AREACONTENTS_CLUSTERPORTAL
virtual idVec3 AreaCenter(int areaNum) const
idCVar aas_showWallEdges("aas_showWallEdges","0", CVAR_GAME|CVAR_BOOL,"")