set sv_minigames_pong_ball_number 1 "Number of balls to be played at once"
set sv_minigames_pong_ai_thinkspeed 0.1 "Seconds between AI actions"
-set sv_minigames_pong_ai_tolerance 0.33 "Distance of the ball relative to the paddle size"
\ No newline at end of file
+set sv_minigames_pong_ai_tolerance 0.33 "Distance of the ball relative to the paddle size"
+
+
+// Snake? Snake! SNAAAAKE!!
+set sv_minigames_snake_delay_initial 0.7 "Initial delay between snake movement"
+set sv_minigames_snake_delay_multiplier 50 "Multiplier of incremental of movement speed (player_score / cvar)"
if ( sf & MINIG_SF_CREATE )
{
- LOG_TRACE("CL Reading entity: ",ftos(num_for_edict(self)),
- " classname:",self.classname," enttype:",ftos(self.enttype) );
- LOG_TRACE(" sf:",ftos(sf)," netname:",self.netname,"\n\n");
+ //LOG_TRACE("CL Reading entity: ",ftos(num_for_edict(self)),
+ // " classname:",self.classname," enttype:",ftos(self.enttype) );
+ //LOG_TRACE(" sf:",ftos(sf)," netname:",self.netname,"\n\n");
}
}
#undef ReadString
const int SNAKE_TILE_SIZE = 15;
-const int SNAKE_DELAY_INITIAL = 0.7;
+float autocvar_sv_minigames_snake_delay_initial = 0.7;
+float autocvar_sv_minigames_snake_delay_multiplier = 50;
.int snake_score;
.entity snake_head;
void snake_new_mouse(entity minigame)
{
RandomSelection_Init();
- for(int i = 0; i < SNAKE_LET_CNT; ++i)
- for(int j = 0; j < SNAKE_NUM_CNT; ++j)
+ int i, j;
+ for(i = 0; i < SNAKE_LET_CNT; ++i)
+ for(j = 0; j < SNAKE_NUM_CNT; ++j)
{
string pos = minigame_tile_buildname(i, j);
if(!snake_find_piece(minigame, pos))
if(tail && ate_mouse)
{
int newcnt = tail.cnt + 1;
- minigame.snake_delay = max(0.1, SNAKE_DELAY_INITIAL - (newcnt / 100));
+ minigame.snake_delay = max(0.1, autocvar_sv_minigames_snake_delay_initial - (newcnt / autocvar_sv_minigames_snake_delay_multiplier));
snake_add_score(minigame, 1);
entity piece = msle_spawn(minigame,"minigame_board_piece");
case "start":
{
snake_setup_pieces(minigame);
- minigame.snake_delay = SNAKE_DELAY_INITIAL;
+ minigame.snake_delay = autocvar_sv_minigames_snake_delay_initial;
minigame.minigame_flags = SNAKE_TURN_WAIT;
return true;
}