This commit is contained in:
Charles 2001-03-08 21:51:22 +00:00
parent ba2307038c
commit 74b08969ef
2 changed files with 22 additions and 3 deletions

View file

@ -219,6 +219,9 @@ m_animFrame=0;
m_lives=CGameSlotManager::getSlotData().m_lives; m_lives=CGameSlotManager::getSlotData().m_lives;
xHighRes = 0;
yHighRes = 0;
m_cameraOffset.vx=0; m_cameraOffset.vx=0;
m_cameraOffset.vy=0; m_cameraOffset.vy=0;
m_cameraScrollDir=0; m_cameraScrollDir=0;
@ -1459,7 +1462,21 @@ void CPlayer::setPlatform( CThing *newPlatform )
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
void CPlayer::shove( DVECTOR move ) void CPlayer::shove( DVECTOR move )
{ {
int colHeight = m_layerCollision->getHeightFromGround( Pos.vx + move.vx, Pos.vy + move.vy, 1 ); DVECTOR newPos;
/*xHighRes += move.vx % 4096;
yHighRes += move.vy % 4096;
newPos.vx = Pos.vx + ( move.vx >> 12 ) + ( xHighRes >> 12 );
newPos.vy = Pos.vy + ( move.vy >> 12 ) + ( yHighRes >> 12 );
xHighRes %= 4096;
yHighRes %= 4096;*/
newPos.vx = Pos.vx + move.vx;
newPos.vy = Pos.vy + move.vy;
int colHeight = m_layerCollision->getHeightFromGround( newPos.vx, newPos.vy, 1 );
if( colHeight < 0 ) if( colHeight < 0 )
{ {
@ -1469,8 +1486,8 @@ void CPlayer::shove( DVECTOR move )
} }
else else
{ {
Pos.vx += move.vx; Pos.vx = newPos.vx;
Pos.vy += move.vy; Pos.vy = newPos.vy;
} }
} }

View file

@ -326,6 +326,8 @@ private:
public: public:
void setPlatform( CThing *newPlatform ); void setPlatform( CThing *newPlatform );
void clearPlatform(); void clearPlatform();
int xHighRes;
int yHighRes;
private: private:
CThing *m_platform; CThing *m_platform;
bool m_onPlatform; bool m_onPlatform;