From: DeaDDooMER Date: Tue, 4 Apr 2017 15:23:28 +0000 (+0300) Subject: Поправлены тайминги, теперь скорости точно не зависят от количества тиков. :) X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=2ceffd99eed505ef125b04342304ed87df860d5f;p=netwar.git Поправлены тайминги, теперь скорости точно не зависят от количества тиков. :) --- diff --git a/game.c b/game.c index 896fb8e..4b1c345 100644 --- a/game.c +++ b/game.c @@ -6,9 +6,9 @@ #include "game.h" -#define SPEED (0.000006 * TICK_DELAY) -#define ROTATE (0.000006 * TICK_DELAY) -#define BULL_SPEED (0.0008 * TICK_DELAY) +#define SPEED (0.03 / TICK) +#define ROTATE (0.03 / TICK) +#define BULL_SPEED (0.4 / TICK) Player g_player[MAX_PLAYERS]; Bullet g_bullet[MAX_BULLETS]; diff --git a/game.h b/game.h index 00b06cc..8568721 100644 --- a/game.h +++ b/game.h @@ -4,10 +4,11 @@ #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 * 1) // Can shoot every 1.0s (less then 1s not work) +#define TICK 24 // 24 World updates per second +#define TICK_DELAY (1000 / TICK) // World freeze time ms +#define BULLET_TIME (TICK * 6) // Bullet live time 6.0s +#define PLAYER_SIZE 0.01785 // Palyer radius +#define PLAYER_SHOOT (TICK * 0.8) // Can shoot every 1.0s (less then 1s not work) typedef struct Player { /* public */