From 7dd164eb1e787ace480b27282eac00277c4654ca Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Fri, 13 Feb 2015 12:08:13 +0100 Subject: [PATCH] Minigame config to its own file --- defaultXonotic.cfg | 3 +-- minigames.cfg | 13 +++++++++++++ qcsrc/common/minigames/minigame/pong.qc | 15 +++++++++------ 3 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 minigames.cfg diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index c8321edbc..ed5b33f1e 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1100,8 +1100,6 @@ seta cl_gentle_damage 0 "client side gentle mode (only replaces damage flash); set g_jetpack 0 "Jetpack mutator" set g_running_guns 0 "... or wonder, till it drives you mad, what would have followed if you had." -set sv_minigames 1 "Allow minigames" -set sv_minigames_observer 1 "Force minigame players to be observers. 0: don't move them to observer, 1: move them to observer, 2: force observer" set _urllib_nextslot 0 "temp variable" set cl_warpzone_usetrace 1 "do not touch" @@ -1399,6 +1397,7 @@ exec gamemodes.cfg exec mutators.cfg exec notifications.cfg exec monsters.cfg +exec minigames.cfg // load console command aliases and settings exec commands.cfg diff --git a/minigames.cfg b/minigames.cfg new file mode 100644 index 000000000..1ce3770c0 --- /dev/null +++ b/minigames.cfg @@ -0,0 +1,13 @@ +set sv_minigames 1 "Allow minigames" +set sv_minigames_observer 1 "Force minigame players to be observers. 0: don't move them to observer, 1: move them to observer, 2: force observer" + +// Pong +set sv_minigames_pong_paddle_size 0.3 "Paddle length relative to the board size" +set sv_minigames_pong_paddle_speed 0.8 "Paddle speed (board size per second)" + +set sv_minigames_pong_ball_wait 1 "Number of seconds between reset and throw" +set sv_minigames_pong_ball_speed 1 "Ball speed (board size per second)" +set sv_minigames_pong_ball_radius 0.03125 "Ball radius relative to the board size" + +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 diff --git a/qcsrc/common/minigames/minigame/pong.qc b/qcsrc/common/minigames/minigame/pong.qc index 416158acf..151356786 100644 --- a/qcsrc/common/minigames/minigame/pong.qc +++ b/qcsrc/common/minigames/minigame/pong.qc @@ -23,12 +23,15 @@ const int PONG_MAX_PLAYERS = 4; #ifdef SVQC -float autocvar_sv_minigames_pong_paddle_size = 0.3; -float autocvar_sv_minigames_pong_paddle_speed = 0.75; -float autocvar_sv_minigames_pong_ball_wait = 1; -float autocvar_sv_minigames_pong_ball_speed = 1; -float autocvar_sv_minigames_pong_ai_thinkspeed = 0.1; -float autocvar_sv_minigames_pong_ai_tolerance = 0.33; +float autocvar_sv_minigames_pong_paddle_size; +float autocvar_sv_minigames_pong_paddle_speed; + +float autocvar_sv_minigames_pong_ball_wait; +float autocvar_sv_minigames_pong_ball_speed; +float autocvar_sv_minigames_pong_ball_radius; + +float autocvar_sv_minigames_pong_ai_thinkspeed; +float autocvar_sv_minigames_pong_ai_tolerance; void pong_ball_think(); -- 2.39.2