]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Lyberta/Survival' into Lyberta/master Lyberta/master
authorLyberta <lyberta@lyberta.net>
Wed, 22 Aug 2018 10:37:22 +0000 (13:37 +0300)
committerLyberta <lyberta@lyberta.net>
Wed, 22 Aug 2018 10:37:22 +0000 (13:37 +0300)
40 files changed:
gamemodes-server.cfg
mutators.cfg
qcsrc/client/hud/panel/modicons.qc
qcsrc/common/gamemodes/gamemode/_mod.inc
qcsrc/common/gamemodes/gamemode/_mod.qh
qcsrc/common/gamemodes/gamemode/gungame/_mod.inc [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/gungame/_mod.qh [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/gungame/sv_gungame.qc [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/gungame/sv_gungame.qh [new file with mode: 0644]
qcsrc/common/items/item.qh
qcsrc/common/items/item/armor.qh
qcsrc/common/items/item/health.qh
qcsrc/common/items/item/jetpack.qh
qcsrc/common/items/item/powerup.qh
qcsrc/common/mapinfo.qh
qcsrc/common/mutators/mutator/_mod.inc
qcsrc/common/mutators/mutator/_mod.qh
qcsrc/common/mutators/mutator/instagib/items.qh
qcsrc/common/mutators/mutator/sprint/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/sprint/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/sprint/sv_sprint.qc [new file with mode: 0644]
qcsrc/common/mutators/mutator/waypoints/all.inc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/physics/player.qh
qcsrc/common/stats.qh
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/blaster.qh
qcsrc/common/weapons/weapon/crylink.qh
qcsrc/common/weapons/weapon/devastator.qh
qcsrc/common/weapons/weapon/electro.qh
qcsrc/common/weapons/weapon/hagar.qh
qcsrc/common/weapons/weapon/machinegun.qh
qcsrc/common/weapons/weapon/minelayer.qh
qcsrc/common/weapons/weapon/mortar.qh
qcsrc/common/weapons/weapon/shotgun.qh
qcsrc/common/weapons/weapon/vortex.qh
qcsrc/menu/xonotic/keybinder.qc
qcsrc/menu/xonotic/util.qc
qcsrc/server/g_world.qc
randomitems-gungame.cfg [new file with mode: 0644]

index 5ebf628a1737045b741d54f64bcc31a1eec4e3cb..ed48d7c457079c6da642ada05d9c8ab9123c40d3 100644 (file)
@@ -28,6 +28,7 @@ alias sv_hook_gamestart_cts
 alias sv_hook_gamestart_ka
 alias sv_hook_gamestart_ft
 alias sv_hook_gamestart_inv
+alias sv_hook_gamestart_gg
 alias sv_hook_gamerestart
 alias sv_hook_gameend
 
@@ -47,6 +48,7 @@ alias sv_vote_gametype_hook_cts
 alias sv_vote_gametype_hook_dm
 alias sv_vote_gametype_hook_dom
 alias sv_vote_gametype_hook_ft
+alias sv_vote_gametype_hook_gg
 alias sv_vote_gametype_hook_inv
 alias sv_vote_gametype_hook_ka
 alias sv_vote_gametype_hook_kh
@@ -196,7 +198,13 @@ set g_inv_respawn_delay_large_count 0
 set g_inv_respawn_delay_max 0
 set g_inv_respawn_waves 0
 set g_inv_weapon_stay 0
-
+set g_gg_respawn_delay_small 0
+set g_gg_respawn_delay_small_count 0
+set g_gg_respawn_delay_large 0
+set g_gg_respawn_delay_large_count 0
+set g_gg_respawn_delay_max 0
+set g_gg_respawn_waves 0
+set g_gg_weapon_stay 0
 
 // =========
 //  assault
@@ -524,4 +532,11 @@ set g_invasion_teams 0 "number of teams in invasion (note: use mapinfo to set th
 set g_invasion_team_spawns 1 "use team spawns in teamplay invasion mode"
 set g_invasion_type 0 "type of invasion mode - 0: round-based, 1: hunting, 2: complete the stage (note: use mapinfo to set this)"
 
+// =========
+//  gungame
+// =========
+set g_gg 0 "GunGame: Kill players with all weapons"
+set g_gg_weapons "vortex mortar machinegun hagar arc electro devastator crylink shotgun blaster"
+set g_gg_kills_per_weapon 3 "Number of kills needed to advance to the next weapon"
+
 exec survival.cfg // Lyberta: surv
index afa17824980e02ddc6be90760b998ec8bfd8d1c5..5bb02883d65a123f14dc6b0653b3608cf69ca0b8 100644 (file)
@@ -3,6 +3,14 @@
 // =========================
 
 
+// ========
+//  sprint
+// ========
+set g_sprint 0 "whether to enable sprint"
+set g_sprint_speed_multiplier 1.5 "speed multiplier of sprinting"
+set g_sprint_in_air 1 "whether to increase air acceleration too"
+set g_sprint_cost 10 "amount of fuel that sprinting costs per second"
+
 // =========
 //  dodging
 // =========
index 7115d2d8309c02199e184887e685a258dfefcb30..1d9bae99dd36934131830996947a8636f99a5b1e 100644 (file)
@@ -705,6 +705,74 @@ void HUD_Mod_Dom(vector myPos, vector mySize)
        }
 }
 
+// GunGame
+
+/// \brief Duration of transition between the weapons pictures.
+const float gg_weapon_transition_duration = 0.5;
+
+int gg_current_weapon; ///< Current weapon.
+string gg_current_weapon_picture; ///< Current weapon picture.
+int gg_previous_weapon; ///< Previous weapon.
+string gg_previous_weapon_picture; ///< Previous weapon picture.
+float gg_weapon_change_time; ///< Time when the weapon changed.
+
+string GG_GetWeaponPicture(int weapon)
+{
+       FOREACH(Weapons, it != WEP_Null,
+       {
+               if (it.m_id == weapon)
+               {
+                       return it.model2;
+               }
+       });
+       return "";
+}
+
+void HUD_Mod_GG(vector pos, vector mySize)
+{
+       // Required in each mod function that always shows something.
+       mod_active = 1;
+       int stat_weapon = STAT(GUNGAME_LEADING_WEAPON);
+       if (stat_weapon != gg_current_weapon)
+       {
+               // New leading weapon.
+               gg_previous_weapon = gg_current_weapon;
+               gg_previous_weapon_picture = gg_current_weapon_picture;
+               gg_current_weapon = stat_weapon;
+               gg_current_weapon_picture = GG_GetWeaponPicture(gg_current_weapon);
+               gg_weapon_change_time = time;
+       }
+       vector pic_pos, pic_size;
+       if (mySize.x > mySize.y)
+       {
+               pic_pos = pos + eX * 0.25 * mySize.x;
+               pic_size = vec2(0.5 * mySize.x, mySize.y);
+       }
+       else
+       {
+               pic_pos = pos + eY * 0.25 * mySize.y;
+               pic_size = vec2(mySize.x, 0.5 * mySize.y);
+       }
+       float weapon_change_elapsed_time = time - gg_weapon_change_time;
+       // Weapon transition phase. 0 at the start of transition. 1 at the end.
+       float phase = bound(0, weapon_change_elapsed_time /
+               gg_weapon_transition_duration, 1);
+
+       // Draw current weapon picture. Fading in if phase is less than 1.
+       if (gg_current_weapon_picture)
+       {
+               drawpic_aspect_skin(pic_pos, gg_current_weapon_picture, pic_size,
+                       '1 1 1', phase, DRAWFLAG_NORMAL);
+       }
+       // Draw previous weapon picture on top of current one so it gives a nice
+       // fade out effect.
+       if ((phase < 1) && gg_previous_weapon_picture)
+       {
+               drawpic_aspect_skin_expanding(pic_pos, gg_previous_weapon_picture,
+                       pic_size, '1 1 1', 1 - phase, DRAWFLAG_NORMAL, phase);
+       }
+}
+
 // Lyberta: surv
 void HUD_Mod_SURV(vector mypos, vector mysize)
 {
index e37225e8e3361505e94b406ee1c9a0a031c98c41..1bf9f244ff11f8c14071ce06b41b2839279dcbd8 100644 (file)
@@ -7,6 +7,7 @@
 #include <common/gamemodes/gamemode/deathmatch/_mod.inc>
 #include <common/gamemodes/gamemode/domination/_mod.inc>
 #include <common/gamemodes/gamemode/freezetag/_mod.inc>
+#include <common/gamemodes/gamemode/gungame/_mod.inc>
 #include <common/gamemodes/gamemode/invasion/_mod.inc>
 #include <common/gamemodes/gamemode/keepaway/_mod.inc>
 #include <common/gamemodes/gamemode/keyhunt/_mod.inc>
index 549b321ca1f8ac37711adc0ab24d8f695d915ae1..094e3c0201fa08071b263f54eea2134db95e60c3 100644 (file)
@@ -7,6 +7,7 @@
 #include <common/gamemodes/gamemode/deathmatch/_mod.qh>
 #include <common/gamemodes/gamemode/domination/_mod.qh>
 #include <common/gamemodes/gamemode/freezetag/_mod.qh>
+#include <common/gamemodes/gamemode/gungame/_mod.qh>
 #include <common/gamemodes/gamemode/invasion/_mod.qh>
 #include <common/gamemodes/gamemode/keepaway/_mod.qh>
 #include <common/gamemodes/gamemode/keyhunt/_mod.qh>
diff --git a/qcsrc/common/gamemodes/gamemode/gungame/_mod.inc b/qcsrc/common/gamemodes/gamemode/gungame/_mod.inc
new file mode 100644 (file)
index 0000000..a0bb673
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#ifdef SVQC
+    #include <common/gamemodes/gamemode/gungame/sv_gungame.qc>
+#endif
diff --git a/qcsrc/common/gamemodes/gamemode/gungame/_mod.qh b/qcsrc/common/gamemodes/gamemode/gungame/_mod.qh
new file mode 100644 (file)
index 0000000..d97ca6f
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#ifdef SVQC
+    #include <common/gamemodes/gamemode/gungame/sv_gungame.qh>
+#endif
diff --git a/qcsrc/common/gamemodes/gamemode/gungame/sv_gungame.qc b/qcsrc/common/gamemodes/gamemode/gungame/sv_gungame.qc
new file mode 100644 (file)
index 0000000..75448fe
--- /dev/null
@@ -0,0 +1,229 @@
+/// \file
+/// \brief Source file that contains implementation of the GunGame gamemode.
+/// \author Lyberta
+/// \copyright GNU GPLv2 or any later version.
+
+#include "sv_gungame.qh"
+
+//============================ Constants ======================================
+
+const string GUNGAME_WEAPONS_CVAR = "g_gg_weapons";
+
+//======================= Global variables ====================================
+
+/// \brief Number of kills needed to advance to the next weapon.
+int autocvar_g_gg_kills_per_weapon;
+
+int gungame_max_level; ///< Player who reaches this level wins.
+string gungame_weapons; ///< Holds weapons corresponding to levels.
+
+entity gungame_leading_player; ///< Holds the leading player.
+int gungame_leading_level; ///< Holds the leading level.
+entity gungame_leading_weapon; ///< Holds the leading weapon.
+
+//====================== Forward declarations =================================
+
+/// \brief Resets the state to initial one.
+void GunGame_Reset();
+
+/// \brief Returns the weapon that corresponds to the given level.
+/// \param[in] level Level of the weapon.
+/// \return Weapon corresponding to the given level.
+entity GunGame_GetWeapon(int level);
+
+/// \brief Updates stats of all players.
+void GunGame_UpdateStats();
+
+//========================= Free functions ====================================
+
+void GunGame_Initialize()
+{
+       GunGame_Reset();
+}
+
+void GunGame_Reset()
+{
+       strcpy(gungame_weapons, cvar_string(GUNGAME_WEAPONS_CVAR));
+       gungame_max_level = tokenize_console(gungame_weapons) *
+               autocvar_g_gg_kills_per_weapon;
+       if (gungame_max_level == 0)
+       {
+               LOG_FATAL("GunGame: Invalid weapon configuration.");
+       }
+       GameRules_limit_score(gungame_max_level);
+       gungame_leading_player = NULL;
+       gungame_leading_level = 0;
+       gungame_leading_weapon = GunGame_GetWeapon(0);
+       GunGame_UpdateStats();
+}
+
+entity GunGame_GetWeapon(int level)
+{
+       if (level >= gungame_max_level)
+       {
+               return NULL;
+       }
+       tokenize_console(gungame_weapons);
+       string weapon = argv(floor(level / autocvar_g_gg_kills_per_weapon));
+       FOREACH(Weapons, it != WEP_Null,
+       {
+               if (it.netname == weapon)
+               {
+                       return it;
+               }
+       });
+       LOG_FATAL("GunGame_GetWeapon: Invalid level or weapon name");
+       return NULL;
+}
+
+/// \brief Returns the player level.
+/// \param[in] player Player to check.
+/// \return Level of the player.
+int GunGame_GetPlayerLevel(entity player)
+{
+       return PlayerScore_Get(player, SP_SCORE);
+}
+
+/// \brief Updates the information about the leading player.
+void GunGame_UpdateLeadingPlayer()
+{
+       entity previous_leader = gungame_leading_player;
+       FOREACH_CLIENT(true,
+       {
+               if (gungame_leading_player == NULL)
+               {
+                       gungame_leading_player = it;
+                       continue;
+               }
+               if (GunGame_GetPlayerLevel(it) > GunGame_GetPlayerLevel(
+                       gungame_leading_player))
+               {
+                       gungame_leading_player = it;
+               }
+       });
+       if (gungame_leading_player == NULL)
+       {
+               return;
+       }
+       if ((gungame_leading_player == previous_leader) &&
+               (GunGame_GetPlayerLevel(gungame_leading_player) ==
+               gungame_leading_level))
+       {
+               return;
+       }
+       gungame_leading_level = GunGame_GetPlayerLevel(gungame_leading_player);
+       gungame_leading_weapon = GunGame_GetWeapon(gungame_leading_level);
+       GunGame_UpdateStats();
+       //PrintToChatAll(strcat(gungame_leading_player.netname,
+       //      " is leading with level ", ftos(gungame_leading_level)));
+}
+
+void GunGame_UpdateStats()
+{
+       FOREACH_CLIENT(IS_REAL_CLIENT(it),
+       {
+               STAT(GUNGAME_LEADING_WEAPON, it) = gungame_leading_weapon.m_id;
+       });
+}
+
+/// \brief Gives the player a weapon that corresponds to their level.
+/// \param[in,out] player Player to give weapon to.
+void GunGame_GivePlayerWeapon(entity player)
+{
+       int level = GunGame_GetPlayerLevel(player);
+       if (level >= gungame_max_level)
+       {
+               return;
+       }
+       entity weapon = GunGame_GetWeapon(level);
+       STAT(WEAPONS, player) |= weapon.m_wepset;
+       centerprint(player, strcat("^3Level ", ftos(level + 1), ": ^2",
+               weapon.m_name));
+}
+
+//============================= Hooks ========================================
+
+/// \brief Hook that is called to determine if there is a weapon arena.
+MUTATOR_HOOKFUNCTION(gg, SetWeaponArena)
+{
+       //PrintToChatAll("SetWeaponArena");
+       M_ARGV(0, string) = "off";
+}
+
+/// \brief Hook that is called to determine start items of all players.
+MUTATOR_HOOKFUNCTION(gg, SetStartItems)
+{
+       //PrintToChatAll("SetStartItems");
+       start_weapons = WEPSET(Null);
+       warmup_start_weapons = WEPSET(Null);
+}
+
+/// \brief Hook that is called when an item is about to spawn.
+MUTATOR_HOOKFUNCTION(gg, FilterItemDefinition)
+{
+       //PrintToChatAll("FilterItemDefinition");
+       entity item = M_ARGV(0, entity);
+       if (item.instanceOfAmmo)
+       {
+               // Block ammo from spawning.
+               return true;
+       }
+       if (item.instanceOfWeaponPickup)
+       {
+               // Block weapons from spawning.
+               return true;
+       }
+}
+
+/// \brief Hook that is called when player connects to the server.
+MUTATOR_HOOKFUNCTION(gg, ClientConnect)
+{
+       entity player = M_ARGV(0, entity);
+       if (!IS_REAL_CLIENT(player))
+       {
+               return true;
+       }
+       STAT(GUNGAME_LEADING_WEAPON, player) = gungame_leading_weapon.m_id;
+       return true;
+}
+
+MUTATOR_HOOKFUNCTION(gg, reset_map_global)
+{
+       GunGame_Reset();
+}
+
+/// \brief Hook that is called when player spawns.
+MUTATOR_HOOKFUNCTION(gg, PlayerSpawn, CBC_ORDER_LAST)
+{
+       entity player = M_ARGV(0, entity);
+       STAT(WEAPONS, player) = WEPSET(Null);
+       GunGame_GivePlayerWeapon(player);
+       player.items |= IT_UNLIMITED_AMMO;
+}
+
+/// \brief Hook which is called when the player tries to throw their weapon.
+MUTATOR_HOOKFUNCTION(gg, ForbidThrowCurrentWeapon)
+{
+       return true;
+}
+
+/// \brief Hook that is called when player dies.
+MUTATOR_HOOKFUNCTION(gg, PlayerDies)
+{
+       GunGame_UpdateLeadingPlayer();
+       entity attacker = M_ARGV(1, entity);
+       if (!IS_PLAYER(attacker) || IS_DEAD(attacker) || (GunGame_GetPlayerLevel(
+               attacker) >= gungame_max_level))
+       {
+               return;
+       }
+       STAT(WEAPONS, attacker) = WEPSET(Null);
+       GunGame_GivePlayerWeapon(attacker);
+}
+
+/// \brief Hook that determines whether remaining frags are announced.
+MUTATOR_HOOKFUNCTION(gg, Scores_CountFragsRemaining)
+{
+       // announce remaining frags
+       return true;
+}
diff --git a/qcsrc/common/gamemodes/gamemode/gungame/sv_gungame.qh b/qcsrc/common/gamemodes/gamemode/gungame/sv_gungame.qh
new file mode 100644 (file)
index 0000000..44df2e3
--- /dev/null
@@ -0,0 +1,20 @@
+/// \file
+/// \brief Header file that describes the GunGame gamemode.
+/// \author Lyberta
+/// \copyright GNU GPLv2 or any later version.
+
+#pragma once
+
+/// \brief Initializes global data for the gametype.
+/// \return No return.
+void GunGame_Initialize();
+
+REGISTER_MUTATOR(gg, false)
+{
+       MUTATOR_STATIC();
+       MUTATOR_ONADD
+       {
+               GunGame_Initialize();
+       }
+       return 0;
+}
index 030b4db1c089f53f06c62a1cb19590ac48b50977..ca00110a35d15eb735d4486d5370e05f28691cd4 100644 (file)
@@ -95,7 +95,8 @@ CLASS(GameItem, Object)
     ATTRIB(GameItem, m_name, string);
     ATTRIB(GameItem, m_icon, string);
     ATTRIB(GameItem, m_color, vector, '1 1 1');
-    ATTRIB(GameItem, m_waypoint, string);
+       ATTRIB(GameItem, m_waypoint_text, string);
+       ATTRIB(GameItem, m_waypoint_icon, string);
     ATTRIB(GameItem, m_waypointblink, int, 1);
 #ifdef GAMEQC
     ATTRIB(GameItem, m_glow, bool, false);
index ee39aa59242111771347d38005fe0d3c89113e4c..3591a66e835e713da8d7bb948ae138c2afc453ed 100644 (file)
@@ -41,6 +41,7 @@ REGISTER_ITEM(ArmorSmall, Armor) {
     this.netname                =   "armor_small";
     this.m_name                 =   "5 Armor";
     this.m_icon                 =   "armor";
+       this.m_waypoint_icon        =   "waypoint_armor";
 #ifdef SVQC
     this.m_itemid               =   IT_ARMOR_SHARD;
     this.m_respawntime          =   GET(g_pickup_respawntime_short);
@@ -79,6 +80,7 @@ REGISTER_ITEM(ArmorMedium, Armor) {
     this.netname                =   "armor_medium";
     this.m_name                 =   "25 Armor";
     this.m_icon                 =   "armor";
+       this.m_waypoint_icon        =   "waypoint_armor";
 #ifdef SVQC
     this.m_itemid               =   IT_ARMOR;
     this.m_respawntime          =   GET(g_pickup_respawntime_medium);
@@ -118,7 +120,8 @@ REGISTER_ITEM(ArmorBig, Armor) {
     this.m_name                 =   "50 Armor";
     this.m_icon                 =   "armor";
     this.m_color                =   '0 1 0';
-    this.m_waypoint             =   _("Big armor");
+       this.m_waypoint_text        =   _("Big armor");
+       this.m_waypoint_icon        =   "waypoint_armor";
 #ifdef SVQC
     this.m_itemid               =   IT_ARMOR;
     this.m_respawntime          =   GET(g_pickup_respawntime_long);
@@ -158,7 +161,8 @@ REGISTER_ITEM(ArmorMega, Armor) {
     this.m_name                 =   "100 Armor";
     this.m_icon                 =   "item_large_armor";
     this.m_color                =   '0 1 0';
-    this.m_waypoint             =   _("Mega armor");
+       this.m_waypoint_text        =   _("Mega armor");
+       this.m_waypoint_icon        =   "waypoint_armor_mega";
     this.m_waypointblink        =   2;
 #ifdef SVQC
     this.m_maxs                 =   '16 16 70';
index bf515fe4dd7f7c167d31c7f85b6eb3bc9e409fb3..8ceef1ea9c0931db8f97ffde6d33a0c3d8c7a1f5 100644 (file)
@@ -41,6 +41,7 @@ REGISTER_ITEM(HealthSmall, Health) {
     this.netname                =   "health_small";
     this.m_name                 =   "5 Health";
     this.m_icon                 =   "health";
+       this.m_waypoint_icon        =   "waypoint_health";
 #ifdef SVQC
     this.m_itemid               =   IT_5HP;
     this.m_respawntime          =   GET(g_pickup_respawntime_short);
@@ -79,6 +80,7 @@ REGISTER_ITEM(HealthMedium, Health) {
     this.netname                =   "health_medium";
     this.m_name                 =   "25 Health";
     this.m_icon                 =   "health";
+       this.m_waypoint_icon        =   "waypoint_health";
 #ifdef SVQC
     this.m_itemid               =   IT_25HP;
     this.m_respawntime          =   GET(g_pickup_respawntime_short);
@@ -118,7 +120,8 @@ REGISTER_ITEM(HealthBig, Health) {
     this.m_name                 =   "50 Health";
     this.m_icon                 =   "health";
     this.m_color                =   '1 0 0';
-    this.m_waypoint             =   _("Big health");
+       this.m_waypoint_text        =   _("Big health");
+       this.m_waypoint_icon        =   "waypoint_health";
 #ifdef SVQC
     this.m_itemid               =   IT_25HP;
     this.m_respawntime          =   GET(g_pickup_respawntime_medium);
@@ -158,7 +161,8 @@ REGISTER_ITEM(HealthMega, Health) {
     this.m_name                 =   "100 Health";
     this.m_icon                 =   "item_mega_health";
     this.m_color                =   '1 0 0';
-    this.m_waypoint             =   _("Mega health");
+       this.m_waypoint_text        =   _("Mega health");
+       this.m_waypoint_icon        =   "waypoint_health_mega";
     this.m_waypointblink        =   2;
 #ifdef SVQC
     this.m_maxs                 =   '16 16 70';
index 760033861a7db8377342bc6ff7dbd6bef1901b4b..c9387830efe6babedcbe7d48101cecbdb9e3877b 100644 (file)
@@ -38,7 +38,8 @@ REGISTER_ITEM(Jetpack, Powerup) {
     this.m_name                 =   "Jetpack";
     this.m_icon                 =   "jetpack";
     this.m_color                =   '0.5 0.5 0.5';
-    this.m_waypoint             =   _("Jetpack");
+    this.m_waypoint_text        =   _("Jetpack");
+    this.m_waypoint_icon        =   "waypoint_jetpack";
     this.m_waypointblink        =   2;
 #ifdef SVQC
     this.m_botvalue             =   3000;
@@ -96,7 +97,8 @@ REGISTER_ITEM(JetpackRegen, JetpackRegen) {
     this.m_name                 =   "Fuel regenerator";
     this.m_icon                 =   "fuelregen";
     this.m_color                =   '1 0.5 0';
-    this.m_waypoint             =   _("Fuel regen");
+    this.m_waypoint_text        =   _("Fuel regen");
+    this.m_waypoint_icon        =   "waypoint_fuel_regen";
     this.m_waypointblink        =   2;
 #ifdef SVQC
     this.m_botvalue             =   3000;
index 9de1235361787678286474044f004ddbc8e4c31c..9e47a3d52698320adaea9d079d4a85bd3fa8e3d5 100644 (file)
@@ -43,7 +43,8 @@ REGISTER_ITEM(Strength, Powerup) {
     this.m_name             =   "Strength Powerup";
     this.m_icon             =   "strength";
     this.m_color            =   '0 0 1';
-    this.m_waypoint         =   _("Strength");
+       this.m_waypoint_text    =   _("Strength");
+       this.m_waypoint_icon    =   "waypoint_strength";
     this.m_waypointblink    =   2;
     this.m_itemid           =   IT_STRENGTH;
 #ifdef SVQC
@@ -79,7 +80,8 @@ REGISTER_ITEM(Shield, Powerup) {
     this.m_name             =   "Shield";
     this.m_icon             =   "shield";
     this.m_color            =   '1 0 1';
-    this.m_waypoint         =   _("Shield");
+       this.m_waypoint_text    =   _("Shield");
+       this.m_waypoint_icon    =   "waypoint_shield";
     this.m_waypointblink    =   2;
     this.m_itemid           =   IT_INVINCIBLE;
 #ifdef SVQC
index f62500067023cd9a36f656fadbd3d72af82e0f06..e3e002ce583da9a5b1af6c7e6e50b4bfd961b6fa 100644 (file)
@@ -482,6 +482,27 @@ REGISTER_GAMETYPE(INVASION, NEW(Invasion));
 
 //=============================================================================
 
+#ifdef CSQC
+void HUD_Mod_GG(vector pos, vector mySize);
+#endif
+CLASS(GunGame, Gametype)
+    INIT(GunGame)
+    {
+        this.gametype_init(this, _("GunGame"), "gg", "g_gg", false, "", "timelimit=20", _("Kill players with all weapons"));
+    }
+    METHOD(GunGame, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
+    {
+        return true;
+    }
+#ifdef CSQC
+    ATTRIB(GunGame, m_modicons, void(vector pos, vector mySize), HUD_Mod_GG);
+#endif
+ENDCLASS(GunGame)
+REGISTER_GAMETYPE(GUNGAME, NEW(GunGame));
+#define g_gg IS_GAMETYPE(GUNGAME)
+
+//=============================================================================
+
 // Lyberta: adding survival gametype
 
 #ifdef CSQC
@@ -493,9 +514,9 @@ CLASS(Survival, Gametype)
         this.gametype_init(this, _("Survival"), "surv", "g_surv", true, "", "timelimit=20 pointlimit=5 teams=2 leadlimit=0", _("Survive as long as you can"));
     }
     METHOD(Survival, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
-    {
-        return true;
-    }
+       {
+               return true;
+       }
 #ifdef CSQC
     ATTRIB(Survival, m_modicons, void(vector pos, vector mySize), HUD_Mod_SURV);
 #endif
index 40a763c8ec04b39b9a39dfb3d8d915bf647e1324..7d32fd1ab178cbdc83a304a29887c2229df0b577 100644 (file)
@@ -33,6 +33,7 @@
 #include <common/mutators/mutator/running_guns/_mod.inc>
 #include <common/mutators/mutator/sandbox/_mod.inc>
 #include <common/mutators/mutator/spawn_near_teammate/_mod.inc>
+#include <common/mutators/mutator/sprint/_mod.inc>
 #include <common/mutators/mutator/stale_move_negation/_mod.inc>
 #include <common/mutators/mutator/superspec/_mod.inc>
 #include <common/mutators/mutator/touchexplode/_mod.inc>
index 6a9261dd41f394cd3496bf119ec6fa92e6ebb0f1..1d157580f63e8126c7d5784120b1861a5f452364 100644 (file)
@@ -33,6 +33,7 @@
 #include <common/mutators/mutator/running_guns/_mod.qh>
 #include <common/mutators/mutator/sandbox/_mod.qh>
 #include <common/mutators/mutator/spawn_near_teammate/_mod.qh>
+#include <common/mutators/mutator/sprint/_mod.qh>
 #include <common/mutators/mutator/stale_move_negation/_mod.qh>
 #include <common/mutators/mutator/superspec/_mod.qh>
 #include <common/mutators/mutator/touchexplode/_mod.qh>
index 3f8d087166353715a224acd0d7bbf4383cdb2154..13c61e6fce6ea53111659f9b7edfc82e76160b27 100644 (file)
@@ -59,7 +59,8 @@ REGISTER_ITEM(ExtraLife, Powerup) {
     this.m_name                 =   "Extra life";
     this.m_icon                 =   "item_mega_health";
     this.m_color                =   '1 0 0';
-    this.m_waypoint             =   _("Extra life");
+       this.m_waypoint_text        =   _("Extra life");
+       this.m_waypoint_icon        =   "waypoint_health_mega";
     this.m_waypointblink        =   2;
     this.m_itemid               =   IT_NAILS;
 }
@@ -91,7 +92,8 @@ REGISTER_ITEM(Invisibility, Powerup) {
     this.m_name             =   "Invisibility";
     this.m_icon             =   "strength";
     this.m_color            =   '0 0 1';
-    this.m_waypoint         =   _("Invisibility");
+       this.m_waypoint_text    =   _("Invisibility");
+       this.m_waypoint_icon    =   "waypoint_invisibility";
     this.m_waypointblink    =   2;
     this.m_itemid           =   IT_STRENGTH;
 #ifdef SVQC
@@ -126,7 +128,8 @@ REGISTER_ITEM(Speed, Powerup) {
     this.m_name             =   "Speed";
     this.m_icon             =   "shield";
     this.m_color            =   '1 0 1';
-    this.m_waypoint         =   _("Speed");
+       this.m_waypoint_text    =   _("Speed");
+       this.m_waypoint_icon    =   "waypoint_speed";
     this.m_waypointblink    =   2;
     this.m_itemid           =   IT_INVINCIBLE;
 #ifdef SVQC
diff --git a/qcsrc/common/mutators/mutator/sprint/_mod.inc b/qcsrc/common/mutators/mutator/sprint/_mod.inc
new file mode 100644 (file)
index 0000000..1f7a072
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#ifdef SVQC
+    #include <common/mutators/mutator/sprint/sv_sprint.qc>
+#endif
diff --git a/qcsrc/common/mutators/mutator/sprint/_mod.qh b/qcsrc/common/mutators/mutator/sprint/_mod.qh
new file mode 100644 (file)
index 0000000..98fb481
--- /dev/null
@@ -0,0 +1 @@
+// generated file; do not modify
diff --git a/qcsrc/common/mutators/mutator/sprint/sv_sprint.qc b/qcsrc/common/mutators/mutator/sprint/sv_sprint.qc
new file mode 100644 (file)
index 0000000..2554dae
--- /dev/null
@@ -0,0 +1,87 @@
+/// \file
+/// \brief Source file that contains implementation of Sprint mutator.
+/// \copyright GNU GPLv2 or any later version.
+
+string autocvar_g_sprint = "0"; ///< Whether to enable sprint.
+float autocvar_g_sprint_speed_multiplier; ///< Speed multiplier of sprinting.
+bool autocvar_g_sprint_in_air; ///< Whether to increase air acceleration too.
+/// \brief Amount of fuel that sprinting costs per second.
+float autocvar_g_sprint_cost;
+
+.bool m_is_sprinting; ///< Whether player is sprinting.
+
+REGISTER_MUTATOR(sprint, expr_evaluate(autocvar_g_sprint));
+
+MUTATOR_HOOKFUNCTION(sprint, BuildMutatorsString)
+{
+       M_ARGV(0, string) = strcat(M_ARGV(0, string), ":sprint");
+}
+
+MUTATOR_HOOKFUNCTION(sprint, BuildMutatorsPrettyString)
+{
+       M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Sprint");
+}
+
+MUTATOR_HOOKFUNCTION(sprint, BuildGameplayTipsString)
+{
+    M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3Sprint^8 is enabled, press the sprint button to sprint\n");
+}
+
+MUTATOR_HOOKFUNCTION(sprint, SetStartItems)
+{
+       if (autocvar_g_sprint_cost > 0)
+       {
+               start_items |= ITEM_JetpackRegen.m_itemid;
+               start_ammo_fuel = max(start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
+               warmup_start_ammo_fuel = start_ammo_fuel;
+       }
+}
+
+MUTATOR_HOOKFUNCTION(sprint, GetPressedKeys)
+{
+       entity player = M_ARGV(0, entity);
+       if (PHYS_INPUT_BUTTON_SPRINT(player))
+       {
+               player.m_is_sprinting = true;
+       }
+       else
+       {
+               player.m_is_sprinting = false;
+       }
+}
+
+MUTATOR_HOOKFUNCTION(sprint, PlayerPhysics_UpdateStats)
+{
+       entity player = M_ARGV(0, entity);
+       if (!player.m_is_sprinting)
+       {
+               return;
+       }
+       float cost = 0;
+       float fuel = 0;
+       if (autocvar_g_sprint_cost > 0)
+       {
+               cost = autocvar_g_sprint_cost * frametime;
+               fuel = GetResourceAmount(player, RESOURCE_FUEL);
+               if (fuel < cost)
+               {
+                       player.m_is_sprinting = false;
+                       return;
+               }
+       }
+       if (!IS_ONGROUND(player) && !autocvar_g_sprint_in_air)
+       {
+               return;
+       }
+       STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_sprint_speed_multiplier;
+       if (autocvar_g_sprint_cost <= 0)
+       {
+               return;
+       }
+       if ((PHYS_INPUT_MOVEVALUES(player).x == 0) &&
+               (PHYS_INPUT_MOVEVALUES(player).y == 0))
+       {
+               return;
+       }
+       SetResourceAmount(player, RESOURCE_FUEL, fuel - cost);
+}
index 60f2d08fd68429d9f9ea2476b149ba66c8f99b7f..e066d5d2e463a608c28cfaafba51ef54a11ec9fa 100644 (file)
@@ -19,31 +19,31 @@ REGISTER_WAYPOINT(AssaultDestroy, _("Destroy"), "as_destroy", '1 0.5 0', 1);
 REGISTER_WAYPOINT(AssaultPush, _("Push"), "", '1 0.5 0', 1);
 
 REGISTER_WAYPOINT(FlagCarrier, _("Flag carrier"), "", '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagCarrierEnemy, _("Enemy carrier"), "flag_neutral_carrying", '1 1 1', 1);
-REGISTER_WAYPOINT(FlagDropped, _("Dropped flag"), "flag_neutral_lost", '1 1 1', 1);
-REGISTER_WAYPOINT(FlagBaseNeutral, _("White base"), "flag_neutral_taken", '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBaseRed, _("Red base"), "flag_red_taken", '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBaseBlue, _("Blue base"), "flag_blue_taken", '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBaseYellow, _("Yellow base"), "flag_yellow_taken", '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBasePink, _("Pink base"), "flag_pink_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagCarrierEnemy, _("Enemy carrier"), "waypoint_flag_carrying", '1 1 1', 1);
+REGISTER_WAYPOINT(FlagDropped, _("Dropped flag"), "waypoint_flag_lost", '1 1 1', 1);
+REGISTER_WAYPOINT(FlagBaseNeutral, _("White base"), "waypoint_flag", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBaseRed, _("Red base"), "waypoint_flag", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBaseBlue, _("Blue base"), "waypoint_flag", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBaseYellow, _("Yellow base"), "waypoint_flag", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBasePink, _("Pink base"), "waypoint_flag", '0.8 0.8 0', 1);
 REGISTER_WAYPOINT(FlagReturn, _("Return flag here"), "", '0 0.8 0.8', 1);
 
-REGISTER_WAYPOINT(DomNeut, _("Control point"), "dom_icon_blue-highlighted", '0 1 1', 1);
-REGISTER_WAYPOINT(DomRed, _("Control point"), "dom_icon_red-highlighted", '0 1 1', 1);
-REGISTER_WAYPOINT(DomBlue, _("Control point"), "dom_icon_blue-highlighted", '0 1 1', 1);
-REGISTER_WAYPOINT(DomYellow, _("Control point"), "dom_icon_yellow-highlighted", '0 1 1', 1);
-REGISTER_WAYPOINT(DomPink, _("Control point"), "dom_icon_pink-highlighted", '0 1 1', 1);
+REGISTER_WAYPOINT(DomNeut, _("Control point"), "waypoint_dom_team2", '0 1 1', 1);
+REGISTER_WAYPOINT(DomRed, _("Control point"), "waypoint_dom_team1", '0 1 1', 1);
+REGISTER_WAYPOINT(DomBlue, _("Control point"), "waypoint_dom_team2", '0 1 1', 1);
+REGISTER_WAYPOINT(DomYellow, _("Control point"), "waypoint_dom_team3", '0 1 1', 1);
+REGISTER_WAYPOINT(DomPink, _("Control point"), "waypoint_dom_team4", '0 1 1', 1);
 
-REGISTER_WAYPOINT(KeyDropped, _("Dropped key"), "kh_dropped", '0 1 1', 1);
+REGISTER_WAYPOINT(KeyDropped, _("Dropped key"), "waypoint_key_dropped", '0 1 1', 1);
 REGISTER_WAYPOINT(KeyCarrierFriend, _("Key carrier"), "", '0 1 0', 1);
 REGISTER_WAYPOINT(KeyCarrierFinish, _("Run here"), "", '0 1 1', 1);
-REGISTER_WAYPOINT(KeyCarrierRed, _("Key carrier"), "kh_red_carrying", '0 1 1', 1);
-REGISTER_WAYPOINT(KeyCarrierBlue, _("Key carrier"), "kh_blue_carrying", '0 1 1', 1);
-REGISTER_WAYPOINT(KeyCarrierYellow, _("Key carrier"), "kh_yellow_carrying", '0 1 1', 1);
-REGISTER_WAYPOINT(KeyCarrierPink, _("Key carrier"), "kh_pink_carrying", '0 1 1', 1);
+REGISTER_WAYPOINT(KeyCarrierRed, _("Key carrier"), "waypoint_key_carrying", '0 1 1', 1);
+REGISTER_WAYPOINT(KeyCarrierBlue, _("Key carrier"), "waypoint_key_carrying", '0 1 1', 1);
+REGISTER_WAYPOINT(KeyCarrierYellow, _("Key carrier"), "waypoint_key_carrying", '0 1 1', 1);
+REGISTER_WAYPOINT(KeyCarrierPink, _("Key carrier"), "waypoint_key_carrying", '0 1 1', 1);
 
-REGISTER_WAYPOINT(KaBall, _("Ball"), "notify_ballpickedup", '0 1 1', 1);
-REGISTER_WAYPOINT(KaBallCarrier, _("Ball carrier"), "keepawayball_carrying", '1 0 0', 1);
+REGISTER_WAYPOINT(KaBall, _("Ball"), "waypoint_ka_ball", '0 1 1', 1);
+REGISTER_WAYPOINT(KaBallCarrier, _("Ball carrier"), "waypoint_ka_ball_carrying", '1 0 0', 1);
 
 REGISTER_WAYPOINT(NbBall, _("Ball"), "", '0.91 0.85 0.62', 1);
 REGISTER_WAYPOINT(NbGoal, _("Goal"), "", '1 0.5 0', 1);
index 66904d0070bd879fd151e14be11df995600a3e43..fd46a712f9b827311eb49eb8ab24b2ba0d08af7d 100644 (file)
@@ -243,7 +243,7 @@ string spritelookuptext(entity this, string s)
                return "Spam"; // no need to translate this debug string
     if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
     if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).m_name;
-    if (s == WP_Item.netname) return Items_from(this.wp_extra).m_waypoint;
+       if (s == WP_Item.netname) return Items_from(this.wp_extra).m_waypoint_text;
     if (s == WP_Monster.netname) return get_monsterinfo(this.wp_extra).monster_name;
     if (MUTATOR_CALLHOOK(WP_Format, this, s))
     {
@@ -261,8 +261,9 @@ string spritelookuptext(entity this, string s)
 string spritelookupicon(entity this, string s)
 {
     // TODO: needs icons! //if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
-    if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).model2;
-    if (s == WP_Item.netname) return Items_from(this.wp_extra).m_icon;
+    //if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).model2;
+       if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).m_waypoint_icon;
+       if (s == WP_Item.netname) return Items_from(this.wp_extra).m_waypoint_icon;
     if (s == WP_Vehicle.netname) return Vehicles_from(this.wp_extra).m_icon;
     //if (s == WP_Monster.netname) return get_monsterinfo(this.wp_extra).m_icon;
     if (MUTATOR_CALLHOOK(WP_Format, this, s))
@@ -426,10 +427,17 @@ vector drawsprite_TextOrIcon(bool is_text, vector o, float ang, float minwidth,
 
     o.x += 0.5 * (w - sw);
 
-    if (is_text)
-        drawstring(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
-    else
-        drawpic(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
+       if (is_text)
+       {
+               drawstring(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
+       }
+       else
+       {
+               drawpic(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
+               // https://docs.gimp.org/en/gimp-tool-desaturate.html
+               //float gray = rgb.x * 0.21 + rgb.y * 0.72 + rgb.z * 0.07;
+               //drawpic(o, str, sz, '1 1 1', gray * a, DRAWFLAG_ADDITIVE);
+       }
 
     o.x += 0.5 * sw;
     o.y += 0.5 * h;
index 478789dc2e784d51d708382273ac1a106f84a5da..2a6744f2fecc949f0cc2e228323c9bebe67f7180 100644 (file)
@@ -109,10 +109,14 @@ bool IsFlying(entity a);
 #define PHYS_INPUT_BUTTON_ZOOMSCRIPT(s)     PHYS_INPUT_BUTTON_BUTTON9(s)
 #define PHYS_INPUT_BUTTON_JETPACK(s)        PHYS_INPUT_BUTTON_BUTTON10(s)
 #define PHYS_INPUT_BUTTON_DODGE(s)                     PHYS_INPUT_BUTTON_BUTTON11(s)
+#define PHYS_INPUT_BUTTON_SPRINT(s)                    PHYS_INPUT_BUTTON_BUTTON12(s)
 
 #ifdef CSQC
 STATIC_INIT(PHYS_INPUT_BUTTON)
 {
+       localcmd("alias +sprint +button12\n");
+       localcmd("alias -sprint -button12\n");
+
        localcmd("alias +hook +button6\n");
        localcmd("alias -hook -button6\n");
 
index 5d9f64d66af405d2ab22eecb59a588b3bf4135d6..33df71bc2932790422de0ff5e7eee7f5db2d3043 100644 (file)
@@ -289,6 +289,9 @@ REGISTER_STAT(DOM_PPS_BLUE, float)
 REGISTER_STAT(DOM_PPS_YELLOW, float)
 REGISTER_STAT(DOM_PPS_PINK, float)
 
+// gungame
+REGISTER_STAT(GUNGAME_LEADING_WEAPON, int)
+
 // Lyberta: survival
 REGISTER_STAT(SURV_ROUND_TIME, float)
 REGISTER_STAT(SURV_DEFENDER_TEAM, int)
index a3f2336a9487b275a8a130a031295c462072d77b..1a48a109a1dd4837c536f6cb20c904acea92e2af 100644 (file)
@@ -66,6 +66,8 @@ CLASS(Weapon, Object)
     ATTRIB(Weapon, w_reticle, string, string_null);
     /** M: wepimg    : "weaponfoobar" side view image file of weapon. WEAPONTODO: Move out of skin files, move to common files */
     ATTRIB(Weapon, model2, string, "");
+       /** M: waypoint icon name : "waypoint_weapon_foobar" Name of the weapon waypoint icon */
+       ATTRIB(Weapon, m_waypoint_icon, string, "");
     /** M: refname   : reference name name */
     ATTRIB(Weapon, netname, string, "");
     /** M: wepname   : human readable name */
index 7efbdf7a52cc661899ce42c973c72c11df5959df..8ec58149e35d346832fe982a306e706d849176e0 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Blaster, Weapon)
 /* crosshair */ ATTRIB(Blaster, w_crosshair, string, "gfx/crosshairlaser");
 /* crosshair */ ATTRIB(Blaster, w_crosshair_size, float, 0.5);
 /* wepimg    */ ATTRIB(Blaster, model2, string, "weaponlaser");
+/* wp_icon   */ ATTRIB(Blaster, m_waypoint_icon, string, "waypoint_weapon_blaster");
 /* refname   */ ATTRIB(Blaster, netname, string, "blaster");
 /* wepname   */ ATTRIB(Blaster, m_name, string, _("Blaster"));
 
index 77e0b734e2e7e2c1009ee42fb400691a9bca8ed1..47dd1f8065d6daf9c05cdb05c7efc787d30c85ec 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Crylink, Weapon)
 /* crosshair */ ATTRIB(Crylink, w_crosshair, string, "gfx/crosshaircrylink");
 /* crosshair */ ATTRIB(Crylink, w_crosshair_size, float, 0.5);
 /* wepimg    */ ATTRIB(Crylink, model2, string, "weaponcrylink");
+/* wp_icon   */ ATTRIB(Crylink, m_waypoint_icon, string, "waypoint_weapon_crylink");
 /* refname   */ ATTRIB(Crylink, netname, string, "crylink");
 /* wepname   */ ATTRIB(Crylink, m_name, string, _("Crylink"));
 
index e858d54e42d155f87653fb38c1bb85c304d8e152..f815cc071a49a304a2b1a1ee8304b3bf2fb7b8e0 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Devastator, Weapon)
 /* crosshair */ ATTRIB(Devastator, w_crosshair, string, "gfx/crosshairrocketlauncher");
 /* crosshair */ ATTRIB(Devastator, w_crosshair_size, float, 0.7);
 /* wepimg    */ ATTRIB(Devastator, model2, string, "weaponrocketlauncher");
+/* wp_icon   */ ATTRIB(Devastator, m_waypoint_icon, string, "waypoint_weapon_devastator");
 /* refname   */ ATTRIB(Devastator, netname, string, "devastator");
 /* wepname   */ ATTRIB(Devastator, m_name, string, _("Devastator"));
 
index 4018e5926c78ac03364173ce19883119b59d1503..b1f97106b8f4355a0e8b8d464ee454c5c3e366c2 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Electro, Weapon)
 /* crosshair */ ATTRIB(Electro, w_crosshair, string, "gfx/crosshairelectro");
 /* crosshair */ ATTRIB(Electro, w_crosshair_size, float, 0.6);
 /* wepimg    */ ATTRIB(Electro, model2, string, "weaponelectro");
+/* wp_icon   */ ATTRIB(Electro, m_waypoint_icon, string, "waypoint_weapon_electro");
 /* refname   */ ATTRIB(Electro, netname, string, "electro");
 /* wepname   */ ATTRIB(Electro, m_name, string, _("Electro"));
 
index 924326fb3a0a65e211ef2a0eba363444e5f1b771..7c60145522a08ed7ebe20809dd0e1a7896629950 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Hagar, Weapon)
 /* crosshair */ ATTRIB(Hagar, w_crosshair, string, "gfx/crosshairhagar");
 /* crosshair */ ATTRIB(Hagar, w_crosshair_size, float, 0.8);
 /* wepimg    */ ATTRIB(Hagar, model2, string, "weaponhagar");
+/* wp_icon   */ ATTRIB(Hagar, m_waypoint_icon, string, "waypoint_weapon_hagar");
 /* refname   */ ATTRIB(Hagar, netname, string, "hagar");
 /* wepname   */ ATTRIB(Hagar, m_name, string, _("Hagar"));
 
index a7ede47a2105125d60a9a07778130c633720ce8e..457c15e2ebaf3e735d5cccb1341df08897ca689c 100644 (file)
@@ -14,6 +14,7 @@ CLASS(MachineGun, Weapon)
 /* crosshair */ ATTRIB(MachineGun, w_crosshair, string, "gfx/crosshairuzi");
 /* crosshair */ ATTRIB(MachineGun, w_crosshair_size, float, 0.6);
 /* wepimg    */ ATTRIB(MachineGun, model2, string, "weaponuzi");
+/* wp_icon   */ ATTRIB(MachineGun, m_waypoint_icon, string, "waypoint_weapon_machinegun");
 /* refname   */ ATTRIB(MachineGun, netname, string, "machinegun");
 /* wepname   */ ATTRIB(MachineGun, m_name, string, _("MachineGun"));
 
index f804aaf44e9c637520a33a2673b47bed06aba853..6c116ffe751ddf52722a8afeeaefd75e3ad6ab85 100644 (file)
@@ -14,6 +14,7 @@ CLASS(MineLayer, Weapon)
 /* crosshair */ ATTRIB(MineLayer, w_crosshair, string, "gfx/crosshairminelayer");
 /* crosshair */ ATTRIB(MineLayer, w_crosshair_size, float, 0.9);
 /* wepimg    */ ATTRIB(MineLayer, model2, string, "weaponminelayer");
+/* wp_icon   */ ATTRIB(MineLayer, m_waypoint_icon, string, "waypoint_weapon_minelayer");
 /* refname   */ ATTRIB(MineLayer, netname, string, "minelayer");
 /* wepname   */ ATTRIB(MineLayer, m_name, string, _("Mine Layer"));
 
index affec0dbcae952696866a9c6e08c84d15b7ba454..69bebc752efb641864272f1ddc831ca6c240c145 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Mortar, Weapon)
 /* crosshair */ ATTRIB(Mortar, w_crosshair, string, "gfx/crosshairgrenadelauncher");
 /* crosshair */ ATTRIB(Mortar, w_crosshair_size, float, 0.7);
 /* wepimg    */ ATTRIB(Mortar, model2, string, "weapongrenadelauncher");
+/* wp_icon   */ ATTRIB(Mortar, m_waypoint_icon, string, "waypoint_weapon_mortar");
 /* refname   */ ATTRIB(Mortar, netname, string, "mortar");
 /* wepname   */ ATTRIB(Mortar, m_name, string, _("Mortar"));
 
index e40b1d8a1f7f8aa07914fd2a4afabc325cff901d..414646825181beec385744f8f9913804ec3c5d27 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Shotgun, Weapon)
 /* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
 /* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
 /* wepimg    */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
+/* wp_icon   */ ATTRIB(Shotgun, m_waypoint_icon, string, "waypoint_weapon_shotgun");
 /* refname   */ ATTRIB(Shotgun, netname, string, "shotgun");
 /* wepname   */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
 
index 8a11b2e13e4c3a00a751400047f4ded606a94789..fd3c74bbef08b2c028dcf2b28118b23639a0f275 100644 (file)
@@ -15,6 +15,7 @@ CLASS(Vortex, Weapon)
 /* crosshair */ ATTRIB(Vortex, w_crosshair_size, float, 0.65);
 /* reticle   */ ATTRIB(Vortex, w_reticle, string, "gfx/reticle_nex");
 /* wepimg    */ ATTRIB(Vortex, model2, string, "weaponnex");
+/* wp_icon   */ ATTRIB(Vortex, m_waypoint_icon, string, "waypoint_weapon_vortex");
 /* refname   */ ATTRIB(Vortex, netname, string, "vortex");
 /* wepname   */ ATTRIB(Vortex, m_name, string, _("Vortex"));
 
index a14406bcec7202aa518df979bcb29f619f5c90a3..5d17a04d6f8c35410ec767429cfea50758089289 100644 (file)
@@ -33,6 +33,7 @@ void Xonotic_KeyBinds_Read()
        KEYBIND_DEF("+moveright"                            , _("strafe right"));
        KEYBIND_DEF("+jump"                                 , _("jump / swim"));
        KEYBIND_DEF("+crouch"                               , _("crouch / sink"));
+       KEYBIND_DEF("+sprint"                               , _("sprint"));
        KEYBIND_DEF("+hook"                                 , _("off-hand hook"));
        KEYBIND_DEF("+jetpack"                              , _("jetpack"));
        KEYBIND_DEF(""                                      , "");
index e3729ae084258ed1cf1c3be77e93bec6765f5d87..31670eee5107c77ab65ad77152b8291d381890e4 100644 (file)
@@ -689,6 +689,7 @@ float updateCompression()
        GAMETYPE(MAPINFO_TYPE_NEXBALL) \
        GAMETYPE(MAPINFO_TYPE_ONSLAUGHT) \
        GAMETYPE(MAPINFO_TYPE_ASSAULT) \
+       GAMETYPE(MAPINFO_TYPE_GUNGAME) \
        GAMETYPE(MAPINFO_TYPE_SURVIVAL) \
        /* GAMETYPE(MAPINFO_TYPE_INVASION) */ \
        /**/
index fc1319aae8b89961281c271df8dbfdfe50bb5010..51fb8c202964cdcd925e326941f013ee88eb30de 100644 (file)
@@ -267,6 +267,7 @@ void cvar_changes_init()
                BADCVAR("g_domination_default_teams");
                BADCVAR("g_freezetag");
                BADCVAR("g_freezetag_teams");
+               BADCVAR("g_gg");
                BADCVAR("g_invasion_teams");
                BADCVAR("g_invasion_type");
                BADCVAR("g_jailbreak");
diff --git a/randomitems-gungame.cfg b/randomitems-gungame.cfg
new file mode 100644 (file)
index 0000000..d2ece21
--- /dev/null
@@ -0,0 +1,45 @@
+// Random items mutator config for GunGame gamemode
+
+// Map items
+
+set g_random_items_health_probability 10 "Probability of random health items spawning in the map."
+set g_random_items_armor_probability 10 "Probability of random armor items spawning in the map."
+set g_random_items_resource_probability 0 "Probability of random resource items spawning in the map."
+set g_random_items_weapon_probability 0 "Probability of random weapons spawning in the map."
+set g_random_items_powerup_probability 1 "Probability of random powerups spawning in the map."
+set g_random_items_item_health_small_probability 10 "Probability of random small health spawning in the map."
+set g_random_items_item_health_medium_probability 4 "Probability of random medium health spawning in the map."
+set g_random_items_item_health_big_probability 2 "Probability of random big health spawning in the map."
+set g_random_items_item_health_mega_probability 1 "Probability of random mega health spawning in the map."
+set g_random_items_item_armor_small_probability 10 "Probability of random small armor spawning in the map."
+set g_random_items_item_armor_medium_probability 4 "Probability of random medium armor spawning in the map."
+set g_random_items_item_armor_big_probability 2 "Probability of random big armor spawning in the map."
+set g_random_items_item_armor_mega_probability 1 "Probability of random mega armor spawning in the map."
+set g_random_items_item_strength_probability 1 "Probability of random strength spawning in the map."
+set g_random_items_item_shield_probability 1 "Probability of random shield spawning in the map."
+set g_random_items_item_fuel_regen_probability 0 "Probability of random fuel regeneration spawning in the map."
+set g_random_items_item_jetpack_probability 0 "Probability of random jetpack spawning in the map."
+
+// Loot
+
+set g_random_loot_min 0 "Minimum amount of loot items."
+set g_random_loot_max 4 "Maximum amount of loot items."
+set g_random_loot_time 10 "Amount of time the loot will stay in seconds."
+set g_random_loot_spread 200 "How far can loot be thrown."
+set g_random_loot_health_probability 8 "Probability of random health items spawning as loot."
+set g_random_loot_armor_probability 8 "Probability of random armor items spawning as loot."
+set g_random_loot_resource_probability 0 "Probability of random ammo items spawning as loot."
+set g_random_loot_weapon_probability 0 "Probability of random weapons spawning as loot."
+set g_random_loot_powerup_probability 1 "Probability of random powerups spawning as loot."
+set g_random_loot_item_health_small_probability 4 "Probability of random small health spawning as loot."
+set g_random_loot_item_health_medium_probability 3 "Probability of random medium health spawning as loot."
+set g_random_loot_item_health_big_probability 2 "Probability of random big health spawning as loot."
+set g_random_loot_item_health_mega_probability 1 "Probability of random mega health spawning as loot."
+set g_random_loot_item_armor_small_probability 4 "Probability of random small armor spawning as loot."
+set g_random_loot_item_armor_medium_probability 3 "Probability of random medium armor spawning as loot."
+set g_random_loot_item_armor_big_probability 2 "Probability of random big armor spawning as loot."
+set g_random_loot_item_armor_mega_probability 1 "Probability of random mega armor spawning as loot."
+set g_random_loot_item_strength_probability 1 "Probability of random strength spawning as loot."
+set g_random_loot_item_shield_probability 1 "Probability of random shield spawning as loot."
+set g_random_loot_item_fuel_regen_probability 0 "Probability of random fuel regeneration spawning as loot."
+set g_random_loot_item_jetpack_probability 0 "Probability of random jetpack spawning as loot."