This commit is contained in:
Paul 2001-05-01 16:51:01 +00:00
parent 9df303b4e7
commit 1a9ca66995
2 changed files with 13 additions and 2 deletions

View File

@ -540,6 +540,10 @@ int newmode=-1;
#ifdef _STATE_DEBUG_
char posBuf[100];
#endif
int scmax=160;
int scspeed=5;
void CPlayer::think(int _frames)
{
int i;
@ -736,9 +740,14 @@ else if(Pos.vy>m_mapEdge.vy-64)Pos.vy=m_mapEdge.vy-64;
m_lastLedgeLookAhead=m_ledgeLookAhead;
m_ledgeLookAhead=0;
// Left/right scroll as SB moves left/right
int max=scmax*scspeed;
m_leftRightScrollPosition+=m_moveVelocity.vx;
if(m_leftRightScrollPosition<-max)m_leftRightScrollPosition=-max;
else if(m_leftRightScrollPosition>max)m_leftRightScrollPosition=max;
// Camera focus point stuff
m_currentCamFocusPointTarget.vx=Pos.vx+MAP2D_CENTRE_X;
m_currentCamFocusPointTarget.vx=Pos.vx+MAP2D_CENTRE_X+(m_leftRightScrollPosition/scspeed);
m_currentCamFocusPointTarget.vy=Pos.vy+MAP2D_CENTRE_Y;
for(i=0;i<_frames;i++)
{
@ -1169,6 +1178,7 @@ void CPlayer::respawn()
m_ledgeLookAhead=m_lastLedgeLookAhead=0;
m_ledgeLookOffset=0;
m_ledgeLookTimer=0;
m_leftRightScrollPosition=0;
m_glassesFlag=0;
m_squeakyBootsTimer=0;

View File

@ -246,6 +246,7 @@ private:
int m_ledgeLookAhead,m_lastLedgeLookAhead;
int m_ledgeLookOffset;
int m_ledgeLookTimer;
int m_leftRightScrollPosition;
enum