]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Freeze Tag. It compiles. Untested. (don't test :P)
authorFruitieX <fruitiex@gmail.com>
Mon, 15 Nov 2010 21:15:22 +0000 (23:15 +0200)
committerFruitieX <fruitiex@gmail.com>
Mon, 15 Nov 2010 21:15:22 +0000 (23:15 +0200)
14 files changed:
models/ice/ice.md3 [new file with mode: 0644]
models/ice/ice.tga [new file with mode: 0644]
models/ice/ice_gloss.tga [new file with mode: 0644]
models/ice/ice_glow.tga [new file with mode: 0644]
models/ice/ice_norm.tga [new file with mode: 0644]
models/ice/ice_reflect.tga [new file with mode: 0644]
models/ice/iceshard.md3 [new file with mode: 0644]
qcsrc/common/constants.qh
qcsrc/server/arena.qc
qcsrc/server/defs.qh
qcsrc/server/mutators/mutators.qh
qcsrc/server/progs.src
qcsrc/server/teamplay.qc
scripts/ice.shader [new file with mode: 0644]

diff --git a/models/ice/ice.md3 b/models/ice/ice.md3
new file mode 100644 (file)
index 0000000..fc5cad6
Binary files /dev/null and b/models/ice/ice.md3 differ
diff --git a/models/ice/ice.tga b/models/ice/ice.tga
new file mode 100644 (file)
index 0000000..87e95b3
Binary files /dev/null and b/models/ice/ice.tga differ
diff --git a/models/ice/ice_gloss.tga b/models/ice/ice_gloss.tga
new file mode 100644 (file)
index 0000000..9841865
Binary files /dev/null and b/models/ice/ice_gloss.tga differ
diff --git a/models/ice/ice_glow.tga b/models/ice/ice_glow.tga
new file mode 100644 (file)
index 0000000..7e4c972
Binary files /dev/null and b/models/ice/ice_glow.tga differ
diff --git a/models/ice/ice_norm.tga b/models/ice/ice_norm.tga
new file mode 100644 (file)
index 0000000..051af66
Binary files /dev/null and b/models/ice/ice_norm.tga differ
diff --git a/models/ice/ice_reflect.tga b/models/ice/ice_reflect.tga
new file mode 100644 (file)
index 0000000..1f82c2a
Binary files /dev/null and b/models/ice/ice_reflect.tga differ
diff --git a/models/ice/iceshard.md3 b/models/ice/iceshard.md3
new file mode 100644 (file)
index 0000000..82728cb
Binary files /dev/null and b/models/ice/iceshard.md3 differ
index 4acf797b7dddfc7974315f23c4f5e506d2a7e500..f3150439a8db86276ff5e94e05fdd1f93950ab0d 100644 (file)
@@ -39,6 +39,7 @@ const float GAME_RACE = 11;
 const float GAME_NEXBALL = 12;
 const float GAME_CTS = 13;
 const float GAME_CA            = 14;
+const float GAME_FREEZETAG             = 15;
 
 const float AS_STRING          = 1;
 const float AS_INT             = 2;
index 046743151dbc02fd27dbd706a77d8065418397b6..b80a2830cd9748383a6b604ac4da56e887f7400d 100644 (file)
@@ -262,8 +262,8 @@ void Arena_Warmup()
 
 float next_round;
 float stopalivecheck;
-float redalive, bluealive;
-.float redalive_stat, bluealive_stat;
+float redalive, bluealive, yellowalive, pinkalive;
+.float redalive_stat, bluealive_stat, yellowalive_stat, pinkalive_stat;
 /**
  * This function finds out whether an arena round is over 1 player is left.
  * It determines the last player who's still alive and saves it's entity reference
@@ -289,6 +289,22 @@ void Spawnqueue_Check()
                        self.bluealive_stat = bluealive;
                }
        }
+       else if(g_freezetag)
+       {
+               redalive = 0; bluealive = 0;
+               FOR_EACH_PLAYER(self) {
+                       if (self.team == COLOR_TEAM1 && self.freezetag_frozen == 0 && self.health >= 1) redalive += 1;
+                       else if (self.team == COLOR_TEAM2 && self.freezetag_frozen == 0 && self.health >= 1) bluealive += 1;
+                       else if (self.team == COLOR_TEAM3 && self.freezetag_frozen == 0 && self.health >= 1) yellowalive += 1;
+                       else if (self.team == COLOR_TEAM4 && self.freezetag_frozen == 0 && self.health >= 1) pinkalive += 1;
+               }
+               FOR_EACH_PLAYER(self) {
+                       self.redalive_stat = redalive;
+                       self.bluealive_stat = bluealive;
+                       self.yellowalive_stat = yellowalive;
+                       self.pinkalive_stat = pinkalive;
+               }
+       }
        if(time < warmup + 1 || inWarmupStage)
                return;
 
index d369298a56cd5b679a7113934831a7878d2476ba..31f103e30c5df3adb53943d7d765c98da8cd023b 100644 (file)
@@ -17,7 +17,7 @@ float require_spawnfunc_prefix; // if this float exists, only functions with spa
 
 float ctf_score_value(string parameter);
 
-float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_ca, g_lms, g_runematch, g_race, g_nexball, g_cts;
+float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_ca, g_lms, g_runematch, g_race, g_nexball, g_cts, g_freezetag;
 float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_midair, g_minstagib, g_pinata, g_norecoil, g_minstagib_invis_alpha, g_bloodloss;
 float g_warmup_limit;
 float g_warmup_allguns;
@@ -661,3 +661,6 @@ float allowed_to_spawn; // boolean variable used by the clan arena code to deter
 float serverflags;
 
 .float team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
+
+.float freezetag_frozen;
+.float freezetag_beginrevive_time;
index 542014e8691275dfe11870f8d97118036f5f846e..a57db07fd2f256099c587e2839dae87a52ea56af 100644 (file)
@@ -1,4 +1,5 @@
 MUTATOR_DECLARATION(gamemode_keyhunt);
+MUTATOR_DECLARATION(gamemode_freezetag);
 
 MUTATOR_DECLARATION(mutator_nix);
 MUTATOR_DECLARATION(mutator_dodging);
index c2718d4e8642d69e006bc84400a4ff442d235b39..b9d7fc1d65757940df1afe36414942dd805fd4b5 100644 (file)
@@ -177,6 +177,7 @@ cheats.qc
 
 mutators/base.qc
 mutators/gamemode_keyhunt.qc
+mutators/gamemode_freezetag.qc
 mutators/mutator_nix.qc
 mutators/mutator_dodging.qc
 mutators/mutator_rocketflying.qc
index b9064c783b852a515586ade5e0826b3323380bf9..78891a29d2f877182ded6a22883f26c6ddeeba23 100644 (file)
@@ -317,6 +317,16 @@ void InitGameplayMode()
                MUTATOR_ADD(gamemode_keyhunt);
        }
 
+       if(g_freezetag)
+       {
+               game = GAME_FREEZETAG;
+               gamemode_name = "Freeze Tag";
+               ActivateTeamplay();
+               fraglimit_override = cvar("g_freezetag_point_limit");
+               leadlimit_override = cvar("g_freezetag_point_leadlimit");
+               MUTATOR_ADD(gamemode_freezetag);
+       }
+
        if(g_assault)
        {
                game = GAME_ASSAULT;
diff --git a/scripts/ice.shader b/scripts/ice.shader
new file mode 100644 (file)
index 0000000..368dcb8
--- /dev/null
@@ -0,0 +1,11 @@
+models/ice/ice.tga
+{
+       cull none
+       dpnoshadow
+       dpreflectcube cubemaps/default/sky
+ {
+       map models/ice/ice.tga
+       blendfunc add
+       rgbgen vertex
+ }
+}
\ No newline at end of file