This commit is contained in:
Paul 2001-08-16 19:20:30 +00:00
parent e4daf8844b
commit f12a92d250
3 changed files with 39 additions and 37 deletions

View File

@ -721,7 +721,7 @@ int CGameScene::getTotalSpatCountForThisLevel()
/*****************************************************************************/
int CGameScene::triggerTeleportEffect()
{
if(m_gamestate==GAMESTATE_PLAYING&&!m_player->isDead())
if(m_gamestate==GAMESTATE_PLAYING)
{
m_gamestate=GAMESTATE_TELEPORT_START;
CFader::setFadingOut();
@ -776,7 +776,7 @@ void CGameScene::setBossHasBeenKilled()
/*****************************************************************************/
void CGameScene::hitBossArenaTrigger()
{
if(!s_showBossTextOnRespawn&&!m_player->isDead())
if(!s_showBossTextOnRespawn)
{
s_justHitBossArenaTrigger=true;
s_showBossTextOnRespawn=true;

View File

@ -737,52 +737,54 @@ if(newmode!=-1)
newmode=-1;
}
CThing *platform;
platform=isOnPlatform();
if(platform)
if(!isDead())
{
if ( ( (CNpcPlatform *) platform )->isCart() )
CThing *platform;
platform=isOnPlatform();
if(platform)
{
if ( m_currentMode != PLAYER_MODE_CART && m_currentMode != PLAYER_MODE_DEAD )
if ( ( (CNpcPlatform *) platform )->isCart() )
{
setMode( PLAYER_MODE_CART );
}
}
else
{
DVECTOR posDelta;
posDelta=platform->getPosDelta();
posDelta.vy = 0;
shove(posDelta);
int platformOffset = ( ( CNpcPlatform* ) platform )->getHeightFromPlatformAtPosition( Pos.vx, Pos.vy );
int height=CGameScene::getCollision()->getHeightFromGround(Pos.vx,Pos.vy,16);
// Hmm.. this *almost* stops him elevating through walls :/
if ( platformOffset < height )
{
int goingToHitWall=false;
int i;
for(i=0;i<2;i++)
if ( m_currentMode != PLAYER_MODE_CART && m_currentMode != PLAYER_MODE_DEAD )
{
int x=Pos.vx+((i==0?-checkx:+checkx));
int y=Pos.vy-HEIGHT_FOR_HEAD_COLLISION;
if(getHeightFromGroundNoPlatform(x,y,16)>=0&&getHeightFromGroundNoPlatform(x,y+platformOffset,16)<=0&&((CGameScene::getCollision()->getCollisionBlock(x,y+platformOffset)&COLLISION_TYPE_MASK)!=COLLISION_TYPE_FLAG_NORMAL))
{
goingToHitWall=true;
break;
}
setMode( PLAYER_MODE_CART );
}
}
else
{
DVECTOR posDelta;
posDelta=platform->getPosDelta();
posDelta.vy = 0;
shove(posDelta);
if(!goingToHitWall)
int platformOffset = ( ( CNpcPlatform* ) platform )->getHeightFromPlatformAtPosition( Pos.vx, Pos.vy );
int height=CGameScene::getCollision()->getHeightFromGround(Pos.vx,Pos.vy,16);
// Hmm.. this *almost* stops him elevating through walls :/
if ( platformOffset < height )
{
Pos.vy += platformOffset;
int goingToHitWall=false;
int i;
for(i=0;i<2;i++)
{
int x=Pos.vx+((i==0?-checkx:+checkx));
int y=Pos.vy-HEIGHT_FOR_HEAD_COLLISION;
if(getHeightFromGroundNoPlatform(x,y,16)>=0&&getHeightFromGroundNoPlatform(x,y+platformOffset,16)<=0&&((CGameScene::getCollision()->getCollisionBlock(x,y+platformOffset)&COLLISION_TYPE_MASK)!=COLLISION_TYPE_FLAG_NORMAL))
{
goingToHitWall=true;
break;
}
}
if(!goingToHitWall)
{
Pos.vy += platformOffset;
}
}
}
}
}
m_allowConversation=false;
m_xMove = Pos.vx;

View File

@ -60,7 +60,7 @@ void CBossArenaTrigger::collidedWith(CThing *_thisThing)
{
case TYPE_PLAYER:
{
CGameScene::hitBossArenaTrigger();
GameScene.hitBossArenaTrigger();
shutdown();
delete this;
break;