From e5b662468ece7f68b9c2aeb6793784f415522f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Mon, 21 Oct 2019 20:24:15 +0200 Subject: [PATCH] Fire up/down --- constants.h | 2 +- main.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/constants.h b/constants.h index 5586081..bb49866 100644 --- a/constants.h +++ b/constants.h @@ -69,6 +69,6 @@ /** Speed of rocket projectile, in squares per second. */ -#define SFG_ROCKET_SPEED 16 +#define SFG_ROCKET_SPEED 20 #endif // guard diff --git a/main.c b/main.c index d08a924..90d8a17 100755 --- a/main.c +++ b/main.c @@ -1209,7 +1209,11 @@ RCL_Vector2D dir = RCL_angleToDirection(SFG_player.camera.direction); p.direction[0] = (dir.x * SFG_ROCKER_MOVE_UNITS_PER_FRAME) / RCL_UNITS_PER_SQUARE; p.direction[1] = (dir.y * SFG_ROCKER_MOVE_UNITS_PER_FRAME) / RCL_UNITS_PER_SQUARE; -p.direction[2] = 0; +p.direction[2] = + (SFG_player.camera.shear * SFG_ROCKER_MOVE_UNITS_PER_FRAME) / + SFG_CAMERA_MAX_SHEAR_PIXELS; + + SFG_createProjectile(p);