From: LegendaryGuard Date: Wed, 17 Aug 2022 19:48:19 +0000 (+0200) Subject: Merge branch 'Mario/nade_orb_overlay' into LegendaryGuard/armorizing_and_dark_nades X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d8d0b657140c87dc77b9506e7e317ba3071b5fc7;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'Mario/nade_orb_overlay' into LegendaryGuard/armorizing_and_dark_nades --- d8d0b657140c87dc77b9506e7e317ba3071b5fc7 diff --cc qcsrc/common/mutators/mutator/nades/nades.qc index 5bd64d8f3a,749b77c7f5..686a2c17a7 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@@ -671,13 -628,6 +631,8 @@@ void nade_heal_touch(entity this, entit } } - - if ( IS_REAL_CLIENT(toucher) || (IS_VEHICLE(toucher) && toucher.owner) ) - { - entity show_red = (IS_VEHICLE(toucher) && toucher.owner) ? toucher.owner : toucher; - STAT(HEALING_ORB, show_red) = time + 0.1; - STAT(HEALING_ORB_ALPHA, show_red) = 0.75 * (this.ltime - time) / this.orb_lifetime; - } ++======= ++>>>>>>> Mario/nade_orb_overlay } void nade_heal_boom(entity this) @@@ -2049,21 -1395,11 +2003,21 @@@ MUTATOR_HOOKFUNCTION(nades, MonsterMove M_ARGV(2, float) *= autocvar_g_nades_entrap_speed; // walk speed } - if (STAT(VEIL_ORB, mon) && STAT(VEIL_ORB, mon) <= time) + if (mon.nade_veil_time && mon.nade_veil_time <= time) { mon.alpha = mon.nade_veil_prevalpha; - STAT(VEIL_ORB, mon) = 0; + mon.nade_veil_time = 0; } + //LegendGuard adds nade if STAT ORB 08-02-2021 + // TODO: remove this line and use the following line after merging Mario/nade_orb_overlay into master branch: + // if (mon.nade_dark_time && mon.nade_dark_time <= time) + if (STAT(DARK_ORB, mon) && STAT(DARK_ORB, mon) <= time) + { + mon.alpha = mon.nade_dark_prevalpha; + // TODO: remove this line and use the following line after merging Mario/nade_orb_overlay into master branch: + // mon.nade_dark_time = 0; + STAT(DARK_ORB, mon) = 0; + } } MUTATOR_HOOKFUNCTION(nades, PlayerSpawn) @@@ -2193,20 -1529,8 +2147,14 @@@ MUTATOR_HOOKFUNCTION(nades, SpectateCop STAT(NADE_TIMER, client) = STAT(NADE_TIMER, spectatee); STAT(NADE_BONUS_TYPE, client) = STAT(NADE_BONUS_TYPE, spectatee); client.pokenade_type = spectatee.pokenade_type; + client.tandemnade_type = spectatee.tandemnade_type; STAT(NADE_BONUS, client) = STAT(NADE_BONUS, spectatee); STAT(NADE_BONUS_SCORE, client) = STAT(NADE_BONUS_SCORE, spectatee); - STAT(HEALING_ORB, client) = STAT(HEALING_ORB, spectatee); - STAT(HEALING_ORB_ALPHA, client) = STAT(HEALING_ORB_ALPHA, spectatee); - STAT(ENTRAP_ORB, client) = STAT(ENTRAP_ORB, spectatee); - STAT(ENTRAP_ORB_ALPHA, client) = STAT(ENTRAP_ORB_ALPHA, spectatee); - STAT(VEIL_ORB, client) = STAT(VEIL_ORB, spectatee); - STAT(VEIL_ORB_ALPHA, client) = STAT(VEIL_ORB_ALPHA, spectatee); + // TODO: remove STATs after merging Mario/nade_orb_overlay into master branch: + STAT(AMMUNITIONING_ORB, client) = STAT(AMMUNITIONING_ORB, spectatee); + STAT(AMMUNITIONING_ORB_ALPHA, client) = STAT(AMMUNITIONING_ORB_ALPHA, spectatee); + STAT(DARK_ORB, client) = STAT(DARK_ORB, spectatee); + STAT(DARK_ORB_ALPHA, client) = STAT(DARK_ORB_ALPHA, spectatee); } MUTATOR_HOOKFUNCTION(nades, BuildMutatorsPrettyString) diff --cc qcsrc/common/mutators/mutator/nades/nades.qh index 1466876368,a129c826aa..73ca33dde8 --- a/qcsrc/common/mutators/mutator/nades/nades.qh +++ b/qcsrc/common/mutators/mutator/nades/nades.qh @@@ -166,19 -141,12 +166,21 @@@ REPLICATE_INIT(int, cvar_cl_tandemnade_ .float nade_refire; .float nade_special_time; .string pokenade_type; +.int tandemnade_type; .entity nade_damage_target; +.float cvar_cl_nade_type; +.string cvar_cl_pokenade_type; +.int cvar_cl_tandemnade_type; .float toss_time; +.int nade_item_spawncount; .float nade_show_particles; + .float nade_veil_time; .float nade_veil_prevalpha; + .float nade_entrap_time; +// TODO: use these .variables after merging Mario/nade_orb_overlay into master branch +.float nade_ammo_time; +.float nade_dark_time; +.float nade_dark_prevalpha; bool orb_send(entity this, entity to, int sf); diff --cc qcsrc/common/stats.qh index 5ed8d72ab8,812f3e92d7..5420c2fc4f --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@@ -132,17 -130,8 +130,13 @@@ REGISTER_STAT(FROZEN, int REGISTER_STAT(REVIVE_PROGRESS, float) REGISTER_STAT(ROUNDLOST, int) REGISTER_STAT(CAPTURE_PROGRESS, float) - REGISTER_STAT(ENTRAP_ORB, float) - REGISTER_STAT(ENTRAP_ORB_ALPHA, float) REGISTER_STAT(ITEMSTIME, int, autocvar_sv_itemstime) REGISTER_STAT(KILL_TIME, float) - REGISTER_STAT(VEIL_ORB, float) - REGISTER_STAT(VEIL_ORB_ALPHA, float) +// TODO: remove the following STATs after merging Mario/nade_orb_overlay into master branch: +REGISTER_STAT(AMMUNITIONING_ORB, float) //LegendGuard registers new STAT 11-02-2021 +REGISTER_STAT(AMMUNITIONING_ORB_ALPHA, float) +REGISTER_STAT(DARK_ORB, float) //LegendGuard registers new STAT 08-02-2021 +REGISTER_STAT(DARK_ORB_ALPHA, float) #ifdef SVQC float autocvar_sv_showfps = 0;