Fixed camera
This commit is contained in:
parent
23b98fd3d4
commit
35c1214270
|
@ -18,8 +18,8 @@ void cameraMove() // only vertical movement
|
|||
{
|
||||
static int camera_vy=0;
|
||||
|
||||
if (MKB_getKeyState(MK_UP) && abs(delta_y)<24) { camera_vy=0; delta_y-=4;}
|
||||
if (MKB_getKeyState(MK_DOWN) && abs(delta_y)<24) { camera_vy=0; delta_y+=4;}
|
||||
if (MKB_getKeyState(MK_UP) && (abs(delta_y)<20 || delta_y>=0)) { delta_y-=4;}
|
||||
if (MKB_getKeyState(MK_DOWN) && (abs(delta_y)<20 || delta_y<=0)) { delta_y+=4;}
|
||||
if (!MKB_getKeyState(MK_DOWN) && !MKB_getKeyState(MK_UP)) delta_y-=4*sgn(delta_y);
|
||||
|
||||
if (mario.p.y==last_vy) immobile++;
|
||||
|
|
Loading…
Reference in New Issue