]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Lyberta/GunGame
authorLyberta <lyberta@lyberta.net>
Wed, 31 Oct 2018 22:40:59 +0000 (01:40 +0300)
committerLyberta <lyberta@lyberta.net>
Wed, 31 Oct 2018 22:40:59 +0000 (01:40 +0300)
1  2 
gamemodes-server.cfg
qcsrc/client/hud/panel/modicons.qc
qcsrc/common/gamemodes/gamemode/_mod.inc
qcsrc/common/gamemodes/gamemode/_mod.qh
qcsrc/common/mapinfo.qh
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qh
qcsrc/common/stats.qh
qcsrc/menu/xonotic/util.qc
qcsrc/server/g_world.qc

index d609e5fc09babb5ee3e14bcd18b83cd01a76b8b9,57c9f7b7086f2c8ce25ff9f25cf475c2664c334c..e4ff9482208945b100536544bc628b22ca360f10
@@@ -28,7 -28,7 +28,8 @@@ alias sv_hook_gamestart_ct
  alias sv_hook_gamestart_ka
  alias sv_hook_gamestart_ft
  alias sv_hook_gamestart_inv
+ alias sv_hook_gamestart_duel
 +alias sv_hook_gamestart_gg
  alias sv_hook_gamerestart
  alias sv_hook_gameend
  
@@@ -198,13 -198,13 +200,20 @@@ set g_inv_respawn_delay_large_count 
  set g_inv_respawn_delay_max 0
  set g_inv_respawn_waves 0
  set g_inv_weapon_stay 0
+ set g_duel_respawn_delay_small 0
+ set g_duel_respawn_delay_small_count 0
+ set g_duel_respawn_delay_large 0
+ set g_duel_respawn_delay_large_count 0
+ set g_duel_respawn_delay_max 0
+ set g_duel_respawn_waves 0
+ set g_duel_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
  
  
  // =========
@@@ -533,9 -536,9 +545,16 @@@ set g_invasion_teams 0 "number of team
  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)"
  
+ // ======
+ //  duel
+ // ======
+ set g_duel 0 "Duel: frag the opponent more in a one versus one arena battle"
+ //set g_duel_warmup 180 "Have a short warmup period before beginning the actual duel"
+ set g_duel_with_powerups 0 "Enable powerups to spawn in the duel gamemode"
++
 +// =========
 +//  gungame
 +// =========
 +set g_gg 0 "GunGame: Kill players with all weapons. One weapon at a time."
 +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"
Simple merge
index 01a5a060c70a2dfd2333c151e2ecf076823e92f1,a33ec87a01a34a5a8406f57aa3c3d52829cf3994..bb6eb0ea3c8ca7898f531d12387251e5e8d5e48a
@@@ -6,8 -6,8 +6,9 @@@
  #include <common/gamemodes/gamemode/cts/_mod.inc>
  #include <common/gamemodes/gamemode/deathmatch/_mod.inc>
  #include <common/gamemodes/gamemode/domination/_mod.inc>
+ #include <common/gamemodes/gamemode/duel/_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 8ddd27c5908b1e31c399242e17c9bf43504dc306,ffd71d59d3f1092453b6d83f8048003693dfa531..2ddcc0d1fd18e92109bd03a5367548dca50980f6
@@@ -6,8 -6,8 +6,9 @@@
  #include <common/gamemodes/gamemode/cts/_mod.qh>
  #include <common/gamemodes/gamemode/deathmatch/_mod.qh>
  #include <common/gamemodes/gamemode/domination/_mod.qh>
