This commit is contained in:
parent
f3c69806b7
commit
87d561c4ab
19 changed files with 331 additions and 65 deletions
|
@ -814,7 +814,7 @@ if(PadGetDown(0)&PAD_TRIANGLE)
|
|||
{
|
||||
GameScene.GetLevel().destroyMapTile(oldPos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Is player stood on any special collision?
|
||||
if(getHeightFromGroundNoPlatform(Pos.vx,Pos.vy,5)==0)
|
||||
|
@ -837,12 +837,12 @@ if(PadGetDown(0)&PAD_TRIANGLE)
|
|||
block==COLLISION_TYPE_FLAG_DEATH_LIQUID)
|
||||
{
|
||||
dieYouPorousFreak(DEATHTYPE__LIQUID);
|
||||
}
|
||||
}
|
||||
else if(m_currentMode!=PLAYER_MODE_DEAD&&
|
||||
block==COLLISION_TYPE_FLAG_DEATH_INSTANT)
|
||||
{
|
||||
dieYouPorousFreak(DEATHTYPE__NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Powerups
|
||||
|
@ -1553,6 +1553,17 @@ void CPlayer::springPlayerUp(int _springHeight)
|
|||
m_currentPlayerModeClass->springPlayerUp(_springHeight);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CPlayer::setFloating()
|
||||
{
|
||||
m_currentPlayerModeClass->setFloating();
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
|
@ -1814,6 +1825,16 @@ void CPlayer::renderSb(DVECTOR *_pos,int _animNo,int _animFrame)
|
|||
|
||||
// Render SB
|
||||
ft4=m_actorGfx->Render(*_pos,_animNo,_animFrame,m_facing==FACING_RIGHT?0:1);
|
||||
CThing *platform;
|
||||
platform=isOnPlatform();
|
||||
if(platform)
|
||||
{
|
||||
if ( ( (CNpcPlatform *) platform )->isCart() )
|
||||
{
|
||||
m_actorGfx->RotateScale( ft4, *_pos, ( (CNpcPlatform *) platform )->getCollisionAngle(), ONE, ONE );
|
||||
}
|
||||
}
|
||||
|
||||
setSemiTrans(ft4,trans);
|
||||
}
|
||||
|
||||
|
@ -2402,7 +2423,7 @@ int CPlayer::moveVertical(int _moveDistance)
|
|||
_moveDistance=0;
|
||||
hitGround=true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -85,6 +85,7 @@ typedef enum
|
|||
STATE_LOOKDOWNRELAX,
|
||||
STATE_JUMPBACK,
|
||||
STATE_CART,
|
||||
STATE_FLOAT,
|
||||
|
||||
NUM_STATES,
|
||||
}PLAYER_STATE;
|
||||
|
@ -398,6 +399,8 @@ public:
|
|||
|
||||
void justButtBouncedABadGuy(); // Also fugly.. :/
|
||||
|
||||
void setFloating();
|
||||
|
||||
private:
|
||||
int m_squeakyBootsTimer;
|
||||
int m_invincibilityRingTimer;
|
||||
|
|
|
@ -83,6 +83,9 @@ void CPlayerModeCart::think()
|
|||
newPos.vy = platform->getPos().vy;
|
||||
|
||||
int platformOffset = ( ( CNpcPlatform* ) platform )->getHeightFromPlatformAtPosition( newPos.vx, newPos.vy );
|
||||
s16 angle = ( ( CNpcPlatform * ) platform )->getCollisionAngle();
|
||||
newPos.vx += ( -platformOffset * rsin( angle ) ) >> 12;
|
||||
platformOffset = ( ( CNpcPlatform* ) platform )->getHeightFromPlatformAtPosition( newPos.vx, newPos.vy );
|
||||
newPos.vy += platformOffset;
|
||||
|
||||
m_player->setPos( newPos );
|
||||
|
@ -96,23 +99,5 @@ void CPlayerModeCart::think()
|
|||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
/*
|
||||
void CPlayerModeDead::render(DVECTOR *_pos)
|
||||
{
|
||||
DVECTOR deadSbPos;
|
||||
|
||||
deadSbPos=*_pos;
|
||||
deadSbPos.vy-=m_deadTime;
|
||||
|
||||
m_player->renderSb(&deadSbPos,ANIM_SPONGEBOB_DEATHANGLE,0);
|
||||
}
|
||||
*/
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
||||
|
|
|
@ -74,6 +74,10 @@
|
|||
#include "player\pscart.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PLAYER_PSFLOAT_H__
|
||||
#include "player\psfloat.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PLATFORM_PLATFORM_H__
|
||||
#include "platform\platform.h"
|
||||
#endif
|
||||
|
@ -127,6 +131,7 @@ static CPlayerState *s_stateTable[]=
|
|||
&s_stateLookDownRelax, // STATE_LOOKDOWNRELAX
|
||||
&s_stateJumpBack, // STATE_JUMPBACK
|
||||
&s_stateCart, // STATE_CART
|
||||
&s_stateFloat, // STATE_FLOAT
|
||||
};
|
||||
|
||||
static PlayerMetrics s_playerMetrics=
|
||||
|
@ -316,7 +321,8 @@ void CPlayerModeBase::thinkVerticalMovement()
|
|||
else if(m_currentState!=STATE_FALL&&m_currentState!=STATE_FALLFAR&& // Hmm.. (pkg)
|
||||
m_currentState!=STATE_BUTTFALL&&m_currentState!=STATE_BUTTBOUNCE&&
|
||||
m_currentState!=STATE_JUMP&&m_currentState!=STATE_SPRINGUP&&
|
||||
m_currentState!=STATE_JUMPBACK&&m_currentState!=STATE_BUTTBOUNCEUP)
|
||||
m_currentState!=STATE_JUMPBACK&&m_currentState!=STATE_BUTTBOUNCEUP&&
|
||||
m_currentState!=STATE_FLOAT)
|
||||
{
|
||||
DVECTOR pos;
|
||||
pos=m_player->getPlayerPos();
|
||||
|
|
|
@ -92,6 +92,7 @@ public:
|
|||
virtual void renderModeUi() {;} // Ui specific to this mode (eg: ammo)
|
||||
virtual int canDoLookAround() {return false;}
|
||||
virtual void springPlayerUp(int _springHeight) {;}
|
||||
virtual void setFloating() {;}
|
||||
void inSoakUpState();
|
||||
|
||||
virtual int setState(int _state) {return 0;}
|
||||
|
@ -128,6 +129,7 @@ public:
|
|||
virtual void render() {;}
|
||||
virtual int canDoLookAround();
|
||||
virtual void springPlayerUp(int _springHeight) {m_springHeight=_springHeight;setState(STATE_SPRINGUP);}
|
||||
virtual void setFloating() {setState( STATE_FLOAT );}
|
||||
|
||||
virtual ATTACK_STATE getAttackState();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue