diff --git a/source/platform/pjellfsh.cpp b/source/platform/pjellfsh.cpp index 0f31a61a7..9102e2b84 100644 --- a/source/platform/pjellfsh.cpp +++ b/source/platform/pjellfsh.cpp @@ -39,7 +39,7 @@ void CNpcJellyfishPlatform::postInit() { sBBox boundingBox = m_modelGfx->GetBBox(); 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 ); calculateNonRotatedCollisionData(); @@ -88,6 +88,17 @@ CRECT const &collisionArea=getCollisionArea(); { 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_soundId == NOT_PLAYING ) diff --git a/source/player/player.cpp b/source/player/player.cpp index c080c2da3..aabf62fe7 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -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)) { 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]; + m_currentPlayerModeClass->setState(STATE_FALL); + DVECTOR moveVel; + + moveVel=*getMoveVelocity(); + moveVel.vy=0; + m_fallFrames=0; + setMoveVelocity(&moveVel); } else {