From 3db41dcb6818eb41f6fc685e7d161a3e965c0bdf Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 10 May 2001 19:22:34 +0000 Subject: [PATCH] --- source/gfx/prim.h | 2 +- source/platform/pbranch.cpp | 4 ++-- source/platform/platform.cpp | 4 ++-- source/platform/platform.h | 2 +- source/platform/praft.cpp | 2 +- source/platform/psbarrel.cpp | 2 +- source/player/player.cpp | 10 ++++------ 7 files changed, 12 insertions(+), 14 deletions(-) diff --git a/source/gfx/prim.h b/source/gfx/prim.h index 08ddda2df..51721da69 100644 --- a/source/gfx/prim.h +++ b/source/gfx/prim.h @@ -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 diff --git a/source/platform/pbranch.cpp b/source/platform/pbranch.cpp index 9357c7a43..2f26cadf0 100644 --- a/source/platform/pbranch.cpp +++ b/source/platform/pbranch.cpp @@ -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); } diff --git a/source/platform/platform.cpp b/source/platform/platform.cpp index d0ceafa03..d4bae9596 100644 --- a/source/platform/platform.cpp +++ b/source/platform/platform.cpp @@ -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 ) ); diff --git a/source/platform/platform.h b/source/platform/platform.h index ab28cd6ea..ca8737750 100644 --- a/source/platform/platform.h +++ b/source/platform/platform.h @@ -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 /*****************************************************************************/ diff --git a/source/platform/praft.cpp b/source/platform/praft.cpp index 4317f6c48..70f741835 100644 --- a/source/platform/praft.cpp +++ b/source/platform/praft.cpp @@ -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 ); } diff --git a/source/platform/psbarrel.cpp b/source/platform/psbarrel.cpp index 6e6c7b522..39ae7eed9 100644 --- a/source/platform/psbarrel.cpp +++ b/source/platform/psbarrel.cpp @@ -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 ); } diff --git a/source/player/player.cpp b/source/player/player.cpp index 146f127aa..e020a2bb9 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -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 + colHeightBefore=getHeightFromGround(pos.vx,pos.vy,16); + colHeightAfter=getHeightFromGround(pos.vx,pos.vy+_moveDistance,16); + if(isOnPlatform()&& + !(colHeightBefore>=0&&colHeightAfter<=0)) { colHeightBefore=getHeightFromPlatformNoGround(pos.vx,pos.vy,16); colHeightAfter=getHeightFromPlatformNoGround(pos.vx,pos.vy+_moveDistance,16);