This commit is contained in:
Paul 2001-05-10 19:22:34 +00:00
parent 3e2a380aa2
commit 3db41dcb68
7 changed files with 12 additions and 14 deletions

View file

@ -18,7 +18,7 @@
#define MAX_OT_GUI (0)
#define MAX_OT (16)
#define MAX_OT_ALL (MAX_OT+MAX_OT_GUI)
#define MAX_PRIMS ((1024*2)) // Put back after overrender bug found (BAD DAVE!)
#define MAX_PRIMS ((1024*2)+1024) // Put back after overrender bug found (BAD DAVE!) ( put back in by evilpaul ;)
//#define USE_NTAGS 1

View file

@ -37,7 +37,7 @@
void CNpcBranchPlatform::postInit()
{
sBBox boundingBox = m_modelGfx->GetBBox();
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ) << 1, 50 + ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ) << 1, PLATFORMCOLLISIONHEIGHT );
if ( m_reversed )
{
@ -319,5 +319,5 @@ void CNpcBranchPlatform::calculateBoundingBoxSize()
x2=+length*mcos(angle&4095)>>12;
y2=+length*msin(angle&4095)>>12;
setCollisionSize(abs(x2-x1),50 + abs(y2-y1)+PLATFORMCOLLISIONHEIGHT);
setCollisionSize(abs(x2-x1),abs(y2-y1)+PLATFORMCOLLISIONHEIGHT);
}

View file

@ -479,7 +479,7 @@ void CNpcPlatform::reinit()
void CNpcPlatform::postInit()
{
sBBox boundingBox = m_modelGfx->GetBBox();
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), 50 + ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), PLATFORMCOLLISIONHEIGHT);
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, boundingBox.YMin );
if ( m_type == NPC_LINEAR_PLATFORM )
@ -700,7 +700,7 @@ void CNpcPlatform::calculateBoundingBoxSize()
x2=+halfLength*mcos(angle&4095)>>12;
y2=+halfLength*msin(angle&4095)>>12;
setCollisionSize(abs(x2-x1),50 + abs(y2-y1)+PLATFORMCOLLISIONHEIGHT);
setCollisionSize(abs(x2-x1),abs(y2-y1)+PLATFORMCOLLISIONHEIGHT);
//sBBox boundingBox = m_modelGfx->GetBBox();
//setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );

View file

@ -42,7 +42,7 @@
// The collision box is this high.. if SB keeps falling through platforms then it *should* be sufficient
// just to up this a bit
#define PLATFORMCOLLISIONHEIGHT 80
#define PLATFORMCOLLISIONHEIGHT 90
/*****************************************************************************/

View file

@ -36,7 +36,7 @@ void CNpcRaftPlatform::postInit()
m_isSinking = false;
sBBox boundingBox = m_modelGfx->GetBBox();
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), 50 + ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), PLATFORMCOLLISIONHEIGHT + ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( ( boundingBox.YMax + boundingBox.YMin ) >> 1 ) - 16 );
}

View file

@ -35,7 +35,7 @@ void CNpcSteerableBarrelPlatform::postInit()
CNpcPlatform::postInit();
sBBox boundingBox = m_modelGfx->GetBBox();
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), 50 + ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), PLATFORMCOLLISIONHEIGHT + ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( ( boundingBox.YMax + boundingBox.YMin ) >> 1 ) - 32 );
}

View file

@ -1779,12 +1779,10 @@ int CPlayer::moveVertical(int _moveDistance)
int colHeightBefore,colHeightAfter;
// Yes.. Check to see if we're about to hit/go through the ground/platform
if(!isOnPlatform())
{
colHeightBefore=getHeightFromGround(pos.vx,pos.vy,16);
colHeightAfter=getHeightFromGround(pos.vx,pos.vy+_moveDistance,16);
}
else
if(isOnPlatform()&&
!(colHeightBefore>=0&&colHeightAfter<=0))
{
colHeightBefore=getHeightFromPlatformNoGround(pos.vx,pos.vy,16);
colHeightAfter=getHeightFromPlatformNoGround(pos.vx,pos.vy+_moveDistance,16);