This commit is contained in:
parent
9980ec3800
commit
b492b81a73
2 changed files with 24 additions and 2 deletions
|
@ -39,7 +39,7 @@ void CNpcJellyfishPlatform::postInit()
|
||||||
{
|
{
|
||||||
sBBox boundingBox = m_modelGfx->GetBBox();
|
sBBox boundingBox = m_modelGfx->GetBBox();
|
||||||
boundingBox.YMin += 8;
|
boundingBox.YMin += 8;
|
||||||
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
|
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ) - 16, ( boundingBox.YMax - boundingBox.YMin ) );
|
||||||
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( boundingBox.YMax + boundingBox.YMin ) >> 1 );
|
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( boundingBox.YMax + boundingBox.YMin ) >> 1 );
|
||||||
|
|
||||||
calculateNonRotatedCollisionData();
|
calculateNonRotatedCollisionData();
|
||||||
|
@ -88,6 +88,17 @@ CRECT const &collisionArea=getCollisionArea();
|
||||||
{
|
{
|
||||||
m_contact = true;
|
m_contact = true;
|
||||||
|
|
||||||
|
DVECTOR playerDelta;
|
||||||
|
|
||||||
|
playerDelta = player->getPosDelta();
|
||||||
|
|
||||||
|
if ( playerDelta.vy == 0 )
|
||||||
|
{
|
||||||
|
// force dip to complete since player is not dropping onto jellyfish
|
||||||
|
|
||||||
|
m_dipCount = GameState::getOneSecondInFrames();
|
||||||
|
}
|
||||||
|
|
||||||
if ( m_contactTimeout <= 0 )
|
if ( m_contactTimeout <= 0 )
|
||||||
{
|
{
|
||||||
if ( m_soundId == NOT_PLAYING )
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
|
|
@ -2760,8 +2760,19 @@ int CPlayer::moveVertical(int _moveDistance)
|
||||||
if(colHeightBefore[i]>=0&&colHeightAfter[i]<=0&&((blockAfter[i]&COLLISION_TYPE_MASK)!=COLLISION_TYPE_FLAG_NORMAL))
|
if(colHeightBefore[i]>=0&&colHeightAfter[i]<=0&&((blockAfter[i]&COLLISION_TYPE_MASK)!=COLLISION_TYPE_FLAG_NORMAL))
|
||||||
{
|
{
|
||||||
moveRequired[i]=16+colHeightAfter[i];
|
moveRequired[i]=16+colHeightAfter[i];
|
||||||
hitGround=true;
|
// hitGround=true;
|
||||||
|
|
||||||
|
// do not call hitground code, because this will set it to STATE_IDLE for a frame
|
||||||
|
// instead, do the appropriate stuff for a fall
|
||||||
|
|
||||||
if(!hitThisSuspectBlock)hitThisSuspectBlock=blockAfter[i];
|
if(!hitThisSuspectBlock)hitThisSuspectBlock=blockAfter[i];
|
||||||
|
m_currentPlayerModeClass->setState(STATE_FALL);
|
||||||
|
DVECTOR moveVel;
|
||||||
|
|
||||||
|
moveVel=*getMoveVelocity();
|
||||||
|
moveVel.vy=0;
|
||||||
|
m_fallFrames=0;
|
||||||
|
setMoveVelocity(&moveVel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue