]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Minigame config to its own file
authorMattia Basaglia <mattia.basaglia@gmail.com>
Fri, 13 Feb 2015 11:08:13 +0000 (12:08 +0100)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Fri, 13 Feb 2015 11:08:13 +0000 (12:08 +0100)
defaultXonotic.cfg
minigames.cfg [new file with mode: 0644]
qcsrc/common/minigames/minigame/pong.qc

index c8321edbc21261e68996de29b241655ff0fe5474..ed5b33f1e280fa9485282915f7557c5b65b6b0be 100644 (file)
@@ -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 (file)
index 0000000..1ce3770
--- /dev/null
@@ -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
index 416158acf236fb34dfc68fe00bfbdffacd946607..151356786ac50e73c48ff977f9b11ce5f564e320 100644 (file)
@@ -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();