From: DeaDDooMER Date: Mon, 3 Apr 2017 08:17:29 +0000 (+0300) Subject: Скорости не зависят от количества тиков X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=db7f47cfc17c652a825f7c059ca4a0f3c73a596c;p=netwar.git Скорости не зависят от количества тиков --- diff --git a/game.c b/game.c index cacaf62..896fb8e 100644 --- a/game.c +++ b/game.c @@ -6,9 +6,9 @@ #include "game.h" -#define SPEED 0.00006 -#define ROTATE 0.00004 -#define BULL_SPEED 0.00800 +#define SPEED (0.000006 * TICK_DELAY) +#define ROTATE (0.000006 * TICK_DELAY) +#define BULL_SPEED (0.0008 * TICK_DELAY) Player g_player[MAX_PLAYERS]; Bullet g_bullet[MAX_BULLETS]; diff --git a/game.h b/game.h index a2d44b4..00b06cc 100644 --- a/game.h +++ b/game.h @@ -4,10 +4,10 @@ #define MAX_PLAYERS 32 #define MAX_BULLETS (MAX_PLAYERS * 8) -#define TICK_DELAY (1000 / 20) // 20 World updates per second -#define BULLET_TIME (TICK_DELAY * 6) // Bullet live time 6.0s -#define PLAYER_SIZE 0.01785 // Palyer radius -#define PLAYER_SHOOT (TICK_DELAY * 0.3) // Can shoot every 0.15s +#define TICK_DELAY (1000 / 20) // 20 World updates per second +#define BULLET_TIME (TICK_DELAY * 6) // Bullet live time 6.0s +#define PLAYER_SIZE 0.01785 // Palyer radius +#define PLAYER_SHOOT (TICK_DELAY * 1) // Can shoot every 1.0s (less then 1s not work) typedef struct Player { /* public */