This commit is contained in:
Paul 2001-07-21 18:39:43 +00:00
parent 0c81c7db46
commit 8dfb2b0591
3 changed files with 10 additions and 4 deletions

View File

@ -219,7 +219,6 @@ static const char *s_modeText[NUM_PLAYERMODES]=
#endif #endif
int s_screenPos;
int m_cameraLookOffset; int m_cameraLookOffset;
int MAP2D_CENTRE_X=-(INGAME_SCREENW/2); int MAP2D_CENTRE_X=-(INGAME_SCREENW/2);
@ -645,7 +644,7 @@ m_animFrame=0;
m_lastPadInput=m_padInput=PI_NONE; m_lastPadInput=m_padInput=PI_NONE;
s_screenPos=128; setCartCam(false);
resetPlayerCollisionSizeToBase(); resetPlayerCollisionSizeToBase();
@ -702,7 +701,6 @@ void CPlayer::shutdown()
static int oldmode=-1; static int oldmode=-1;
int newmode=-1; int newmode=-1;
void CPlayer::think(int _frames) void CPlayer::think(int _frames)
{ {
int i; int i;
@ -907,6 +905,12 @@ if(PadGetDown(0)&PAD_TRIANGLE)
} }
// Camera scroll.. // Camera scroll..
if(m_cartCamActive)
{
// Just force the cam eo think we are running right so that the cam
// is always in the right place when in a cart
m_cameraXScrollDir=-1;
}
if(m_cameraXScrollDir==-1) if(m_cameraXScrollDir==-1)
{ {
if(m_cameraXScrollPos>-(CAMERA_SCROLLLIMIT*CAMERA_TILESIZE)<<CAMERA_ACCURACYSHIFT) if(m_cameraXScrollPos>-(CAMERA_SCROLLLIMIT*CAMERA_TILESIZE)<<CAMERA_ACCURACYSHIFT)

View File

@ -237,7 +237,7 @@ public:
int isTryingToConversateWithFriend() {return m_allowConversation;} int isTryingToConversateWithFriend() {return m_allowConversation;}
DVECTOR getCameraPos() {return m_cameraPos;} DVECTOR getCameraPos() {return m_cameraPos;}
void setCartCam(int _flag) {m_cartCamActive=_flag;}
void setCameraBox(CameraBox _cameraBox); void setCameraBox(CameraBox _cameraBox);
void setRespawnPos(DVECTOR _respawn) {m_respawnPos=_respawn;} void setRespawnPos(DVECTOR _respawn) {m_respawnPos=_respawn;}
void setRespawnPosAndRingTelephone(DVECTOR _respawn); void setRespawnPosAndRingTelephone(DVECTOR _respawn);
@ -328,6 +328,7 @@ private:
int m_animNo; int m_animNo;
CActorGfx *m_actorGfx; CActorGfx *m_actorGfx;
int m_cartCamActive;
int m_lockCamera; int m_lockCamera;
DVECTOR m_cameraPos; DVECTOR m_cameraPos;
DVECTOR m_currentCamFocusPointTarget; DVECTOR m_currentCamFocusPointTarget;

View File

@ -61,6 +61,7 @@
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
void CPlayerModeCart::enter() void CPlayerModeCart::enter()
{ {
m_player->setCartCam(true);
setState( STATE_CART ); setState( STATE_CART );
} }