a number of fixes.
authorFruitieX <fruitiex@gmail.com>
Mon, 15 Nov 2010 22:31:29 +0000 (00:31 +0200)
committerFruitieX <fruitiex@gmail.com>
Mon, 15 Nov 2010 22:31:29 +0000 (00:31 +0200)
defaultXonotic.cfg
qcsrc/server/arena.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/g_damage.qc
scripts/ice.shader

index b5958a8..898be9e 100644 (file)
@@ -606,8 +606,9 @@ set g_freezetag 0 "Freeze Tag: Freeze the opposing team(s) to win, unfreeze team
 seta g_freezetag_warmup 5 "Time players get to run around before the round starts"
 seta g_freezetag_point_limit -1        "Freeze Tag point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta g_freezetag_point_leadlimit -1    "Freeze Tag point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_freezetag_revive_time 5 "Time it takes to revive a frozen teammate"
+seta g_freezetag_revive_time 3 "Time it takes to revive a frozen teammate"
 seta g_freezetag_revive_extra_size 100 "Distance in qu that you can stand from a frozen teammate to keep reviving him"
+seta g_freezetag_frozen_force 0.25 "How much to multiply the force on a frozen player with"
 
 // 50% of the spawns shall be far away from any players
 set g_spawn_furthest 0.5
index 2fad095..85d4b71 100644 (file)
@@ -96,6 +96,11 @@ void reset_map(float dorespawn)
                                self.classname = "player";
                                PutClientInServer();
                        }
+                       else if(g_freezetag)
+                       {
+                               if(self.classname == "player")
+                                       PutClientInServer();
+                       }
                        else
                        {
                                /*
@@ -196,7 +201,7 @@ void Arena_Warmup()
        float f;
        string msg;
 
-       if((!g_arena && !g_ca) || (g_arena && !arena_roundbased) || (time < game_starttime))
+       if((!g_arena && !g_ca && !g_freezetag) || (g_arena && !arena_roundbased) || (time < game_starttime))
                return;
 
        f = ceil(warmup - time);
index a2943a7..8d4bdf6 100644 (file)
@@ -595,12 +595,16 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                        }
                }
 
-               // become fully visible
-               self.alpha = 1;
-               // clear selected player display
-               ClearSelectedPlayer();
-               // throw a weapon
-               SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);
+               if(!g_freezetag)
+               {
+                       // become fully visible
+                       self.alpha = 1;
+                       // clear selected player display
+                       ClearSelectedPlayer();
+                       // throw a weapon
+                       SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);
+               }
+
                // print an obituary message
                Obituary (attacker, inflictor, self, deathtype);
                race_PreDie();
@@ -611,6 +615,9 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                frag_target = self;
                MUTATOR_CALLHOOK(PlayerDies);
 
+               if(g_freezetag)
+                       return;
+
                if(self.flagcarried)
                {
                        if(attacker.classname != "player" && attacker.classname != "gib")
index 45af9a9..5b76539 100644 (file)
@@ -313,6 +313,9 @@ void W_WeaponFrame()
        if(((arena_roundbased || g_ca || g_freezetag) && time < warmup) || ((time < game_starttime) && !cvar("sv_ready_restart_after_countdown")))
                return;
 
+       if(g_freezetag && self.freezetag_frozen == 1)
+               return;
+
        if (!self.weaponentity || self.health < 1)
                return; // Dead player can't use weapons and injure impulse commands
 
index 460c608..1a4ce71 100644 (file)
@@ -526,6 +526,15 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                if (attacker.isbot)
                        damage = damage * bound(0.1, (skill + 5) * 0.1, 1);
 
+               if(g_freezetag)
+               {
+                       if(targ.freezetag_frozen == 1)
+                       {
+                               damage = 0;
+                               force = force * cvar("g_freezetag_frozen_force");
+                       }
+               }
+
                // nullify damage if teamplay is on
                if(deathtype != DEATH_TELEFRAG)
                if(attacker.classname == "player")
index 368dcb8..edac84d 100644 (file)
@@ -1,4 +1,4 @@
-models/ice/ice.tga
+models/ice/ice
 {
        cull none
        dpnoshadow
@@ -8,4 +8,4 @@ models/ice/ice.tga
        blendfunc add
        rgbgen vertex
  }
-}
\ No newline at end of file
+}