From: Mario Date: Sun, 3 Jul 2016 23:13:54 +0000 (+1000) Subject: Merge remote-tracking branch 'origin/DefaultUser/ca_spectator_fix' X-Git-Tag: xonotic-v0.8.2~700^2~103 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=fd6e61d095d67bd7ff6a8996024c4cb4e4446024;hp=d7130529917aaf12a7e736cb1c9cc4b79679ef9d Merge remote-tracking branch 'origin/DefaultUser/ca_spectator_fix' --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3cdd43f305..7909c3286a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ test_sv_game: - wget -O data/maps/g-23.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.cache - wget -O data/maps/g-23.waypoints.hardwired https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.hardwired - make - - EXPECT=4bd5b0276cdd100c831c73f0400eca71 + - EXPECT=9b2513f29762de886296f998ac8725c9 - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg | tee /dev/stderr | grep '^:' diff --git a/balance-nexuiz25.cfg b/balance-nexuiz25.cfg index 3ac47371ee..f49e50cce2 100644 --- a/balance-nexuiz25.cfg +++ b/balance-nexuiz25.cfg @@ -32,7 +32,7 @@ set g_balance_nix_ammo_nails 45 set g_balance_nix_ammo_rockets 15 set g_balance_nix_ammo_cells 15 set g_balance_nix_ammo_plasma 15 -set g_balance_nix_ammo_fuel 0 +set g_balance_nix_ammo_fuel 25 set g_balance_nix_ammoincr_shells 2 // eh this will need figured out later I assume set g_balance_nix_ammoincr_nails 6 set g_balance_nix_ammoincr_rockets 2 diff --git a/balance-overkill.cfg b/balance-overkill.cfg index a691a19183..1a4b9bb940 100644 --- a/balance-overkill.cfg +++ b/balance-overkill.cfg @@ -32,7 +32,7 @@ set g_balance_nix_ammo_nails 320 set g_balance_nix_ammo_rockets 160 set g_balance_nix_ammo_cells 180 set g_balance_nix_ammo_plasma 180 -set g_balance_nix_ammo_fuel 0 +set g_balance_nix_ammo_fuel 100 set g_balance_nix_ammoincr_shells 2 // eh this will need figured out later I assume set g_balance_nix_ammoincr_nails 6 set g_balance_nix_ammoincr_rockets 2 diff --git a/balance-samual.cfg b/balance-samual.cfg index 6d7831adac..08e38f1671 100644 --- a/balance-samual.cfg +++ b/balance-samual.cfg @@ -32,7 +32,7 @@ set g_balance_nix_ammo_nails 320 set g_balance_nix_ammo_rockets 160 set g_balance_nix_ammo_cells 180 set g_balance_nix_ammo_plasma 180 -set g_balance_nix_ammo_fuel 0 +set g_balance_nix_ammo_fuel 100 set g_balance_nix_ammoincr_shells 2 // eh this will need figured out later I assume set g_balance_nix_ammoincr_nails 6 set g_balance_nix_ammoincr_rockets 2 diff --git a/balance-xdf.cfg b/balance-xdf.cfg index 07b38e830a..e816f89abd 100644 --- a/balance-xdf.cfg +++ b/balance-xdf.cfg @@ -32,7 +32,7 @@ set g_balance_nix_ammo_nails 320 set g_balance_nix_ammo_rockets 160 set g_balance_nix_ammo_cells 180 set g_balance_nix_ammo_plasma 180 -set g_balance_nix_ammo_fuel 0 +set g_balance_nix_ammo_fuel 100 set g_balance_nix_ammoincr_shells 2 // eh this will need figured out later I assume set g_balance_nix_ammoincr_nails 6 set g_balance_nix_ammoincr_rockets 2 diff --git a/balance-xonotic.cfg b/balance-xonotic.cfg index ddc40e288e..aafb810449 100644 --- a/balance-xonotic.cfg +++ b/balance-xonotic.cfg @@ -32,7 +32,7 @@ set g_balance_nix_ammo_nails 320 set g_balance_nix_ammo_rockets 160 set g_balance_nix_ammo_cells 180 set g_balance_nix_ammo_plasma 180 -set g_balance_nix_ammo_fuel 0 +set g_balance_nix_ammo_fuel 100 set g_balance_nix_ammoincr_shells 2 // eh this will need figured out later I assume set g_balance_nix_ammoincr_nails 6 set g_balance_nix_ammoincr_rockets 2 diff --git a/balance-xpm.cfg b/balance-xpm.cfg index e0aa8b0827..342d3e068e 100644 --- a/balance-xpm.cfg +++ b/balance-xpm.cfg @@ -32,7 +32,7 @@ set g_balance_nix_ammo_nails 320 set g_balance_nix_ammo_rockets 160 set g_balance_nix_ammo_cells 180 set g_balance_nix_ammo_plasma 180 -set g_balance_nix_ammo_fuel 0 +set g_balance_nix_ammo_fuel 100 set g_balance_nix_ammoincr_shells 2 // eh this will need figured out later I assume set g_balance_nix_ammoincr_nails 6 set g_balance_nix_ammoincr_rockets 2 diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 0c280744af..3b3e48b620 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -784,6 +784,8 @@ seta cl_damagetext_alpha_lifetime "3" "Damage text lifetime in seconds" seta cl_damagetext_velocity "0 0 20" "Damage text move direction" seta cl_damagetext_offset "0 -40 0" "Damage text offset" seta cl_damagetext_accumulate_range "30" "Damage text spawned within this range is accumulated" +seta cl_damagetext_friendlyfire "1" "Show damage text for friendlyfire too" +seta cl_damagetext_friendlyfire_color "1 0 0" "Damage text color for friendlyfire" set sv_itemstime 1 "enable networking of left time until respawn for items such as mega health and large armor" diff --git a/models/weapons/g_fireball.md3 b/models/weapons/g_fireball.md3 index c953426724..b1463090f7 100644 Binary files a/models/weapons/g_fireball.md3 and b/models/weapons/g_fireball.md3 differ diff --git a/models/weapons/h_fireball.iqm b/models/weapons/h_fireball.iqm index 40a6b06a83..3a9db00ced 100644 Binary files a/models/weapons/h_fireball.iqm and b/models/weapons/h_fireball.iqm differ diff --git a/models/weapons/v_fireball.md3 b/models/weapons/v_fireball.md3 index a5e847c37b..18fbf74890 100644 Binary files a/models/weapons/v_fireball.md3 and b/models/weapons/v_fireball.md3 differ diff --git a/qcsrc/client/hud/panel/vote.qc b/qcsrc/client/hud/panel/vote.qc index 89c784a108..d7d4d252be 100644 --- a/qcsrc/client/hud/panel/vote.qc +++ b/qcsrc/client/hud/panel/vote.qc @@ -7,6 +7,15 @@ void HUD_Vote() { if(autocvar_cl_allow_uid2name == -1 && (gametype == MAPINFO_TYPE_CTS || gametype == MAPINFO_TYPE_RACE || (serverflags & SERVERFLAG_PLAYERSTATS))) { + // this dialog gets overriden by the uid2name menu dialog, if it exists + // TODO remove this client side uid2name dialog in the next release + if(autocvar__menu_alpha) + hud_fade_alpha = 0; + else + uid2name_dialog = 0; + if (!uid2name_dialog) + localcmd("menu_cmd directmenu Uid2Name\n"); + vote_active = 1; if (autocvar__hud_configure) { diff --git a/qcsrc/client/hud/panel/weapons.qc b/qcsrc/client/hud/panel/weapons.qc index 984cb4f505..a30006c263 100644 --- a/qcsrc/client/hud/panel/weapons.qc +++ b/qcsrc/client/hud/panel/weapons.qc @@ -56,6 +56,8 @@ void HUD_Weapons() float when = max(1, autocvar_hud_panel_weapons_complainbubble_time); float fadetime = max(0, autocvar_hud_panel_weapons_complainbubble_fadetime); + bool infinite_ammo = (STAT(ITEMS) & IT_UNLIMITED_WEAPON_AMMO); + vector weapon_pos, weapon_size = '0 0 0'; vector color; @@ -330,7 +332,7 @@ void HUD_Weapons() } // calculate position/size for visual bar displaying ammount of ammo status - if (autocvar_hud_panel_weapons_ammo) + if (!infinite_ammo && autocvar_hud_panel_weapons_ammo) { ammo_color = stov(autocvar_hud_panel_weapons_ammo_color); ammo_alpha = panel_fg_alpha * autocvar_hud_panel_weapons_ammo_alpha; @@ -466,7 +468,7 @@ void HUD_Weapons() } // draw ammo status bar - if(autocvar_hud_panel_weapons_ammo && (it.ammo_field != ammo_none)) + if(!infinite_ammo && autocvar_hud_panel_weapons_ammo && (it.ammo_field != ammo_none)) { float ammo_full; a = getstati(GetAmmoStat(it.ammo_field)); // how much ammo do we have? diff --git a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc index 2a1795d63c..371bf2bbe0 100644 --- a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc @@ -25,16 +25,20 @@ AUTOCVAR_SAVE(cl_damagetext_alpha_lifetime, float, 3, "Damage text AUTOCVAR_SAVE(cl_damagetext_velocity, vector, '0 0 20', "Damage text move direction"); AUTOCVAR_SAVE(cl_damagetext_offset, vector, '0 -40 0', "Damage text offset"); AUTOCVAR_SAVE(cl_damagetext_accumulate_range, float, 30, "Damage text spawned within this range is accumulated"); +AUTOCVAR_SAVE(cl_damagetext_friendlyfire, bool, true, "Show damage text for friendlyfire too"); +AUTOCVAR_SAVE(cl_damagetext_friendlyfire_color, vector, '1 0 0', "Damage text color for friendlyfire"); #endif #ifdef CSQC CLASS(DamageText, Object) ATTRIB(DamageText, m_color, vector, autocvar_cl_damagetext_color) + ATTRIB(DamageText, m_color_friendlyfire, vector, autocvar_cl_damagetext_friendlyfire_color) ATTRIB(DamageText, m_size, float, autocvar_cl_damagetext_size) ATTRIB(DamageText, alpha, float, autocvar_cl_damagetext_alpha_start) ATTRIB(DamageText, fade_rate, float, 1 / autocvar_cl_damagetext_alpha_lifetime) ATTRIB(DamageText, velocity, vector, autocvar_cl_damagetext_velocity) ATTRIB(DamageText, m_group, int, 0) + ATTRIB(DamageText, m_friendlyfire, bool, false) ATTRIB(DamageText, m_damage, int, 0) ATTRIB(DamageText, m_armordamage, int, 0) ATTRIB(DamageText, m_deathtype, int, 0) @@ -49,7 +53,13 @@ CLASS(DamageText, Object) vector pos = project_3d_to_2d(this.origin) + autocvar_cl_damagetext_offset; if (pos.z >= 0 && this.m_size > 0) { pos.z = 0; - vector rgb = this.m_color; + vector rgb; + if (this.m_friendlyfire) { + rgb = this.m_color_friendlyfire; + } + else { + rgb = this.m_color; + } if (autocvar_cl_damagetext_color_per_weapon) { Weapon w = DEATH_WEAPONOF(this.m_deathtype); if (w != WEP_Null) rgb = w.wpcolor; @@ -71,9 +81,10 @@ CLASS(DamageText, Object) this.alpha = 1; } - CONSTRUCTOR(DamageText, int _group, vector _origin, int _health, int _armor, int _deathtype) { + CONSTRUCTOR(DamageText, int _group, vector _origin, int _health, int _armor, int _deathtype, bool _friendlyfire) { CONSTRUCT(DamageText); this.m_group = _group; + this.m_friendlyfire = _friendlyfire; DamageText_update(this, _origin, _health, _armor, _deathtype); } ENDCLASS(DamageText) @@ -111,6 +122,7 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) { WriteCoord(MSG_ONE, location.y); WriteCoord(MSG_ONE, location.z); WriteInt24_t(MSG_ONE, deathtype); + WriteByte(MSG_ONE, SAME_TEAM(hit, attacker)); } )); } @@ -124,8 +136,12 @@ NET_HANDLE(damagetext, bool isNew) int group = ReadShort(); vector location = vec3(ReadCoord(), ReadCoord(), ReadCoord()); int deathtype = ReadInt24_t(); + bool friendlyfire = ReadByte(); return = true; if (autocvar_cl_damagetext) { + if (friendlyfire && !autocvar_cl_damagetext_friendlyfire) { + return; + } if (autocvar_cl_damagetext_accumulate_range) { for (entity e = findradius(location, autocvar_cl_damagetext_accumulate_range); e; e = e.chain) { if (e.instanceOfDamageText && e.m_group == group) { @@ -134,7 +150,7 @@ NET_HANDLE(damagetext, bool isNew) } } } - NEW(DamageText, group, location, health, armor, deathtype); + NEW(DamageText, group, location, health, armor, deathtype, friendlyfire); } } #endif @@ -174,6 +190,17 @@ CLASS(XonoticDamageTextSettings, XonoticTab) setDependent(e, "cl_damagetext", 1, 1); this.TD(this, 2, 2, e = makeXonoticColorpickerString("cl_damagetext_color", "cl_damagetext_color")); setDependent(e, "cl_damagetext", 1, 1); + this.TR(this); + this.TR(this); + // friendly fire + this.TD(this, 1, 3, e = makeXonoticCheckBox(0, "cl_damagetext_friendlyfire", _("Draw damage numbers for friendly fire"))); + setDependent(e, "cl_damagetext", 1, 1); + this.TR(this); + this.TD(this, 1, 1, e = makeXonoticTextLabel(0, _("Color (Friendly Fire):"))); + setDependentAND(e, "cl_damagetext", 1, 1, "cl_damagetext_friendlyfire", 1, 1); + this.TD(this, 2, 2, e = makeXonoticColorpickerString("cl_damagetext_friendlyfire_color", "cl_damagetext_friendlyfire_color")); + setDependentAND(e, "cl_damagetext", 1, 1, "cl_damagetext_friendlyfire", 1, 1); + this.TR(this); } ENDCLASS(XonoticDamageTextSettings) #endif diff --git a/qcsrc/common/mutators/mutator/overkill/hmg.qc b/qcsrc/common/mutators/mutator/overkill/hmg.qc index e0ae539318..b8fd743098 100644 --- a/qcsrc/common/mutators/mutator/overkill/hmg.qc +++ b/qcsrc/common/mutators/mutator/overkill/hmg.qc @@ -62,8 +62,7 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weapone return; } - if(!thiswep.wr_checkammo1(thiswep, actor)) - if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO)) + if((!thiswep.wr_checkammo1(thiswep, actor) && !(actor.items & IT_UNLIMITED_WEAPON_AMMO)) || (!(actor.items & IT_SUPERWEAPON) && !(actor.items & IT_UNLIMITED_SUPERWEAPONS))) { W_SwitchWeapon_Force(actor, w_getbestweapon(actor)); w_ready(thiswep, actor, weaponentity, fire); diff --git a/qcsrc/common/physics/movetypes/toss.qc b/qcsrc/common/physics/movetypes/toss.qc index f515a75f9f..5bea38c5b8 100644 --- a/qcsrc/common/physics/movetypes/toss.qc +++ b/qcsrc/common/physics/movetypes/toss.qc @@ -23,13 +23,19 @@ void _Movetype_Physics_Toss(entity this, float dt) // SV_Physics_Toss _Movetype_CheckVelocity(this); - if (this.move_movetype == MOVETYPE_BOUNCE || this.move_movetype == MOVETYPE_TOSS) + /*if (this.move_movetype == MOVETYPE_BOUNCE || this.move_movetype == MOVETYPE_TOSS) { this.move_didgravity = 1; this.move_velocity_z -= (GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE ? 0.5 : 1) * dt * (this.gravity ? this.gravity : 1) * PHYS_GRAVITY(this); + }*/ + + if (this.move_movetype == MOVETYPE_BOUNCE || this.move_movetype == MOVETYPE_TOSS) + { + this.move_didgravity = true; + this.move_velocity_z -= (((this.gravity) ? this.gravity : 1) * PHYS_GRAVITY(this) * dt); } this.move_angles = this.move_angles + this.move_avelocity * dt; @@ -108,8 +114,8 @@ void _Movetype_Physics_Toss(entity this, float dt) // SV_Physics_Toss break; } - if (GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE && this.move_didgravity > 0 && !(this.move_flags & FL_ONGROUND)) - this.move_velocity_z -= 0.5 * dt * (this.gravity ? this.gravity : 1) * PHYS_GRAVITY(this); + //if (GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE && this.move_didgravity > 0 && !(this.move_flags & FL_ONGROUND)) + // this.move_velocity_z -= 0.5 * dt * (this.gravity ? this.gravity : 1) * PHYS_GRAVITY(this); _Movetype_CheckWaterTransition(this); } diff --git a/qcsrc/common/vehicles/vehicle/racer.qc b/qcsrc/common/vehicles/vehicle/racer.qc index 9e1a84771d..9c0f40210c 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qc +++ b/qcsrc/common/vehicles/vehicle/racer.qc @@ -186,7 +186,7 @@ bool racer_frame(entity this) traceline(vehic.origin, vehic.origin + '0 0 1', MOVE_NOMONSTERS, this); int cont = trace_dpstartcontents; - if(cont & DPCONTENTS_WATER) + if(!(cont & DPCONTENTS_WATER)) vehic.air_finished = time + autocvar_g_vehicle_racer_water_time; if(IS_DEAD(vehic)) diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index ab69c3c0d5..eedadfcebb 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -47,6 +47,8 @@ float autocvar_g_vehicle_raptor_speed_up = 1700; float autocvar_g_vehicle_raptor_speed_down = 1700; float autocvar_g_vehicle_raptor_friction = 2; +bool autocvar_g_vehicle_raptor_swim = false; + float autocvar_g_vehicle_raptor_cannon_turnspeed = 120; float autocvar_g_vehicle_raptor_cannon_turnlimit = 20; float autocvar_g_vehicle_raptor_cannon_pitchlimit_up = 12; @@ -726,6 +728,9 @@ METHOD(Raptor, vr_spawn, void(Raptor thisveh, entity instance)) instance.solid = SOLID_SLIDEBOX; instance.vehicle_energy = 1; + if(!autocvar_g_vehicle_raptor_swim) + instance.dphitcontentsmask |= DPCONTENTS_LIQUIDSMASK; + instance.PlayerPhysplug = raptor_frame; instance.bomb1.gun1.avelocity_y = 90; diff --git a/qcsrc/menu/item/dialog.qc b/qcsrc/menu/item/dialog.qc index c4a78fa568..f0aebabc2e 100644 --- a/qcsrc/menu/item/dialog.qc +++ b/qcsrc/menu/item/dialog.qc @@ -118,5 +118,8 @@ return 1; } } - return SUPER(Dialog).keyDown(me, key, ascii, shift); + float r = SUPER(Dialog).keyDown(me, key, ascii, shift); + if (!me.closable && key == K_ESCAPE) + return 1; + return r; } diff --git a/qcsrc/menu/item/inputcontainer.qc b/qcsrc/menu/item/inputcontainer.qc index 3840721e35..37c46240f7 100644 --- a/qcsrc/menu/item/inputcontainer.qc +++ b/qcsrc/menu/item/inputcontainer.qc @@ -20,7 +20,8 @@ float InputContainer_keyDown(entity me, float scan, float ascii, float shift) { entity f, ff; - if (SUPER(InputContainer).keyDown(me, scan, ascii, shift)) return 1; + if (SUPER(InputContainer).keyDown(me, scan, ascii, shift)) + return 1; if (scan == K_ESCAPE) { f = me.focusedChild; diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index 96d98b9c50..9b617ab8a1 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -270,7 +270,8 @@ void m_keydown(float key, float ascii) else { draw_reset_cropped(); - if (!mouseButtonsPressed && key >= K_MOUSE1 && key <= K_MOUSE3) main.mousePress(main, menuMousePos); + if (!mouseButtonsPressed && key >= K_MOUSE1 && key <= K_MOUSE3) + main.mousePress(main, menuMousePos); if (!main.keyDown(main, key, ascii, menuShiftState)) { // disable menu on unhandled ESC diff --git a/qcsrc/menu/xonotic/_mod.inc b/qcsrc/menu/xonotic/_mod.inc index 867f77b840..577c822580 100644 --- a/qcsrc/menu/xonotic/_mod.inc +++ b/qcsrc/menu/xonotic/_mod.inc @@ -79,6 +79,7 @@ #include #include #include +#include #include #include #include diff --git a/qcsrc/menu/xonotic/_mod.qh b/qcsrc/menu/xonotic/_mod.qh index adfefc05d7..b6e34eff24 100644 --- a/qcsrc/menu/xonotic/_mod.qh +++ b/qcsrc/menu/xonotic/_mod.qh @@ -79,6 +79,7 @@ #include #include #include +#include #include #include #include diff --git a/qcsrc/menu/xonotic/dialog_settings_video.qc b/qcsrc/menu/xonotic/dialog_settings_video.qc index 9320a6ebf2..8ee51fde97 100644 --- a/qcsrc/menu/xonotic/dialog_settings_video.qc +++ b/qcsrc/menu/xonotic/dialog_settings_video.qc @@ -46,6 +46,7 @@ void XonoticVideoSettingsTab_fill(entity me) e.addValue(e, ZCTX(_("SZ^Gigantic")), "0.75"); e.addValue(e, ZCTX(_("SZ^Colossal")), "1"); e.configureXonoticTextSliderValues(e); + e.applyButton = videoApplyButton; me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Color depth:"))); me.TD(me, 1, 2, e = makeXonoticTextSlider_T("vid_bitsperpixel", diff --git a/qcsrc/menu/xonotic/dialog_uid2name.qc b/qcsrc/menu/xonotic/dialog_uid2name.qc new file mode 100644 index 0000000000..1cd77b0cad --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_uid2name.qc @@ -0,0 +1,18 @@ +#include "dialog_uid2name.qh" + +#include "textlabel.qh" +#include "commandbutton.qh" + +void XonoticUid2NameDialog_fill(entity me) +{ + entity e; + me.TR(me); + me.TD(me, 1, 2, makeXonoticTextLabel(0.5, _("Allow player statistics to use your nickname?"))); + me.TR(me); + me.TD(me, 1, 2, makeXonoticTextLabel(0.5, _("Answering \"No\" you will appear as \"Anonymous player\""))); + me.TR(me); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Yes"), '0 0 0', "vyes; setreport cl_allow_uid2name 1", COMMANDBUTTON_CLOSE)); + e.preferredFocusPriority = 1; + me.TD(me, 1, 1, e = makeXonoticCommandButton(_("No"), '0 0 0', "vno; setreport cl_allow_uid2name 0", COMMANDBUTTON_CLOSE)); +} diff --git a/qcsrc/menu/xonotic/dialog_uid2name.qh b/qcsrc/menu/xonotic/dialog_uid2name.qh new file mode 100644 index 0000000000..4bec3d1f9c --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_uid2name.qh @@ -0,0 +1,13 @@ +#pragma once + +#include "rootdialog.qh" +CLASS(XonoticUid2NameDialog, XonoticRootDialog) + METHOD(XonoticUid2NameDialog, fill, void(entity)); + ATTRIB(XonoticUid2NameDialog, title, string, string_null) + ATTRIB(XonoticUid2NameDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT) + ATTRIB(XonoticUid2NameDialog, intendedWidth, float, 0.5) + ATTRIB(XonoticUid2NameDialog, rows, float, 4) + ATTRIB(XonoticUid2NameDialog, columns, float, 2) + ATTRIB(XonoticUid2NameDialog, name, string, "Uid2Name") + ATTRIB(XonoticUid2NameDialog, closable, float, 0) +ENDCLASS(XonoticUid2NameDialog) diff --git a/qcsrc/menu/xonotic/mainwindow.qc b/qcsrc/menu/xonotic/mainwindow.qc index fb25eebdef..0e071c2e71 100644 --- a/qcsrc/menu/xonotic/mainwindow.qc +++ b/qcsrc/menu/xonotic/mainwindow.qc @@ -39,6 +39,7 @@ #include "dialog_sandboxtools.qh" #include "dialog_monstertools.qh" #include "dialog_teamselect.qh" +#include "dialog_uid2name.qh" #include "dialog_singleplayer.qh" #include "dialog_multiplayer.qh" #include "dialog_settings.qh" @@ -224,6 +225,10 @@ void MainWindow_configureMainWindow(entity me) i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + i = NEW(XonoticUid2NameDialog); + i.configureDialog(i); + me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + i = NEW(XonoticMonsterToolsDialog); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z * SKINALPHA_DIALOG_SANDBOXTOOLS); diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index 4d704606d3..e1ac53a298 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -429,6 +429,12 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data) } } + if(un_bannedservers != "") + { + _Nex_ExtResponseSystem_BannedServers = strzone(un_bannedservers); + _Nex_ExtResponseSystem_BannedServersNeedsRefresh = 1; + } + if(un_emergency_pk3s != "") { _Nex_ExtResponseSystem_Packs = strzone(un_emergency_pk3s); diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 733b093557..f23cb8b5c1 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1735,7 +1735,6 @@ bool SpectatePrev(entity this) ent = M_ARGV(1, entity); break; case MUT_SPECPREV_RETURN: - ent = M_ARGV(1, entity); return true; case MUT_SPECPREV_CONTINUE: default: @@ -2388,7 +2387,7 @@ void DrownPlayer(entity this) if(IS_DEAD(this)) return; - if (this.waterlevel != WATERLEVEL_SUBMERGED) + if (this.waterlevel != WATERLEVEL_SUBMERGED || this.vehicle) { if(this.air_finished < time) PlayerSound(this, playersound_gasp, CH_PLAYER, VOICETYPE_PLAYERSOUND); diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 4c54dddaa6..ae823f7bdb 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -494,11 +494,14 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, valid_damage_for_weaponstats = 1; } + dh = dh - max(this.health, 0); + da = da - max(this.armorvalue, 0); if(valid_damage_for_weaponstats) { - dh = dh - max(this.health, 0); - da = da - max(this.armorvalue, 0); WeaponStats_LogDamage(awep.m_id, abot, PS(this).m_weapon.m_id, vbot, dh + da); + } + if (dh + da) + { MUTATOR_CALLHOOK(PlayerDamaged, attacker, this, dh, da, hitloc, deathtype); } diff --git a/qcsrc/server/mutators/mutator/gamemode_ca.qc b/qcsrc/server/mutators/mutator/gamemode_ca.qc index 3ee1f515b9..6e302a1779 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ca.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ca.qc @@ -441,11 +441,11 @@ MUTATOR_HOOKFUNCTION(ca, SpectateSet) MUTATOR_HOOKFUNCTION(ca, SpectateNext) { entity client = M_ARGV(0, entity); - entity targ = M_ARGV(1, entity); if (!autocvar_g_ca_spectate_enemies && client.caplayer) { - targ = CA_SpectateNext(client, targ); + entity targ = M_ARGV(1, entity); + M_ARGV(1, entity) = CA_SpectateNext(client, targ); return true; } } @@ -470,6 +470,8 @@ MUTATOR_HOOKFUNCTION(ca, SpectatePrev) } } + M_ARGV(1, entity) = targ; + return MUT_SPECPREV_FOUND; } diff --git a/qcsrc/server/mutators/mutator/gamemode_tdm.qc b/qcsrc/server/mutators/mutator/gamemode_tdm.qc index 7874129085..0d516b2626 100644 --- a/qcsrc/server/mutators/mutator/gamemode_tdm.qc +++ b/qcsrc/server/mutators/mutator/gamemode_tdm.qc @@ -60,11 +60,12 @@ spawnfunc(tdm_team) // code from here on is just to support maps that don't have team entities void tdm_SpawnTeam (string teamname, float teamcolor) { - entity this = new(tdm_team); + entity this = new_pure(tdm_team); this.netname = teamname; this.cnt = teamcolor; + this.team = this.cnt + 1; this.spawnfunc_checked = true; - spawnfunc_tdm_team(this); + //spawnfunc_tdm_team(this); } void tdm_DelayedInit(entity this) diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index fded1d7b47..32e9a56702 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -408,6 +408,7 @@ bool forbidWeaponUse(entity player) if (time < game_starttime && !autocvar_sv_ready_restart_after_countdown) return true; if (round_handler_IsActive() && !round_handler_IsRoundStarted()) return true; if (player.player_blocked) return true; + if (gameover) return true; if (STAT(FROZEN, player)) return true; if (player.weapon_blocked) return true; return false; diff --git a/scripts/fireball.shader b/scripts/fireball.shader index 822be77f72..8df3e2a558 100644 --- a/scripts/fireball.shader +++ b/scripts/fireball.shader @@ -1,10 +1,7 @@ -fireball +fireball_plasma { - { - map textures/fireball - tcgen environment - } - { - map $lightmap - } + { + map textures/fireball_plasma.tga + tcMod scroll 0.03 0.001 + } } diff --git a/textures/fireball.tga b/textures/fireball.tga index 53b47a192c..c631e8c880 100644 Binary files a/textures/fireball.tga and b/textures/fireball.tga differ diff --git a/textures/fireball_gloss.tga b/textures/fireball_gloss.tga index 8cd8b25bdc..eaf50d0a2e 100644 Binary files a/textures/fireball_gloss.tga and b/textures/fireball_gloss.tga differ diff --git a/textures/fireball_glow.tga b/textures/fireball_glow.tga index c949f92a47..358784d8fd 100644 Binary files a/textures/fireball_glow.tga and b/textures/fireball_glow.tga differ diff --git a/textures/fireball_norm.tga b/textures/fireball_norm.tga new file mode 100644 index 0000000000..b0bd3f93cc Binary files /dev/null and b/textures/fireball_norm.tga differ diff --git a/textures/fireball_pants.tga b/textures/fireball_pants.tga new file mode 100644 index 0000000000..2fbc09a4ed Binary files /dev/null and b/textures/fireball_pants.tga differ diff --git a/textures/fireball_shirt.tga b/textures/fireball_shirt.tga new file mode 100644 index 0000000000..3d93916836 Binary files /dev/null and b/textures/fireball_shirt.tga differ