]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/wepent_experimental
authorMario <mario@smbclan.net>
Thu, 6 Oct 2016 12:54:47 +0000 (22:54 +1000)
committerMario <mario@smbclan.net>
Thu, 6 Oct 2016 12:54:47 +0000 (22:54 +1000)
# Conflicts:
# qcsrc/common/mutators/mutator/overkill/sv_overkill.qc

balance-overkill.cfg
qcsrc/client/hud/panel/centerprint.qc
qcsrc/common/mutators/mutator/melee_only/sv_melee_only.qc
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qh
qcsrc/server/command/common.qc

index c7fa105ba879df936fd9cf3093203b8b78433fd2..c55241962ba5817ff3d0e4df00fb09a3d023ece6 100644 (file)
@@ -106,7 +106,7 @@ set g_pickup_respawntimejitter_ammo 0
 // {{{ regen/rot
 set g_balance_health_regen 0
 set g_balance_health_regenlinear 100
-set g_balance_pause_health_regen 5
+set g_balance_pause_health_regen 2
 set g_balance_pause_health_regen_spawn 0
 set g_balance_health_rot 0
 set g_balance_health_rotlinear 1
index 5b80690101b089e0e2cd15df07d40aa05bb9356a..f67cbffbd04d176160d072b1e6bddcbfe3e045b0 100644 (file)
@@ -1,6 +1,7 @@
 #include "centerprint.qh"
 
 #include "scoreboard.qh"
+#include <common/notifications/all.qh>
 
 // CenterPrint (#16)
 
@@ -246,6 +247,9 @@ void HUD_CenterPrint ()
                else // Expiring soon, so fade it out.
                        a = (centerprint_expire_time[j] - time) / max(0.0001, autocvar_hud_panel_centerprint_fade_out);
 
+               if(centerprint_msgID[j] == CPID_TIMEIN)
+                       a = 1;
+
                // while counting down show it anyway in order to hold the current message position
                if (a <= 0.5/255.0 && centerprint_countdown_num[j] == 0)  // Guaranteed invisible - don't show.
                        continue;
index 89fdfaf9ed842eee0e97e21cf0090b853abb0e1f..a8347499841b77d034adb39efac4853400343f29 100644 (file)
@@ -1,6 +1,6 @@
 #include "sv_melee_only.qh"
 
-REGISTER_MUTATOR(melee_only, cvar("g_melee_only") && !cvar("g_instagib") && !g_nexball);
+REGISTER_MUTATOR(melee_only, cvar("g_melee_only") && !cvar("g_instagib") && !cvar("g_overkill") && !g_nexball);
 
 MUTATOR_HOOKFUNCTION(melee_only, SetStartItems, CBC_ORDER_LAST)
 {
index 7201aaa0d8d4c6ecc96e68e21cc16efa5d2059d2..cbc49be16513fa5d1cebbb2d3ed1724368f05910 100644 (file)
@@ -13,8 +13,6 @@ bool autocvar_g_overkill_100a_anyway;
 .Weapon ok_lastwep[MAX_WEAPONSLOTS];
 .float ok_item;
 
-.float ok_pauseregen_finished;
-
 void ok_Initialize();
 
 REGISTER_MUTATOR(ok, cvar("g_overkill") && !cvar("g_instagib") && !g_nexball && cvar_string("g_mod_balance") == "Overkill")
@@ -50,22 +48,13 @@ MUTATOR_HOOKFUNCTION(ok, PlayerDamage_Calculate, CBC_ORDER_LAST)
                if(!IS_DEAD(frag_target))
                {
                        Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE);
-                       M_ARGV(6, vector) = '0 0 0';
+                       M_ARGV(6, vector) = '0 0 0'; // force
                }
 
-               M_ARGV(4, float) = 0;
+               M_ARGV(4, float) = 0; // damage
        }
 }
 
-MUTATOR_HOOKFUNCTION(ok, PlayerDamage_SplitHealthArmor)
-{
-       entity frag_target = M_ARGV(2, entity);
-       float damage_take = M_ARGV(4, float);
-
-       if(damage_take)
-               frag_target.ok_pauseregen_finished = max(frag_target.ok_pauseregen_finished, time + 2);
-}
-
 void ok_DropItem(entity this, entity targ)
 {
        entity e = new(droppedweapon); // hax
@@ -114,30 +103,6 @@ MUTATOR_HOOKFUNCTION(ok, MonsterDropItem)
        ok_DropItem(mon, frag_attacker);
 }
 
