From: LegendaryGuard Date: Mon, 10 Jul 2023 13:34:26 +0000 (+0200) Subject: Refactor Dark nade into Darkness nade and remove nade_green effects that could be... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=31190635017f252b02e9de03fc227cd5a853fa23;p=xonotic%2Fxonotic-data.pk3dir.git Refactor Dark nade into Darkness nade and remove nade_green effects that could be used in the future --- diff --git a/effectinfo.txt b/effectinfo.txt index cf05552d7..da8070787 100644 --- a/effectinfo.txt +++ b/effectinfo.txt @@ -7135,46 +7135,6 @@ effect nade_neutral_burn tex 71 73 trailspacing 16 velocityjitter 10 10 10 -effect nade_green_burn - type smoke - alpha 100 100 250 - color 0x40ff9b 0xff3c00 - sizeincrease -1 - size 5 5 - tex 65 65 - trailspacing 1 -effect nade_green_burn - type smoke - alpha 200 200 1000 - color 0xff0000 0xffa2a2 - notunderwater - sizeincrease -30 - size 45 25 - tex 65 65 - trailspacing 64 -effect nade_green_burn - type bubble - alpha 256 256 256 - bounce 1.500000 - color 0x40ff9b 0xff3c00 - gravity -0.125000 - liquidfriction 4 - size 1 1 - tex 62 62 - trailspacing 16 - underwater - velocityjitter 16 16 16 -effect nade_green_burn - type smoke - alpha 300 900 1500 - color 0x40ff9b 0xff3c00 - originjitter 2 2 2 - rotate -180 180 20 -20 - sizeincrease -40 - size 15 25 - tex 71 73 - trailspacing 16 - velocityjitter 10 10 10 effect nade_brown_burn type smoke alpha 100 100 250 diff --git a/gfx/hud/default/nade_dark.tga b/gfx/hud/default/nade_dark.tga deleted file mode 100644 index 112ddcb86..000000000 Binary files a/gfx/hud/default/nade_dark.tga and /dev/null differ diff --git a/gfx/hud/default/nade_darkness.tga b/gfx/hud/default/nade_darkness.tga new file mode 100644 index 000000000..112ddcb86 Binary files /dev/null and b/gfx/hud/default/nade_darkness.tga differ diff --git a/gfx/hud/luma/nade_dark.tga b/gfx/hud/luma/nade_dark.tga deleted file mode 100644 index fb33b341b..000000000 Binary files a/gfx/hud/luma/nade_dark.tga and /dev/null differ diff --git a/gfx/hud/luma/nade_darkness.tga b/gfx/hud/luma/nade_darkness.tga new file mode 100644 index 000000000..fb33b341b Binary files /dev/null and b/gfx/hud/luma/nade_darkness.tga differ diff --git a/mutators.cfg b/mutators.cfg index 7a9ef9f44..d0337c22d 100644 --- a/mutators.cfg +++ b/mutators.cfg @@ -305,10 +305,10 @@ set g_nades_ammo_friend 1 "Multiplier of ammo given to team mates" set g_nades_ammo_foe -2 "Multiplier of ammo given to enemies" // Darkness (11) -set g_nades_dark 0 "Darkness nade: blinds enemies" -set g_nades_dark_time 4 "How long the dark field will last" -set g_nades_dark_explode 0 "Whether the darkness nade should explode again once the dark field dissipated" -set g_nades_dark_teamcheck 2 "0: friendly fire, 1: nade owner isn't affected, 2: don't blind teammates" +set g_nades_darkness 0 "Darkness nade: blinds enemies" +set g_nades_darkness_time 4 "How long the dark field will last" +set g_nades_darkness_explode 0 "Whether the darkness nade should explode again once the dark field dissipated" +set g_nades_darkness_teamcheck 2 "0: friendly fire, 1: nade owner isn't affected, 2: don't blind teammates" // ============ // camp check diff --git a/qcsrc/common/mutators/mutator/nades/effects.inc b/qcsrc/common/mutators/mutator/nades/effects.inc index 343acf991..76ad56ca4 100644 --- a/qcsrc/common/mutators/mutator/nades/effects.inc +++ b/qcsrc/common/mutators/mutator/nades/effects.inc @@ -44,7 +44,6 @@ EFFECT(1, NADE_TRAIL_BURN_BLUE, "nade_blue_burn") EFFECT(1, NADE_TRAIL_BURN_YELLOW, "nade_yellow_burn") EFFECT(1, NADE_TRAIL_BURN_PINK, "nade_pink_burn") EFFECT(1, NADE_TRAIL_BURN_NEUTRAL, "nade_neutral_burn") -EFFECT(1, NADE_TRAIL_BURN_GREEN, "nade_green_burn") EFFECT(1, NADE_TRAIL_BURN_BROWN, "nade_brown_burn") EFFECT(1, NADE_TRAIL_BURN_PURPLE, "nade_purple_burn") entity EFFECT_NADE_TRAIL_BURN(int teamid) diff --git a/qcsrc/common/mutators/mutator/nades/nades.inc b/qcsrc/common/mutators/mutator/nades/nades.inc index c667b0043..ab798e3cd 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.inc +++ b/qcsrc/common/mutators/mutator/nades/nades.inc @@ -106,10 +106,10 @@ REGISTER_NADE(AMMO) { REGISTER_NADE(DARK) { this.m_color = '0.23 0 0.23'; - this.m_name = _("Dark grenade"); - this.m_icon = "nade_dark"; + this.m_name = _("Darkness grenade"); + this.m_icon = "nade_darkness"; #ifdef GAMEQC - NADE_PROJECTILE(0, PROJECTILE_NADE_DARK, EFFECT_NADE_TRAIL_PURPLE); - NADE_PROJECTILE(1, PROJECTILE_NADE_DARK_BURN, EFFECT_NADE_TRAIL_BURN_PURPLE); + NADE_PROJECTILE(0, PROJECTILE_NADE_DARKNESS, EFFECT_NADE_TRAIL_PURPLE); + NADE_PROJECTILE(1, PROJECTILE_NADE_DARKNESS_BURN, EFFECT_NADE_TRAIL_BURN_PURPLE); #endif } \ No newline at end of file diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index b301d1f03..272da5677 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -57,7 +57,7 @@ void HUD_DarkBlinking() REGISTER_MUTATOR(cl_nades, true); MUTATOR_HOOKFUNCTION(cl_nades, HUD_Draw_overlay) { - if (STAT(NADE_DARK_TIME) > time) + if (STAT(NADE_DARKNESS_TIME) > time) { M_ARGV(0, vector) = NADE_TYPE_DARK.m_color; HUD_DarkBlinking(); @@ -75,7 +75,7 @@ NET_HANDLE(TE_CSQC_DARKBLINKING, bool isNew) localcmd("play2 sound/misc/blind\n"); darkblink = true; dark_appeartime = time; - dark_fadetime = STAT(NADE_DARK_TIME); + dark_fadetime = STAT(NADE_DARKNESS_TIME); } MUTATOR_HOOKFUNCTION(cl_nades, Ent_Projectile) @@ -815,7 +815,7 @@ void DarkBlinking(entity e) } } -void nade_dark_think(entity this) +void nade_darkness_think(entity this) { if(round_handler_IsActive()) if(!round_handler_IsRoundStarted()) @@ -826,7 +826,7 @@ void nade_dark_think(entity this) if(time >= this.ltime) { - if ( autocvar_g_nades_dark_explode ) + if ( autocvar_g_nades_darkness_explode ) { entity expef = EFFECT_NADE_EXPLODE(this.realowner.team); Send_Effect(expef, this.origin + '0 0 1', '0 0 0', 1); @@ -867,34 +867,34 @@ void nade_dark_think(entity this) if (checked) \ if ( IS_REAL_CLIENT(it) ) \ { \ - STAT(NADE_DARK_TIME, it) = time + 0.1; \ + STAT(NADE_DARKNESS_TIME, it) = time + 0.1; \ DarkBlinking(it); \ } \ break; FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_nades_nade_radius, it != this && it.takedamage && !IS_DEAD(it) && GetResource(it, RES_HEALTH) > 0 && current_dark_time > 0, { - switch (autocvar_g_nades_dark_teamcheck) + switch (autocvar_g_nades_darkness_teamcheck) { // 1: nade owner isn't affected; 2: no teammate is affected; any other number than 1 and 2: friendly fire case 1: DARK_NADE_RADIUS_TEAMCHECK(it != this.realowner); case 2: DARK_NADE_RADIUS_TEAMCHECK(DIFF_TEAM(it, this.realowner) && it != this.realowner); - default: DARK_NADE_RADIUS_TEAMCHECK(!autocvar_g_nades_dark_teamcheck || (DIFF_TEAM(it, this.realowner) && it != this.realowner)); + default: DARK_NADE_RADIUS_TEAMCHECK(!autocvar_g_nades_darkness_teamcheck || (DIFF_TEAM(it, this.realowner) && it != this.realowner)); } }); #undef DARK_NADE_RADIUS_TEAMCHECK } -void nade_dark_boom(entity this) +void nade_darkness_boom(entity this) { - entity fountain = new(nade_dark_fountain); + entity fountain = new(nade_darkness_fountain); fountain.owner = this.owner; fountain.realowner = this.realowner; fountain.origin = this.origin; setorigin(fountain, fountain.origin); - setthink(fountain, nade_dark_think); + setthink(fountain, nade_darkness_think); fountain.nextthink = time; - fountain.ltime = time + autocvar_g_nades_dark_time; + fountain.ltime = time + autocvar_g_nades_darkness_time; fountain.pushltime = fountain.wait = fountain.ltime; fountain.team = this.team; set_movetype(fountain, MOVETYPE_TOSS); @@ -904,7 +904,7 @@ void nade_dark_boom(entity this) fountain.nade_special_time = time + 0.3; fountain.angles = this.angles; - if ( autocvar_g_nades_dark_explode ) + if ( autocvar_g_nades_darkness_explode ) { setmodel(fountain, MDL_PROJECTILE_GRENADE); entity timer = new(nade_timer); @@ -981,7 +981,7 @@ void nade_boom(entity this) case NADE_TYPE_ENTRAP: nade_entrap_boom(this); break; case NADE_TYPE_VEIL: nade_veil_boom(this); break; case NADE_TYPE_AMMO: nade_ammo_boom(this); break; - case NADE_TYPE_DARK: nade_dark_boom(this); break; + case NADE_TYPE_DARK: nade_darkness_boom(this); break; } IL_EACH(g_projectiles, it.classname == "grapplinghook" && it.aiment == this, @@ -1440,7 +1440,7 @@ int nades_CheckTypes(entity player, int cl_ntype) CL_NADE_TYPE_CHECK(NADE_TYPE_ENTRAP, autocvar_g_nades_entrap); CL_NADE_TYPE_CHECK(NADE_TYPE_VEIL, autocvar_g_nades_veil); CL_NADE_TYPE_CHECK(NADE_TYPE_AMMO, autocvar_g_nades_ammo); - CL_NADE_TYPE_CHECK(NADE_TYPE_DARK, autocvar_g_nades_dark); + CL_NADE_TYPE_CHECK(NADE_TYPE_DARK, autocvar_g_nades_darkness); } return cl_ntype; #undef CL_NADE_TYPE_CHECK diff --git a/qcsrc/common/mutators/mutator/nades/nades.qh b/qcsrc/common/mutators/mutator/nades/nades.qh index a3a282754..7888da7d1 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qh +++ b/qcsrc/common/mutators/mutator/nades/nades.qh @@ -79,10 +79,10 @@ float autocvar_g_nades_ammo_time; float autocvar_g_nades_ammo_rate; float autocvar_g_nades_ammo_friend; float autocvar_g_nades_ammo_foe; -bool autocvar_g_nades_dark; -bool autocvar_g_nades_dark_explode; -bool autocvar_g_nades_dark_teamcheck; -float autocvar_g_nades_dark_time; +bool autocvar_g_nades_darkness; +bool autocvar_g_nades_darkness_explode; +bool autocvar_g_nades_darkness_teamcheck; +float autocvar_g_nades_darkness_time; bool autocvar_g_nades_pokenade; string autocvar_g_nades_pokenade_monster_type; float autocvar_g_nades_pokenade_monster_lifetime; @@ -108,8 +108,8 @@ const int PROJECTILE_NADE_VEIL = 86; const int PROJECTILE_NADE_VEIL_BURN = 87; const int PROJECTILE_NADE_AMMO = 88; const int PROJECTILE_NADE_AMMO_BURN = 89; -const int PROJECTILE_NADE_DARK = 90; -const int PROJECTILE_NADE_DARK_BURN = 91; +const int PROJECTILE_NADE_DARKNESS = 90; +const int PROJECTILE_NADE_DARKNESS_BURN = 91; REGISTRY(Nades, BITS(4)) REGISTER_REGISTRY(Nades) @@ -174,7 +174,7 @@ REPLICATE_INIT(string, cvar_cl_pokenade_type); .float nade_veil_prevalpha; .float nade_entrap_time; .float nade_ammo_time; -.float nade_dark_time; +.float nade_darkness_time; bool orb_send(entity this, entity to, int sf); diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index 18808001b..e834d3e30 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -125,7 +125,7 @@ REGISTER_STAT(MONSTERS_KILLED, int) REGISTER_STAT(NADE_BONUS, float) REGISTER_STAT(NADE_BONUS_TYPE, int) REGISTER_STAT(NADE_BONUS_SCORE, float) -REGISTER_STAT(NADE_DARK_TIME, float) +REGISTER_STAT(NADE_DARKNESS_TIME, float) REGISTER_STAT(PLASMA, int) REGISTER_STAT(FROZEN, int) REGISTER_STAT(REVIVE_PROGRESS, float)