mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-16 16:20:42 +02:00
Added bot code.
This commit is contained in:
@@ -682,7 +682,6 @@ idClip::Init
|
||||
===============
|
||||
*/
|
||||
void idClip::Init( void ) {
|
||||
cmHandle_t h;
|
||||
idVec3 size, maxSector = vec3_origin;
|
||||
|
||||
// clear clip sectors
|
||||
@@ -691,8 +690,8 @@ void idClip::Init( void ) {
|
||||
numClipSectors = 0;
|
||||
touchCount = -1;
|
||||
// get world map bounds
|
||||
h = collisionModelManager->LoadModel( "worldMap", false );
|
||||
collisionModelManager->GetModelBounds( h, worldBounds );
|
||||
worldCollisionModel = collisionModelManager->LoadModel( "worldMap", false );
|
||||
collisionModelManager->GetModelBounds(worldCollisionModel, worldBounds );
|
||||
// create world sectors
|
||||
CreateClipSectors_r( 0, worldBounds, maxSector );
|
||||
|
||||
@@ -1664,3 +1663,31 @@ bool idClip::DrawModelContactFeature( const contactInfo_t &contact, const idClip
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
============
|
||||
idClip::PointContents
|
||||
============
|
||||
*/
|
||||
int idClip::PointContents(const idVec3 p)
|
||||
{
|
||||
int contents = -1;
|
||||
|
||||
contents = collisionModelManager->PointContents(p, worldCollisionModel);
|
||||
if (contents > 0)
|
||||
{
|
||||
return contents;
|
||||
}
|
||||
|
||||
//for (int i = 0; i < collisionModelManager->GetNumInlinedProcClipModels(); i++)
|
||||
//{
|
||||
// idCollisionModel* cm = collisionModelManager->GetCollisionModel(i + 1);
|
||||
// if (cm == NULL)
|
||||
// continue;
|
||||
//
|
||||
// contents = collisionModelManager->PointContents(p, cm);
|
||||
//}
|
||||
|
||||
return contents;
|
||||
}
|
||||
Reference in New Issue
Block a user