-MUTATOR_HOOKFUNCTION(ok, PlayerRegen)
-{
-       entity player = M_ARGV(0, entity);
-
-       // overkill's values are different, so use custom regen
-       if(!STAT(FROZEN, player))
-       {
-               player.armorvalue = CalcRotRegen(player.armorvalue, autocvar_g_balance_armor_regenstable, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear,
-                       1 * frametime * (time > player.ok_pauseregen_finished), 0, 0, 1, 1 * frametime * (time > player.pauserotarmor_finished), autocvar_g_balance_armor_limit);
-               player.health = CalcRotRegen(player.health, autocvar_g_balance_health_regenstable, 0, 100, 1 * frametime * (time > player.ok_pauseregen_finished), 200, 0,
-                       autocvar_g_balance_health_rotlinear, 1 * frametime * (time > player.pauserothealth_finished), autocvar_g_balance_health_limit);
-
-               float minf, maxf, limitf;
-
-               maxf = autocvar_g_balance_fuel_rotstable;
-               minf = autocvar_g_balance_fuel_regenstable;
-               limitf = autocvar_g_balance_fuel_limit;
-
-               player.ammo_fuel = CalcRotRegen(player.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear,
-                       frametime * (time > player.pauseregen_finished) * ((player.items & ITEM_JetpackRegen.m_itemid) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > player.pauserotfuel_finished), limitf);
-       }
-       return true; // return true anyway, as frozen uses no regen
-}
-
 MUTATOR_HOOKFUNCTION(ok, ForbidThrowCurrentWeapon)
 {
        return true;
@@ -171,7 +136,8 @@ MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
        }
 
        if(PHYS_INPUT_BUTTON_ATCK2(player))
-       if(!forbidWeaponUse(player) || player.weapon_blocked) // allow if weapon is blocked
+       if( !forbidWeaponUse(player) || player.weapon_blocked // allow if weapon is blocked
+               || (round_handler_IsActive() && !round_handler_IsRoundStarted()) )
        if(time >= player.jump_interval)
        {
                player.jump_interval = time + WEP_CVAR_PRI(blaster, refire) * W_WeaponRateFactor(player);
@@ -219,8 +185,6 @@ MUTATOR_HOOKFUNCTION(ok, PlayerSpawn)
                        player.ok_lastwep[slot] = WEP_Null;
                }
        }
-
-       player.ok_pauseregen_finished = time + 2;
 }
 
 void self_spawnfunc_weapon_hmg(entity this) { spawnfunc_weapon_hmg(this); }
index 43a94c80eee95c71f51f877e80c58b6cbdecc289..a6431cf673810c1625552fc2418c644738c3e8ad 100644 (file)
     MSG_CENTER_NOTIF(TEAMCHANGE_SUICIDE,                1,      0, 1, "",               CPID_TEAMCHANGE,        "1 f1", _("^K1Suicide in ^COUNT"), "")
 
     MSG_CENTER_NOTIF(TIMEOUT_BEGINNING,                 1,      0, 1, "",               CPID_TIMEOUT,           "1 f1", _("^F4Timeout begins in ^COUNT"), "")
-    MSG_CENTER_NOTIF(TIMEOUT_ENDING,                    1,      0, 1, "",               CPID_TIMEOUT,           "1 f1", _("^F4Timeout ends in ^COUNT"), "")
+    MSG_CENTER_NOTIF(TIMEOUT_ENDING,                    1,      0, 1, "",               CPID_TIMEIN,            "1 f1", _("^F4Timeout ends in ^COUNT"), "")
 
     MSG_CENTER_NOTIF(JOIN_PREVENT_MINIGAME,             1,      0, 0, "",               CPID_Null,              "0 0",  _("^K1Cannot join given minigame session!"), "" )
 
index e7a02dd65947354eec106c17a68275eebfeb2a85..d2682a148f70c937ea202d0ed7e1b1822109b114 100644 (file)
@@ -65,6 +65,7 @@ ENUMCLASS(CPID)
        CASE(CPID, RACE_FINISHLAP)
        CASE(CPID, TEAMCHANGE)
        CASE(CPID, TIMEOUT)
+       CASE(CPID, TIMEIN)
        CASE(CPID, VEHICLES)
        CASE(CPID, VEHICLES_OTHER)
        /** always last */
index 35418a02f07d420a9e0805f341a73cbaa6632ca5..ec1f9c89fa7adce3f5887a553f998c701faec3f7 100644 (file)
@@ -210,6 +210,7 @@ void timeout_handler_think(entity this)
                        }
                        else  // time to end the timeout
                        {
+                               Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_TIMEIN);
                                timeout_status = TIMEOUT_INACTIVE;
 
                                // reset the slowmo value back to normal