+ #include <common/gamemodes/gamemode/duel/_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>
index 1f632859cc75df9ff05f6bbc7c7c11a2902fd84d,6fbb7ce896235d53fe240be81fd83ea0aea25002..399d1d05cf2999f0f2c0ab7cd9622579f82bd70f
@@@ -480,29 -583,27 +583,50 @@@ CLASS(Invasion, Gametype
  ENDCLASS(Invasion)
  REGISTER_GAMETYPE(INVASION, NEW(Invasion));
  
-         this.gametype_init(this, _("GunGame"), "gg", "g_gg", false, "", "timelimit=20", _("Kill players with all weapons. One weapon at a time"));
+ CLASS(Duel, Gametype)
+     INIT(Duel)
+     {
+         this.gametype_init(this, _("Duel"),"duel","g_duel",false,true,"","timelimit=10 pointlimit=0 leadlimit=0",_("Fight in a one versus one arena battle to decide the winner"));
+     }
+     METHOD(Duel, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
+     {
+         return (diameter < 16384);
+     }
+     METHOD(Duel, m_isForcedSupported, bool(Gametype this))
+     {
+         // force all DM maps to work in duel?!
+         // TODO: we should really check the size of maps, some DM maps do not work for duel!
+         if(!(MapInfo_Map_supportedGametypes & this.m_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH.m_flags))
+             return true;
+         return false;
+     }
+ ENDCLASS(Duel)
+ REGISTER_GAMETYPE(DUEL, NEW(Duel));
+ #define g_duel IS_GAMETYPE(DUEL)
 +//=============================================================================
 +
 +#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, true, "", "timelimit=20", _("Kill players with all weapons. One weapon at a time"));
 +    }
 +    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)
 +
 +//=============================================================================
 +
  const int MAPINFO_FEATURE_WEAPONS       = 1; // not defined for instagib-only maps
  const int MAPINFO_FEATURE_VEHICLES      = 2;
  const int MAPINFO_FEATURE_TURRETS       = 4;
Simple merge
index 5a254efdd21d0d03045272f74abeb3a7e204ff80,6cbf91cc9b3fe185cb1b728b75dc8d273435e612..969b6b36c2d0b443588b7f6047fc2f3d6971a591
@@@ -431,10 -432,9 +432,10 @@@ string BUFF_NAME(int i)
        ARG_CASE(ARG_CS_SV,     "spree_end",     (autocvar_notification_show_sprees ? notif_arg_spree_inf(-1, "", "", f1) : "")) \
        ARG_CASE(ARG_CS_SV,     "spree_lost",    (autocvar_notification_show_sprees ? notif_arg_spree_inf(-2, "", "", f1) : "")) \
        ARG_CASE(ARG_CS_SV,     "item_wepname",  Weapons_from(f1).m_name) \
 +      ARG_CASE(ARG_CS_SV,     "item_wepname2",  Weapons_from(f2).m_name) \
        ARG_CASE(ARG_CS_SV,     "item_buffname", BUFF_NAME(f1)) \
        ARG_CASE(ARG_CS_SV,     "f3buffname",    BUFF_NAME(f3)) \
-       ARG_CASE(ARG_CS_SV,     "item_wepammo",  (s1 != "" ? sprintf(_(" with %s"), s1) : "")) \
+       ARG_CASE(ARG_CS_SV,     "item_wepammo",  (f2 > 0 ? notif_arg_item_wepammo(f1, f2) : "")) \
        ARG_CASE(ARG_DC,        "item_centime",  ftos(autocvar_notification_item_centerprinttime)) \
        ARG_CASE(ARG_SV,        "death_team",    Team_ColoredFullName(f1)) \
        ARG_CASE(ARG_CS,        "death_team",    Team_ColoredFullName(f1 - 1)) \
Simple merge
index 97b878fc8716404c2da67b133156df39a4215dc4,e994491121a8ae1bf012f6981d7c8fdbc1a7a465..eb9697d6cfbe0c55274161757f368eab82304f72
@@@ -689,7 -689,7 +689,8 @@@ float updateCompression(
        GAMETYPE(MAPINFO_TYPE_NEXBALL) \
        GAMETYPE(MAPINFO_TYPE_ONSLAUGHT) \
        GAMETYPE(MAPINFO_TYPE_ASSAULT) \
 +      GAMETYPE(MAPINFO_TYPE_GUNGAME) \
+       /* GAMETYPE(MAPINFO_TYPE_DUEL) */ \
        /* GAMETYPE(MAPINFO_TYPE_INVASION) */ \
        /**/
  
index df12edd5bdf0f5525994986cb856b33ce2f7b7e0,522f4f041cc49af4810c0f53fb2070f30c4e75e4..408f590d4e6e530ad3ec8ec6af070afec97e1306
@@@ -265,9 -265,9 +265,10 @@@ void cvar_changes_init(
                BADCVAR("g_dm");
                BADCVAR("g_domination");
                BADCVAR("g_domination_default_teams");
+               BADCVAR("g_duel");
                BADCVAR("g_freezetag");
                BADCVAR("g_freezetag_teams");
 +              BADCVAR("g_gg");
                BADCVAR("g_invasion_teams");
                BADCVAR("g_invasion_type");
                BADCVAR("g_jailbreak");