]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Mario/nades_mutator' into Mario/mutators
authorMario <mario.mario@y7mail.com>
Tue, 11 Jun 2013 04:32:43 +0000 (14:32 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 11 Jun 2013 04:32:43 +0000 (14:32 +1000)
1  2 
mutators.cfg
qcsrc/server/autocvars.qh
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutators.qh
qcsrc/server/progs.src

diff --combined mutators.cfg
index ba012ed7487f9184b3249676df0d2d1f8ccca4df,0000000000000000000000000000000000000000..054a32c0ae5653c94ad431354da9e733585f2c73
mode 100644,000000..100644
--- /dev/null
@@@ -1,130 -1,0 +1,147 @@@
 +// =========================
 +//  Config for all mutators
 +// =========================
 +
 +
 +// =========
 +//  dodging
 +// =========
 +set g_dodging 0 "set to 1 to enable dodging in games"
 +
 +seta cl_dodging_timeout 0.2 "determines how long apart (in seconds) two taps on the same direction key are considered a dodge. use 0 to disable"
 +
 +set sv_dodging_wall_dodging 0 "set to 1 to allow dodging off walls. 0 to disable"
 +set sv_dodging_delay 0.5 "determines how long a player has to wait to be able to dodge again after dodging"
 +set sv_dodging_up_speed 200 "the jump velocity of the dodge"
 +set sv_dodging_horiz_speed 400 "the horizontal velocity of the dodge"
 +set sv_dodging_ramp_time 0.1 "a ramp so that the horizontal part of the dodge is added smoothly (seconds)"
 +set sv_dodging_height_threshold 10 "the maximum height above ground where to allow dodging"
 +set sv_dodging_wall_distance_threshold 10 "the maximum distance from a wall that still allows dodging"
 +set sv_dodging_sound 1 "if 1 dodging makes a sound. if 0 dodging is silent"
 +
 +
 +// ===========
 +//  minstagib
 +// ===========
 +set g_minstagib 0 "enable minstagib"
 +set g_minstagib_extralives 1 "how many extra lives you will get per powerup"
 +set g_minstagib_ammo_start 10 "starting ammo"
 +set g_minstagib_ammo_drop 5 "how much ammo you'll get for weapons or cells"
 +set g_minstagib_invis_alpha 0.15
 +set g_minstagib_speed_highspeed 1.5 "speed-multiplier that applies while you carry the invincibility powerup"
 +
 +
 +// =========
 +//  vampire
 +// =========
 +set g_vampire 0 "set to 1 to enable the vampire mode, where the damage done to your opponent gets added to your own health"
 +
 +
 +// =========
 +//  sandbox
 +// =========
 +set g_sandbox 0 "allow players to spawn and edit objects around the map"
 +set g_sandbox_info 1 "print object information to the server. 1 prints info about spawned / removed objects, 2 also prints info about edited objects"
 +set g_sandbox_readonly 0 "when this mode is active, players cannot modify objects or use any sandbox commands"
 +set g_sandbox_storage_name default "name of the selected storage to use"
 +set g_sandbox_storage_autosave 5 "storage is automatically saved every specified number of seconds"
 +set g_sandbox_storage_autoload 1 "if a storage file exists for the given map, automatically load it at startup"
 +set g_sandbox_editor_flood 1 "players must wait this many seconds between spawning objects"
 +set g_sandbox_editor_maxobjects 1000 "maximum number of objects that may exist at a time"
 +set g_sandbox_editor_free 1 "0 = players can only copy or edit their own objects, 1 = players can copy but not edit other objects, 2 = players can copy and edit all object"
 +set g_sandbox_editor_distance_spawn 200 "distance at which objects spawn in front of the player"
 +set g_sandbox_editor_distance_edit 300 "distance at which players can edit or remove objects they are looking at"
 +set g_sandbox_object_scale_min 0.1 "minimum scale that objects can be set to"
 +set g_sandbox_object_scale_max 2 "maximum scale that objects can be set to"
 +set g_sandbox_object_material_velocity_min 100 "velocity objects must have while colliding for material effects to be applied"
 +set g_sandbox_object_material_velocity_factor 0.002 "velocity range which decides the intensity of material effects"
 +set cl_sandbox_clipboard ""
 +
 +
 +// ========================
 +//  invincible projectiles
 +// ========================
 +set g_invincible_projectiles 0 "set to 1 to disable any damage to projectiles in all balance configs, regardless of g_projectiles_damage"
 +
 +
 +// ===============
 +//  rocket flying
 +// ===============
 +set g_rocket_flying 0 "set to 1 to enable rocket flying in all balance configs"
 +
 +
 +// =====================
 +//  spawn near teammate
 +// =====================
 +set g_spawn_near_teammate 0 "if set, players prefer spawns near a team mate"
 +set g_spawn_near_teammate_distance 640 "max distance to consider a spawn to be near a team mate"
 +
 +
 +// ========================
 +//  NIX (No Items Xonotic)
 +// ========================
 +// at each time, everyone uses the same weapon,
 +// and in regular intervals, this weapon is cycled
 +set g_nix 0 "No Items Xonotic - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon, and so on"
 +set g_nix_with_laser 0 "always carry the laser as an additional weapon in NIX"
 +set g_nix_with_healtharmor 0 "when 1, health and armor still show up in NIX"
 +set g_nix_with_powerups 0 "when 1, powerups still show up in NIX"
 +
 +
 +// ================
 +//  physical items
 +// ================
 +set g_physical_items 0 "1 uses ODE physics for dropped weapons, 2 for all items, requires physics_ode to be enabled"
 +set g_physical_items_damageforcescale 3 "how affected physical weapons are by damage"
 +set g_physical_items_reset 1 "return map items to their original lotation after being picked up"
 +
 +
 +// ===============
 +//  touch explode
 +// ===============
 +set g_touchexplode 0 "touching other players causes an explosion"
 +set g_touchexplode_radius 50
 +set g_touchexplode_damage 10
 +set g_touchexplode_edgedamage 0
 +set g_touchexplode_force 150
 +
 +
 +// ================
 +//  super spectate
 +// ================
 +set g_superspectate 0 "server side, allows extended spectator functions through the cmd interface. followpowerup, followstrength, followstshield or followfc [red|blue] will transfer spectation to the relevent player, if any"
 +
 +
 +// ==================
 +//  melee only arena
 +// ==================
 +set g_melee_only 0 "enable melee only arena"
 +
 +
 +// ================
 +//  random gravity
 +// ================
 +set g_random_gravity 0 "enable random gravity mutator"
 +set g_random_gravity_delay 3 "delay between gravity changes"
 +set g_random_gravity_negative_chance 0.5 "chance of gravity being a negative value"
 +set g_random_gravity_min -2000 "minimum gravity"
 +set g_random_gravity_max 2000 "maximum gravity"
 +set g_random_gravity_positive 1000 "positive gravity multiplier"
 +set g_random_gravity_negative 1000 "negative gravity multiplier"
++
++
++// =======
++//  nades
++// =======
++set g_nades 0 "enable off-hand grenades"
++set g_nades_spawn 1 "give nades right away when player spawns rather than delaying entire refire"
++set g_nades_nade_lifetime 3.5
++set g_nades_nade_minforce 400
++set g_nades_nade_maxforce 2000
++set g_nades_nade_health 25
++set g_nades_nade_refire 6
++set g_nades_nade_damage 225
++set g_nades_nade_edgedamage 90
++set g_nades_nade_radius 300
++set g_nades_nade_force 650
++set g_nades_nade_newton_style 0
index aa5b291e33e8d148be824d1aa7fa4ff4feda4037,56a1f2ba78c6b5cea10db6bd4b2210864574654b..20273497f77e03b1263f146be6457ea2a59d0d79
@@@ -892,6 -892,7 +892,6 @@@ float autocvar_g_maxplayers
  float autocvar_g_maxplayers_spectator_blocktime;
  float autocvar_g_maxpushtime;
  float autocvar_g_maxspeed;
 -#define autocvar_g_midair cvar("g_midair")
  float autocvar_g_midair_shieldtime;
  #define autocvar_g_minstagib cvar("g_minstagib")
  float autocvar_g_minstagib_ammo_drop;
@@@ -931,6 -932,7 +931,6 @@@ float autocvar_g_nix_with_laser
  float autocvar_g_nix_with_powerups;
  float autocvar_g_nodepthtestitems;
  float autocvar_g_nodepthtestplayers;
 -float autocvar_g_norecoil;
  float autocvar_g_onslaught_cp_buildhealth;
  float autocvar_g_onslaught_cp_buildtime;
  float autocvar_g_onslaught_cp_health;
@@@ -1232,11 -1234,15 +1232,22 @@@ float autocvar_g_touchexplode_radius
  float autocvar_g_touchexplode_damage;
  float autocvar_g_touchexplode_edgedamage;
  float autocvar_g_touchexplode_force;
 +#define autocvar_g_bloodloss cvar("g_bloodloss")
 +float autocvar_g_random_gravity_negative_chance;
 +float autocvar_g_random_gravity_min;
 +float autocvar_g_random_gravity_max;
 +float autocvar_g_random_gravity_positive;
 +float autocvar_g_random_gravity_negative;
 +float autocvar_g_random_gravity_delay;
+ float autocvar_g_nades;
+ float autocvar_g_nades_spawn;
+ float autocvar_g_nades_nade_lifetime;
+ float autocvar_g_nades_nade_minforce;
+ float autocvar_g_nades_nade_maxforce;
+ float autocvar_g_nades_nade_health;
+ float autocvar_g_nades_nade_refire;
+ float autocvar_g_nades_nade_damage;
+ float autocvar_g_nades_nade_edgedamage;
+ float autocvar_g_nades_nade_radius;
+ float autocvar_g_nades_nade_force;
+ float autocvar_g_nades_nade_newton_style;
index b990085ba15f05a09f68fdf9b6326a165c38f90c,a98eb6f55388e8b5cf755ff0b0525e51a6703093..22404828d3bd14c9dd5e4706cde5e8dfa1926ff3
@@@ -233,7 -233,8 +233,7 @@@ void W_SetupShot_Dir_ProjectileSize_Ran
  
        ent.dphitcontentsmask = oldsolid; // restore solid type (generally SOLID_SLIDEBOX)
  
 -      if (!g_norecoil)
 -              ent.punchangle_x = recoil * -1;
 +      ent.punchangle_x = recoil * -1;
  
        if (snd != "")
        {
@@@ -666,6 -667,9 +666,9 @@@ float client_hasweapon(entity cl, floa
                complain = 0;
        if(complain)
                self.hasweapon_complain_spam = time + 0.2;
+               
+       if(wpn == WEP_HOOK && !g_grappling_hook && autocvar_g_nades && !WEPSET_CONTAINS_EW(cl, wpn) && !WEPSET_CONTAINS_AW(weaponsInMap, wpn))
+               complain = 0;
  
        if (wpn < WEP_FIRST || wpn > WEP_LAST)
        {
index 805f200bb682786585997fe4a837920d0da42766,923bcec8070a0fec5e220e5dba859a9b5b7bca36..6e8b5d16a4170ff81d6fe2cb068e4e088bcdf3a3
@@@ -767,6 -767,7 +767,6 @@@ void readplayerstartcvars(
  
        if (g_weaponarena)
        {
 -              g_pinata = 0; // incompatible
                g_weapon_stay = 0; // incompatible
                WEPSET_COPY_AA(start_weapons, g_weaponarena_weapons);
                start_items |= IT_UNLIMITED_AMMO;
  
        if(!cvar("g_use_ammunition"))
                start_items |= IT_UNLIMITED_AMMO;
 -
 -      if(cvar("g_nexball"))
 -              start_items |= IT_UNLIMITED_SUPERWEAPONS; // FIXME BAD BAD BAD BAD HACK, NEXBALL SHOULDN'T ABUSE PORTO'S WEAPON SLOT
 -
 +      
        if(start_items & IT_UNLIMITED_WEAPON_AMMO)
        {
                start_ammo_rockets = 999;
@@@ -915,15 -919,7 +915,16 @@@ void readlevelcvars(void
        CHECK_MUTATOR_ADD("g_rocket_flying", mutator_rocketflying, !cvar("g_minstagib"));
        CHECK_MUTATOR_ADD("g_vampire", mutator_vampire, !cvar("g_minstagib"));
        CHECK_MUTATOR_ADD("g_superspectate", mutator_superspec, 1);
 +      CHECK_MUTATOR_ADD("g_pinata", mutator_pinata, !cvar("g_minstagib"));
 +      CHECK_MUTATOR_ADD("g_midair", mutator_midair, 1);
 +      CHECK_MUTATOR_ADD("g_bloodloss", mutator_bloodloss, !cvar("g_minstagib"));
 +      CHECK_MUTATOR_ADD("g_random_gravity", mutator_random_gravity, 1);
 +      CHECK_MUTATOR_ADD("g_norecoil", mutator_norecoil, 1);
 +      CHECK_MUTATOR_ADD("g_multijump", mutator_multijump, 1);
 +      CHECK_MUTATOR_ADD("g_jump_grunt", mutator_jump_grunt, 1);
 +      CHECK_MUTATOR_ADD("g_footsteps", mutator_footsteps, 1);
 +      CHECK_MUTATOR_ADD("g_melee_only", mutator_melee_only, !cvar("g_minstagib"));
+       CHECK_MUTATOR_ADD("g_nades", mutator_nades, 1);
        CHECK_MUTATOR_ADD("g_sandbox", sandbox, 1);
        
        #undef CHECK_MUTATOR_ADD
        g_cloaked = cvar("g_cloaked");
      if(g_cts)
          g_cloaked = 1; // always enable cloak in CTS
 -      g_jump_grunt = cvar("g_jump_grunt");
 -      g_footsteps = cvar("g_footsteps");
        g_grappling_hook = cvar("g_grappling_hook");
        g_jetpack = cvar("g_jetpack");
 -      g_midair = cvar("g_midair");
 -      g_norecoil = cvar("g_norecoil");
 -      g_bloodloss = cvar("g_bloodloss");
        sv_maxidle = cvar("sv_maxidle");
        sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
        sv_autotaunt = cvar("sv_autotaunt");
        g_warmup_allguns = cvar("g_warmup_allguns");
        g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
  
 -      if ((g_race && g_race_qualifying == 2) || g_arena || g_minstagib || g_assault || cvar("g_campaign"))
 +      if ((g_race && g_race_qualifying == 2) || g_arena || g_assault || cvar("g_campaign"))
                inWarmupStage = 0; // these modes cannot work together, sorry
  
        g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon");
        g_pickup_ammo_anyway = cvar("g_pickup_ammo_anyway");
        g_pickup_weapons_anyway = cvar("g_pickup_weapons_anyway");
  
 -      g_pinata = cvar("g_pinata");
 -
      g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay"));
      if(!g_weapon_stay)
          g_weapon_stay = cvar("g_weapon_stay");
@@@ -1334,6 -1337,12 +1335,6 @@@ void precache(
              precache_playermodel(s);
      }
  
 -    if (g_footsteps)
 -    {
 -        PrecacheGlobalSound((globalsound_step = "misc/footstep0 6"));
 -        PrecacheGlobalSound((globalsound_metalstep = "misc/metalfootstep0 6"));
 -    }
 -
      // gore and miscellaneous sounds
      //precache_sound ("misc/h2ohit.wav");
      precache_model ("models/hook.md3");
index 48ada7784fe96f24543092dddbf1f99cb26890fc,4f2f87aa42b05beefba91392e22f1d697b0f4b31..b3a3a4b34247918fe07f7dbf306b65c4892a8dd5
@@@ -21,14 -21,6 +21,15 @@@ MUTATOR_DECLARATION(mutator_vampire)
  MUTATOR_DECLARATION(mutator_superspec);
  MUTATOR_DECLARATION(mutator_minstagib);
  MUTATOR_DECLARATION(mutator_touchexplode);
 +MUTATOR_DECLARATION(mutator_pinata);
 +MUTATOR_DECLARATION(mutator_midair);
 +MUTATOR_DECLARATION(mutator_bloodloss);
 +MUTATOR_DECLARATION(mutator_random_gravity);
 +MUTATOR_DECLARATION(mutator_norecoil);
 +MUTATOR_DECLARATION(mutator_multijump);
 +MUTATOR_DECLARATION(mutator_jump_grunt);
 +MUTATOR_DECLARATION(mutator_footsteps);
 +MUTATOR_DECLARATION(mutator_melee_only);
+ MUTATOR_DECLARATION(mutator_nades);
  
  MUTATOR_DECLARATION(sandbox);
diff --combined qcsrc/server/progs.src
index 7be15ed7cb94790533a19132ee10f9e969c614cb,021b9b9b0b28d72f5ec634847127ec8a7ab10a04..db5f4165d79861e7faaf09550a09b31a51862332
@@@ -247,16 -247,8 +247,16 @@@ mutators/mutator_physical_items.q
  mutators/sandbox.qc
  mutators/mutator_superspec.qc
  mutators/mutator_minstagib.qc
--mutators/mutator_touchexplode.qc
 +mutators/mutator_pinata.qc
 +mutators/mutator_midair.qc
 +mutators/mutator_bloodloss.qc
 +mutators/mutator_random_gravity.qc
 +mutators/mutator_norecoil.qc
 +mutators/mutator_multijump.qc
 +mutators/mutator_jump_grunt.qc
 +mutators/mutator_footsteps.qc
 +mutators/mutator_melee_only.qc
+ mutators/mutator_nades.qc
  
  ../warpzonelib/anglestransform.qc
  ../warpzonelib/mathlib.qc