From: Martin Taibr Date: Thu, 29 Aug 2019 23:48:17 +0000 (+0200) Subject: Merge branch 'master' into martin-t/mg-solidpen X-Git-Tag: xonotic-v0.8.5~1307^2~5 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=af43b181a15f348a4de2045b716ebc7765ce8f9f;hp=-c Merge branch 'master' into martin-t/mg-solidpen --- af43b181a15f348a4de2045b716ebc7765ce8f9f diff --combined bal-wep-xonotic.cfg index c5c40d9ee5,b7de169b30..f789d78cd7 --- a/bal-wep-xonotic.cfg +++ b/bal-wep-xonotic.cfg @@@ -3,8 -3,8 +3,8 @@@ set g_balance_blaster_primary_animtime set g_balance_blaster_primary_damage 20 set g_balance_blaster_primary_delay 0 set g_balance_blaster_primary_edgedamage 10 - set g_balance_blaster_primary_force 300 - set g_balance_blaster_primary_force_zscale 1.25 + set g_balance_blaster_primary_force 375 + set g_balance_blaster_primary_force_zscale 1 set g_balance_blaster_primary_lifetime 5 set g_balance_blaster_primary_radius 60 set g_balance_blaster_primary_refire 0.7 @@@ -16,8 -16,8 +16,8 @@@ set g_balance_blaster_secondary_animtim set g_balance_blaster_secondary_damage 25 set g_balance_blaster_secondary_delay 0 set g_balance_blaster_secondary_edgedamage 12.5 - set g_balance_blaster_secondary_force 300 - set g_balance_blaster_secondary_force_zscale 1.2 + set g_balance_blaster_secondary_force 360 + set g_balance_blaster_secondary_force_zscale 1 set g_balance_blaster_secondary_lifetime 5 set g_balance_blaster_secondary_radius 70 set g_balance_blaster_secondary_refire 0.7 @@@ -43,6 -43,8 +43,8 @@@ set g_balance_shotgun_primary_spread 0. set g_balance_shotgun_reload_ammo 0 set g_balance_shotgun_reload_time 2 set g_balance_shotgun_secondary 1 + set g_balance_shotgun_secondary_alt_animtime 0.2 + set g_balance_shotgun_secondary_alt_refire 1.2 set g_balance_shotgun_secondary_animtime 1.15 set g_balance_shotgun_secondary_damage 70 set g_balance_shotgun_secondary_force 200 @@@ -56,8 -58,6 +58,6 @@@ set g_balance_shotgun_secondary_melee_s set g_balance_shotgun_secondary_melee_time 0.15 set g_balance_shotgun_secondary_melee_traces 10 set g_balance_shotgun_secondary_refire 1.25 - set g_balance_shotgun_secondary_alt_animtime 0.2 - set g_balance_shotgun_secondary_alt_refire 1.2 set g_balance_shotgun_switchdelay_drop 0.2 set g_balance_shotgun_switchdelay_raise 0.2 set g_balance_shotgun_weaponreplace "" @@@ -65,13 -65,13 +65,13 @@@ set g_balance_shotgun_weaponstart set g_balance_shotgun_weaponstartoverride -1 set g_balance_shotgun_weaponthrowable 1 // }}} - // {{{ #3: Machine Gun + // {{{ #3: MachineGun set g_balance_machinegun_burst 3 set g_balance_machinegun_burst_ammo 3 set g_balance_machinegun_burst_animtime 0.3 set g_balance_machinegun_burst_refire 0.06 set g_balance_machinegun_burst_refire2 0.45 - set g_balance_machinegun_burst_speed 0 + set g_balance_machinegun_burst_spread 0 set g_balance_machinegun_first 1 set g_balance_machinegun_first_ammo 1 set g_balance_machinegun_first_damage 14 @@@ -81,7 -81,7 +81,7 @@@ set g_balance_machinegun_first_spread 0 set g_balance_machinegun_mode 1 set g_balance_machinegun_reload_ammo 60 set g_balance_machinegun_reload_time 2 -set g_balance_machinegun_solidpenetration 13.1 +set g_balance_machinegun_solidpenetration 63 set g_balance_machinegun_spread_add 0.012 set g_balance_machinegun_spread_max 0.05 set g_balance_machinegun_spread_min 0.02 @@@ -290,6 -290,7 +290,7 @@@ set g_balance_crylink_weaponthrowable // }}} // {{{ #8: Vortex set g_balance_vortex_charge 1 + set g_balance_vortex_charge_always 0 set g_balance_vortex_charge_animlimit 0.5 set g_balance_vortex_charge_limit 1 set g_balance_vortex_charge_maxspeed 800 @@@ -447,7 -448,8 +448,8 @@@ set g_balance_vaporizer_secondary_animt set g_balance_vaporizer_secondary_damage 25 set g_balance_vaporizer_secondary_delay 0 set g_balance_vaporizer_secondary_edgedamage 12.5 - set g_balance_vaporizer_secondary_force 400 + set g_balance_vaporizer_secondary_force 480 + set g_balance_vaporizer_secondary_force_zscale 1 set g_balance_vaporizer_secondary_lifetime 5 set g_balance_vaporizer_secondary_radius 70 set g_balance_vaporizer_secondary_refire 0.7 @@@ -678,7 -680,7 +680,7 @@@ set g_balance_seeker_weaponstart set g_balance_seeker_weaponstartoverride -1 set g_balance_seeker_weaponthrowable 1 // }}} - // {{{ #19: Shockwave (MUTATOR WEAPON) + // {{{ #19: Shockwave set g_balance_shockwave_blast_animtime 0.3 set g_balance_shockwave_blast_damage 40 set g_balance_shockwave_blast_distance 1000 @@@ -745,12 -747,7 +747,7 @@@ set g_balance_arc_beam_healing_amax set g_balance_arc_beam_healing_aps 50 set g_balance_arc_beam_healing_hmax 150 set g_balance_arc_beam_healing_hps 50 - set g_balance_arc_cooldown 2.5 - set g_balance_arc_cooldown_release 0 - set g_balance_arc_overheat_max 5 - set g_balance_arc_overheat_min 3 set g_balance_arc_beam_heat 0 - set g_balance_arc_burst_heat 5 set g_balance_arc_beam_maxangle 10 set g_balance_arc_beam_nonplayerdamage 80 set g_balance_arc_beam_range 1500 @@@ -773,6 -770,11 +770,11 @@@ set g_balance_arc_burst_ammo 1 set g_balance_arc_burst_damage 250 set g_balance_arc_burst_healing_aps 100 set g_balance_arc_burst_healing_hps 100 + set g_balance_arc_burst_heat 5 + set g_balance_arc_cooldown 2.5 + set g_balance_arc_cooldown_release 0 + set g_balance_arc_overheat_max 5 + set g_balance_arc_overheat_min 3 set g_balance_arc_switchdelay_drop 0.2 set g_balance_arc_switchdelay_raise 0.2 set g_balance_arc_weaponreplace "" @@@ -780,12 -782,12 +782,12 @@@ set g_balance_arc_weaponstart set g_balance_arc_weaponstartoverride -1 set g_balance_arc_weaponthrowable 1 // }}} - // {{{ #21: Overkill Heavy Machine Gun + // {{{ #21: Overkill Heavy Machine Gun (MUTATOR WEAPON) set g_balance_okhmg_primary_ammo 1 set g_balance_okhmg_primary_damage 30 set g_balance_okhmg_primary_force 10 set g_balance_okhmg_primary_refire 0.05 - set g_balance_okhmg_primary_solidpenetration 32 + set g_balance_okhmg_primary_solidpenetration 127 set g_balance_okhmg_primary_spread_add 0.005 set g_balance_okhmg_primary_spread_max 0.06 set g_balance_okhmg_primary_spread_min 0.01 @@@ -796,7 -798,8 +798,8 @@@ set g_balance_okhmg_secondary_animtime set g_balance_okhmg_secondary_damage 25 set g_balance_okhmg_secondary_delay 0 set g_balance_okhmg_secondary_edgedamage 12.5 - set g_balance_okhmg_secondary_force 300 + set g_balance_okhmg_secondary_force 360 + set g_balance_okhmg_secondary_force_zscale 1 set g_balance_okhmg_secondary_lifetime 5 set g_balance_okhmg_secondary_radius 70 set g_balance_okhmg_secondary_refire 0.7 @@@ -811,79 -814,12 +814,12 @@@ set g_balance_okhmg_weaponstart set g_balance_okhmg_weaponstartoverride 0 set g_balance_okhmg_weaponthrowable 0 // }}} - // {{{ #22: Overkill Rocket Propelled Chainsaw - set g_balance_okrpc_primary_ammo 10 - set g_balance_okrpc_primary_animtime 1 - set g_balance_okrpc_primary_damage 150 - set g_balance_okrpc_primary_damage2 500 - set g_balance_okrpc_primary_damageforcescale 2 - set g_balance_okrpc_primary_edgedamage 50 - set g_balance_okrpc_primary_force 400 - set g_balance_okrpc_primary_health 25 - set g_balance_okrpc_primary_lifetime 30 - set g_balance_okrpc_primary_radius 300 - set g_balance_okrpc_primary_refire 1 - set g_balance_okrpc_primary_speed 2500 - set g_balance_okrpc_primary_speedaccel 5000 - set g_balance_okrpc_reload_ammo 10 - set g_balance_okrpc_reload_time 1 - set g_balance_okrpc_secondary_ammo 0 - set g_balance_okrpc_secondary_animtime 0.2 - set g_balance_okrpc_secondary_damage 25 - set g_balance_okrpc_secondary_delay 0 - set g_balance_okrpc_secondary_edgedamage 12.5 - set g_balance_okrpc_secondary_force 300 - set g_balance_okrpc_secondary_lifetime 5 - set g_balance_okrpc_secondary_radius 70 - set g_balance_okrpc_secondary_refire 0.7 - set g_balance_okrpc_secondary_refire_type 1 - set g_balance_okrpc_secondary_shotangle 0 - set g_balance_okrpc_secondary_speed 6000 - set g_balance_okrpc_secondary_spread 0 - set g_balance_okrpc_switchdelay_drop 0.2 - set g_balance_okrpc_switchdelay_raise 0.2 - set g_balance_okrpc_weaponreplace "" - set g_balance_okrpc_weaponstart 0 - set g_balance_okrpc_weaponstartoverride 0 - set g_balance_okrpc_weaponthrowable 0 - // }}} - // {{{ Overkill Shotgun - set g_balance_okshotgun_primary_ammo 3 - set g_balance_okshotgun_primary_animtime 0.65 - set g_balance_okshotgun_primary_bot_range 512 - set g_balance_okshotgun_primary_bullets 10 - set g_balance_okshotgun_primary_damage 17 - set g_balance_okshotgun_primary_force 80 - set g_balance_okshotgun_primary_refire 0.75 - set g_balance_okshotgun_primary_solidpenetration 3.8 - set g_balance_okshotgun_primary_spread 0.07 - set g_balance_okshotgun_reload_ammo 24 - set g_balance_okshotgun_reload_time 2 - set g_balance_okshotgun_secondary_animtime 0.2 - set g_balance_okshotgun_secondary_damage 25 - set g_balance_okshotgun_secondary_delay 0 - set g_balance_okshotgun_secondary_edgedamage 12.5 - set g_balance_okshotgun_secondary_force 300 - set g_balance_okshotgun_secondary_lifetime 5 - set g_balance_okshotgun_secondary_radius 70 - set g_balance_okshotgun_secondary_refire 0.7 - set g_balance_okshotgun_secondary_refire_type 1 - set g_balance_okshotgun_secondary_shotangle 0 - set g_balance_okshotgun_secondary_speed 6000 - set g_balance_okshotgun_secondary_spread 0 - set g_balance_okshotgun_switchdelay_drop 0.2 - set g_balance_okshotgun_switchdelay_raise 0.2 - set g_balance_okshotgun_weaponreplace "" - set g_balance_okshotgun_weaponstart 0 - set g_balance_okshotgun_weaponstartoverride -1 - set g_balance_okshotgun_weaponthrowable 1 - // }}} - // {{{ Overkill Machine Gun + // {{{ #22: Overkill MachineGun (MUTATOR WEAPON) set g_balance_okmachinegun_primary_ammo 1 set g_balance_okmachinegun_primary_damage 25 set g_balance_okmachinegun_primary_force 5 set g_balance_okmachinegun_primary_refire 0.1 - set g_balance_okmachinegun_primary_solidpenetration 63 + set g_balance_okmachinegun_primary_solidpenetration 100 set g_balance_okmachinegun_primary_spread_add 0.012 set g_balance_okmachinegun_primary_spread_max 0.05 set g_balance_okmachinegun_primary_spread_min 0 @@@ -893,7 -829,8 +829,8 @@@ set g_balance_okmachinegun_secondary_an set g_balance_okmachinegun_secondary_damage 25 set g_balance_okmachinegun_secondary_delay 0 set g_balance_okmachinegun_secondary_edgedamage 12.5 - set g_balance_okmachinegun_secondary_force 300 + set g_balance_okmachinegun_secondary_force 360 + set g_balance_okmachinegun_secondary_force_zscale 1 set g_balance_okmachinegun_secondary_lifetime 5 set g_balance_okmachinegun_secondary_radius 70 set g_balance_okmachinegun_secondary_refire 0.7 @@@ -908,7 -845,7 +845,7 @@@ set g_balance_okmachinegun_weaponstart set g_balance_okmachinegun_weaponstartoverride -1 set g_balance_okmachinegun_weaponthrowable 1 // }}} - // {{{ Overkill Nex + // {{{ #23: Overkill Nex (MUTATOR WEAPON) set g_balance_oknex_charge 0 set g_balance_oknex_charge_animlimit 0.5 set g_balance_oknex_charge_limit 1 @@@ -943,13 -880,14 +880,14 @@@ set g_balance_oknex_secondary_damagefal set g_balance_oknex_secondary_damagefalloff_halflife 0 set g_balance_oknex_secondary_damagefalloff_maxdist 0 set g_balance_oknex_secondary_damagefalloff_mindist 0 - set g_balance_oknex_secondary_force 300 - set g_balance_oknex_secondary_refire 0.7 - set g_balance_oknex_secondary_refire_type 1 set g_balance_oknex_secondary_delay 0 set g_balance_oknex_secondary_edgedamage 12.5 + set g_balance_oknex_secondary_force 360 + set g_balance_oknex_secondary_force_zscale 1 set g_balance_oknex_secondary_lifetime 5 set g_balance_oknex_secondary_radius 70 + set g_balance_oknex_secondary_refire 0.7 + set g_balance_oknex_secondary_refire_type 1 set g_balance_oknex_secondary_shotangle 0 set g_balance_oknex_secondary_speed 6000 set g_balance_oknex_secondary_spread 0 @@@ -960,3 -898,72 +898,72 @@@ set g_balance_oknex_weaponstart set g_balance_oknex_weaponstartoverride -1 set g_balance_oknex_weaponthrowable 1 // }}} + // {{{ #24: Overkill Rocket Propelled Chainsaw (MUTATOR WEAPON) + set g_balance_okrpc_primary_ammo 10 + set g_balance_okrpc_primary_animtime 1 + set g_balance_okrpc_primary_damage 150 + set g_balance_okrpc_primary_damage2 500 + set g_balance_okrpc_primary_damageforcescale 2 + set g_balance_okrpc_primary_edgedamage 50 + set g_balance_okrpc_primary_force 400 + set g_balance_okrpc_primary_health 25 + set g_balance_okrpc_primary_lifetime 30 + set g_balance_okrpc_primary_radius 300 + set g_balance_okrpc_primary_refire 1 + set g_balance_okrpc_primary_speed 2500 + set g_balance_okrpc_primary_speedaccel 5000 + set g_balance_okrpc_reload_ammo 10 + set g_balance_okrpc_reload_time 1 + set g_balance_okrpc_secondary_ammo 0 + set g_balance_okrpc_secondary_animtime 0.2 + set g_balance_okrpc_secondary_damage 25 + set g_balance_okrpc_secondary_delay 0 + set g_balance_okrpc_secondary_edgedamage 12.5 + set g_balance_okrpc_secondary_force 360 + set g_balance_okrpc_secondary_force_zscale 1 + set g_balance_okrpc_secondary_lifetime 5 + set g_balance_okrpc_secondary_radius 70 + set g_balance_okrpc_secondary_refire 0.7 + set g_balance_okrpc_secondary_refire_type 1 + set g_balance_okrpc_secondary_shotangle 0 + set g_balance_okrpc_secondary_speed 6000 + set g_balance_okrpc_secondary_spread 0 + set g_balance_okrpc_switchdelay_drop 0.2 + set g_balance_okrpc_switchdelay_raise 0.2 + set g_balance_okrpc_weaponreplace "" + set g_balance_okrpc_weaponstart 0 + set g_balance_okrpc_weaponstartoverride 0 + set g_balance_okrpc_weaponthrowable 0 + // }}} + // {{{ #25: Overkill Shotgun (MUTATOR WEAPON) + set g_balance_okshotgun_primary_ammo 3 + set g_balance_okshotgun_primary_animtime 0.65 + set g_balance_okshotgun_primary_bot_range 512 + set g_balance_okshotgun_primary_bullets 10 + set g_balance_okshotgun_primary_damage 17 + set g_balance_okshotgun_primary_force 80 + set g_balance_okshotgun_primary_refire 0.75 + set g_balance_okshotgun_primary_solidpenetration 3.8 + set g_balance_okshotgun_primary_spread 0.07 + set g_balance_okshotgun_reload_ammo 24 + set g_balance_okshotgun_reload_time 2 + set g_balance_okshotgun_secondary_animtime 0.2 + set g_balance_okshotgun_secondary_damage 25 + set g_balance_okshotgun_secondary_delay 0 + set g_balance_okshotgun_secondary_edgedamage 12.5 + set g_balance_okshotgun_secondary_force 360 + set g_balance_okshotgun_secondary_force_zscale 1 + set g_balance_okshotgun_secondary_lifetime 5 + set g_balance_okshotgun_secondary_radius 70 + set g_balance_okshotgun_secondary_refire 0.7 + set g_balance_okshotgun_secondary_refire_type 1 + set g_balance_okshotgun_secondary_shotangle 0 + set g_balance_okshotgun_secondary_speed 6000 + set g_balance_okshotgun_secondary_spread 0 + set g_balance_okshotgun_switchdelay_drop 0.2 + set g_balance_okshotgun_switchdelay_raise 0.2 + set g_balance_okshotgun_weaponreplace "" + set g_balance_okshotgun_weaponstart 0 + set g_balance_okshotgun_weaponstartoverride -1 + set g_balance_okshotgun_weaponthrowable 1 + // }}} diff --combined qcsrc/server/autocvars.qh index 049c15cb42,4b71e28e8b..21e71c5c65 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@@ -91,8 -91,7 +91,8 @@@ float autocvar_g_balance_selfdamageperc float autocvar_g_ballistics_density_corpse; float autocvar_g_ballistics_density_player; float autocvar_g_ballistics_mindistance; -bool autocvar_g_ballistics_penetrate_clips; +bool autocvar_g_ballistics_penetrate_clips = true; +float autocvar_g_ballistics_solidpenetration_exponent = 0.25; float autocvar_g_ban_default_bantime; float autocvar_g_ban_default_masksize; float autocvar_g_ban_sync_interval; @@@ -157,6 -156,7 +157,7 @@@ string autocvar_g_maplist_votable_scree bool autocvar_g_maplist_votable_suggestions; bool autocvar_g_maplist_votable_suggestions_override_mostrecent; float autocvar_g_maplist_votable_timeout; + bool autocvar_g_maplist_ignore_sizes; int autocvar_g_maxplayers; float autocvar_g_maxplayers_spectator_blocktime; float autocvar_g_maxpushtime; @@@ -180,6 -180,7 +181,7 @@@ float autocvar_g_items_maxdist int autocvar_g_pickup_items; float autocvar_g_player_alpha; float autocvar_g_player_brightness; + float autocvar_g_player_damageforcescale = 2; bool autocvar_g_playerclip_collisions; int autocvar_g_powerups; int autocvar_g_projectiles_damage; @@@ -253,7 -254,6 +255,6 @@@ int autocvar_leadlimit_and_fraglimit int autocvar_leadlimit_override; int autocvar_minplayers; int autocvar_minplayers_per_team; - int autocvar_name_maxlength; string autocvar_nextmap; string autocvar_quit_and_redirect; float autocvar_quit_and_redirect_timer; @@@ -316,6 -316,7 +317,7 @@@ float autocvar_sv_mapchange_delay float autocvar_sv_maxairspeed; float autocvar_sv_maxspeed; string autocvar_sv_motd; + int autocvar_sv_name_maxlength = 64; bool autocvar_sv_precacheplayermodels; bool autocvar_sv_q3acompat_machineshotgunswap; bool autocvar_sv_servermodelsonly; diff --combined qcsrc/server/defs.qh index 0851518981,566d57b57d..65d2bd6631 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@@ -181,6 -181,7 +181,7 @@@ float default_weapon_alpha .float cvar_cl_allow_uid2name; .float cvar_cl_allow_uidtracking; + .bool cvar_cl_allow_uidranking; .string stored_netname; string gamemode_name; @@@ -190,9 -191,6 +191,6 @@@ string W_Apply_Weaponreplace(string in) void FixIntermissionClient(entity e); void FixClientCvars(entity e); - // WEAPONTODO: remove this - //WepSet weaponsInMap; - .float respawn_countdown; // next number to count float bot_waypoints_for_items; @@@ -298,11 -296,6 +296,6 @@@ string matchid bool radar_showennemies; - #ifdef PROFILING - float client_cefc_accumulator; - float client_cefc_accumulatortime; - #endif - .float weapon_load[Weapons_MAX]; .int ammo_none; // used by the reloading system, must always be 0 .int clip_load; @@@ -338,7 -331,7 +331,7 @@@ string deathmessage .float cvar_cl_weaponimpulsemode; .int selectweapon; // last selected weapon of the player -.float ballistics_density; // wall piercing factor, larger = bullet can pass through more +.float ballistics_density; //const int FROZEN_NOT = 0; const int FROZEN_NORMAL = 1; diff --combined qcsrc/server/weapons/tracing.qc index fdee0d6fe9,99fa2df749..09e9eab980 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@@ -213,10 -213,7 +213,7 @@@ void W_SetupProjVelocity_Explicit(entit void FireRailgunBullet (entity this, .entity weaponentity, vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype) { - entity pseudoprojectile = NULL; - vector dir = normalize(end - start); - float length = vlen(end - start); vector force = dir * bforce; // go a little bit into the wall because we need to hit this wall later @@@ -273,42 -270,31 +270,31 @@@ it.solid = it.railgunhitsolidbackup; }); - // spawn a temporary explosion entity for RadiusDamage calls - //explosion = spawn(); + // Find all players the beam passed close by (even those hit) + float length = vlen(endpoint - start); + entity pseudoprojectile = NULL; + FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != this, { + // not when spectating the shooter + if (IS_SPEC(it) && it.enemy == this) continue; - // Find all non-hit players the beam passed close by - if(deathtype == WEP_VAPORIZER.m_id || deathtype == WEP_VORTEX.m_id) // WEAPONTODO - { - FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != this, { - if(!it.railgunhit) - if(!(IS_SPEC(it) && it.enemy == this)) - { - msg_entity = it; - // nearest point on the beam - vector beampos = start + dir * bound(0, (msg_entity.origin - start) * dir, length); + // nearest point on the beam + vector beampos = start + dir * bound(0, (it.origin - start) * dir, length); - float f = bound(0, 1 - vlen(beampos - msg_entity.origin) / 512, 1); - if(f <= 0) - continue; + if(!pseudoprojectile) + pseudoprojectile = spawn(); // we need this so the sound uses the "entchannel4" volume - if(!pseudoprojectile) - pseudoprojectile = spawn(); // we need this so the sound uses the "entchannel4" volume - soundtoat(MSG_ONE, pseudoprojectile, beampos, CH_SHOTS, SND(NEXWHOOSH_RANDOM()), VOL_BASE * f, ATTEN_NONE); - } - }); - - if(pseudoprojectile) - delete(pseudoprojectile); - } + msg_entity = it; + // we want this to be very loud when close but fall off quickly -> using max base volume and high attenuation + soundtoat(MSG_ONE, pseudoprojectile, beampos, CH_SHOTS, SND(NEXWHOOSH_RANDOM()), VOL_BASEVOICE, ATTEN_IDLE); + }); + if(pseudoprojectile) + delete(pseudoprojectile); // find all the entities the railgun hit and hurt them IL_EACH(g_railgunhit, it.railgunhit, { // removal from the list is handled below - // get the details we need to call the damage function - vector hitloc = it.railgunhitloc; - float foff = ExponentialFalloff(mindist, maxdist, halflifedist, it.railgundistance); float ffs = ExponentialFalloff(mindist, maxdist, forcehalflifedist, it.railgundistance); @@@ -317,11 -303,7 +303,7 @@@ // apply the damage if (it.takedamage) - Damage (it, this, this, bdamage * foff, deathtype, weaponentity, hitloc, it.railgunforce * ffs); - - // create a small explosion to throw gibs around (if applicable) - //setorigin(explosion, hitloc); - //RadiusDamage (explosion, this, 10, 0, 50, NULL, NULL, 300, deathtype); + Damage(it, this, this, bdamage * foff, deathtype, weaponentity, it.railgunhitloc, it.railgunforce * ffs); it.railgunhitloc = '0 0 0'; it.railgunhitsolidbackup = SOLID_NOT; @@@ -350,14 -332,15 +332,14 @@@ void fireBullet_trace_callback(vector s void fireBullet(entity this, .entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, entity tracer_effect) { - vector end; - dir = normalize(dir + randomvec() * spread); - end = start + dir * max_shot_distance; + vector end = start + dir * max_shot_distance; fireBullet_last_hit = NULL; fireBullet_trace_callback_eff = tracer_effect; - float solid_penetration_left = 1; + float solid_penetration_fraction = 1; + float damage_fraction = 1; float total_damage = 0; float lag = ((IS_REAL_CLIENT(this)) ? ANTILAG_LATENCY(this) : 0); @@@ -378,6 -361,7 +360,6 @@@ for (;;) { - // TODO also show effect while tracing WarpZone_TraceBox_ThroughZone(start, '0 0 0', '0 0 0', end, false, WarpZone_trace_forent, NULL, fireBullet_trace_callback); dir = WarpZone_TransformVelocity(WarpZone_trace_transform, dir); end = WarpZone_TransformOrigin(WarpZone_trace_transform, end); @@@ -415,7 -399,7 +397,7 @@@ is_weapclip = true; if(!hit || hit.solid == SOLID_BSP || hit.solid == SOLID_SLIDEBOX) - Damage_DamageInfo(start, damage * solid_penetration_left, 0, 0, max(1, force) * dir * solid_penetration_left, dtype, hit.species, this); + Damage_DamageInfo(start, damage * damage_fraction, 0, 0, max(1, force) * dir * damage_fraction, dtype, hit.species, this); if (hit && hit != WarpZone_trace_forent && hit != fireBullet_last_hit) // Avoid self-damage (except after going through a warp); avoid hitting the same entity twice (engine bug). { @@@ -424,13 -408,13 +406,13 @@@ MUTATOR_CALLHOOK(FireBullet_Hit, this, hit, start, end, damage, this.(weaponentity)); damage = M_ARGV(4, float); bool gooddamage = accuracy_isgooddamage(this, hit); - Damage(hit, this, this, damage * solid_penetration_left, dtype, weaponentity, start, force * dir * solid_penetration_left); + Damage(hit, this, this, damage * damage_fraction, dtype, weaponentity, start, force * dir * damage_fraction); // calculate hits for ballistic weapons if(gooddamage) { // do not exceed 100% - float added_damage = min(damage - total_damage, damage * solid_penetration_left); - total_damage += damage * solid_penetration_left; + float added_damage = min(damage - total_damage, damage * damage_fraction); + total_damage += damage * damage_fraction; accuracy_add(this, this.(weaponentity).m_weapon, 0, added_damage); } } @@@ -452,9 -436,9 +434,9 @@@ else if(hitstore.ballistics_density < 0) maxdist = vlen(hit.maxs - hit.mins) + 1; // -1: infinite travel distance else if(hitstore.ballistics_density == 0) - maxdist = max_solid_penetration * solid_penetration_left; + maxdist = max_solid_penetration * solid_penetration_fraction; else - maxdist = max_solid_penetration * solid_penetration_left * hitstore.ballistics_density; + maxdist = max_solid_penetration * solid_penetration_fraction / hitstore.ballistics_density; if(maxdist <= autocvar_g_ballistics_mindistance) break; @@@ -466,10 -450,10 +448,10 @@@ break; float dist_taken = max(autocvar_g_ballistics_mindistance, vlen(trace_endpos - start)); - // fraction_used_of_what_is_left = dist_taken / maxdist - // solid_penetration_left = solid_penetration_left - solid_penetration_left * fraction_used_of_what_is_left - solid_penetration_left *= 1 - dist_taken / maxdist; - solid_penetration_left = max(solid_penetration_left, 0); + float fraction_used_of_what_is_left = dist_taken / maxdist; + solid_penetration_fraction -= solid_penetration_fraction * fraction_used_of_what_is_left; + solid_penetration_fraction = max(solid_penetration_fraction, 0); + damage_fraction = pow(solid_penetration_fraction, autocvar_g_ballistics_solidpenetration_exponent); // Only show effect when going through a player (invisible otherwise) if (hit && (hit.solid != SOLID_BSP)) @@@ -479,7 -463,7 +461,7 @@@ start = trace_endpos; if(hit.solid == SOLID_BSP) - Damage_DamageInfo(start, 0, 0, 0, max(1, force) * normalize(dir) * -solid_penetration_left, dtype, 0, this); + Damage_DamageInfo(start, 0, 0, 0, max(1, force) * normalize(dir) * -damage_fraction, dtype, 0, this); } if(lag) diff --combined vehicles.cfg index 824d1fd8f3,d3a2c0bc56..8ed454533f --- a/vehicles.cfg +++ b/vehicles.cfg @@@ -11,6 -11,7 +11,7 @@@ set g_vehicles_teams 1 "allow team spec set g_vehicles_teleportable 0 set g_vehicles_crush_dmg 70 set g_vehicles_crush_force 50 + set g_vehicles_crush_minspeed 100 set g_vehicles_allow_bots 0 set g_vehicles_exit_attempts 25 set g_vehicles_thinkrate 0.1 @@@ -287,7 -288,7 +288,7 @@@ set g_vehicle_spiderbot_minigun_ammo_ma set g_vehicle_spiderbot_minigun_ammo_regen 40 set g_vehicle_spiderbot_minigun_ammo_regen_pause 1 set g_vehicle_spiderbot_minigun_force 9 -set g_vehicle_spiderbot_minigun_solidpenetration 32 +set g_vehicle_spiderbot_minigun_solidpenetration 80 set g_vehicle_spiderbot_rocket_damage 50 set g_vehicle_spiderbot_rocket_force 150 diff --combined xonotic-server.cfg index 0936eca2f6,158b32ecd5..65dac0d52c --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@@ -2,7 -2,7 +2,7 @@@ // note that it doesn't reset all server cvars, // some are shared with the client and so are left in xonotic-common.cfg - set name_maxlength 64 "max player name length (not counting color codes) allowed by the server" + set sv_name_maxlength 64 "max player name length (not counting color codes) allowed by the server" // taunts and voices set sv_taunt 1 "allow taunts on the server" @@@ -195,7 -195,7 +195,7 @@@ set g_pickup_items -1 "if set to 0 all set g_pickup_respawntime_scaling_reciprocal 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `reciprocal` (with `offset` and `linear` set to 0) can be used to achieve a constant number of items spawned *per player*" set g_pickup_respawntime_scaling_offset 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `offset` offsets the curve left or right - the results are not intuitive and I recommend plotting the respawn time and the number of items per player to see what's happening" set g_pickup_respawntime_scaling_linear 1 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `linear` can be used to simply scale the respawn time linearly" - set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\"" + set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\", \"most\", \"all_available\" or \"most_available\" (available only gives the weapon if the map normally has it as a pickup item)" set g_weaponarena_random "0" "if set to a number, only that weapon count is given on every spawn (randomly)" set g_weaponarena_random_with_blaster "1" "additionally, always provide the blaster in random weapon arena games" set g_spawnpoints_auto_move_out_of_solid 0 "if set to 1 you will see a warning if a spawn point was placed inside a solid" @@@ -212,6 -212,7 +212,7 @@@ set g_maplist_index 0 "this is used int set g_maplist_selectrandom 0 "if 1, a random map will be chosen as next map - DEPRECATED in favor of g_maplist_shuffle" set g_maplist_shuffle 1 "new randomization method: like selectrandom, but avoid playing the same maps in short succession. This works by taking out the first element and inserting it into g_maplist with a bias to the end of the list" set g_maplist_check_waypoints 0 "when 1, maps are skipped if there currently are bots, but the map has no waypoints" + set g_maplist_ignore_sizes 0 "when 1, all maps are shown in the map list regardless of player count" set g_items_mindist 4000 "starting distance for the fading of items" set g_items_maxdist 4500 "maximum distance at which an item can be viewed, after which it will be invisible" @@@ -221,6 -222,7 +222,7 @@@ set g_grab_range 200 "distance at whic set g_cloaked 0 "display all players mostly invisible" set g_player_alpha 1 "default opacity of players" set g_player_brightness 0 "set to 2 for brighter players" + set g_player_damageforcescale 2 "push multiplier of attacks against players" set g_balance_cloaked_alpha 0.25 "opacity of cloaked players" set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps" @@@ -418,11 -420,15 +420,11 @@@ set g_ban_sync_trusted_servers_verify set g_showweaponspawns 1 "1: display waypoints for weapon spawns found on the map when a weapon key is pressed and the weapon is not owned; 2: for dropped weapons too; 3: for all the weapons sharing the same impulse" -// ballistics use physical units, but qu based -// Quake-Newton: 1 qN = 1 qu * 1 g / 1 s^2 -// Quake-Joule: 1 qJ = 1 qN * 1 qu -// Quake-Pascal: 1 qPa = 1 qN / 1 qu^2 - -set g_ballistics_mindistance 2 "enable ballistics starting from 2 qu" -set g_ballistics_density_player 0.50 "players are 2x as easy to pass through as walls" -set g_ballistics_density_corpse 0.10 "corpses are 10x as easy to pass through as walls" -set g_ballistics_penetrate_clips 0 "allow ballistics to pass through weapon clips" +set g_ballistics_mindistance 2 "when shooting through walls thinner than this, treat them as this thick (useful because patches (curved surfaces) have no thickness)" +set g_ballistics_density_player 0.50 "how hard players are to shoot through compared to walls" +set g_ballistics_density_corpse 0.10 "how hard corpses are to shoot through compared to walls" +set g_ballistics_penetrate_clips 1 "allow ballistics to pass through weapon clips" +set g_ballistics_solidpenetration_exponent 0.25 "how fast damage falls off when bullets pass through walls - 1 means linear, lower values mean slower initial falloff but faster once there's little solidpenetration left (damage_fraction = solidpen_fraction^exp for solidpen_fraction between 0 and 1)" sv_status_show_qcstatus 1 "Xonotic uses this field instead of frags" set g_full_getstatus_responses 0 "this currently breaks qstat"