set g_nades_nade_radius 300
set g_nades_nade_force 650
set g_nades_nade_newton_style 0 "nade velocity: 0 is absolute, 1 is relative (takes into account player velocity), 2 is something in between"
-set g_nades_nade_type 1 "Type of the off-hand grenade. 1:normal 2:napalm 3:ice 4:translocate 5:spawn 6:heal 7:pokenade 8:entrap 9:veil"
+set g_nades_nade_type 1 "Type of the off-hand grenade. 1:normal 2:napalm 3:ice 4:translocate 5:spawn 6:heal 7:pokenade 8:entrap 9:veil, 10:ammo, 11:dark"
seta cl_nade_timer 1 "show a visual timer for nades, 1 = only circle, 2 = circle with text"
seta cl_nade_type 3
-seta cl_pokenade_type "zombie"
-seta cl_tandemnade_type 0
+seta cl_pokenade_type "zombie" "monster, item, vehicle and turret to spawn"
+seta cl_tandemnade_type 0 "tandem nade selection; 0: monster, 1: item, 2: vehicle, 3: turret"
// ------------
// Nade bonus
//
set g_nades_bonus 0 "Enable bonus grenades"
set g_nades_bonus_client_select 0 "Allow client side selection of bonus nade type"
-set g_nades_bonus_type 2 "Type of the bonus grenade. 1:normal 2:napalm 3:ice 4:translocate 5:spawn 6:heal 7:pokenade 8:entrap 9:veil"
+set g_nades_bonus_type 2 "Type of the bonus grenade. 1:normal 2:napalm 3:ice 4:translocate 5:spawn 6:heal 7:tandemnade 8:entrap 9:veil"
set g_nades_bonus_onstrength 1 "Always give bonus grenades to players that have the strength powerup"
set g_nades_bonus_max 3 "Maximum number of bonus grenades"
set g_nades_bonus_only 0 "Disallow regular nades, only bonus nades can be used"
// Napalm fireballs
set g_nades_napalm_ball_count 6 "Number of fireballs emitted during the explosion"
set g_nades_napalm_ball_spread 500 "Maximum force which the fireballs will have on explosion"
-set g_nades_napalm_ball_damageforcescale 4
-set g_nades_napalm_ball_damage 40
-set g_nades_napalm_ball_lifetime 7
+set g_nades_napalm_ball_damageforcescale 4 "How affected fireballs are by damage"
+set g_nades_napalm_ball_damage 40 "Damage caused by the fireball"
+set g_nades_napalm_ball_lifetime 7 "How long the fireball will last"
set g_nades_napalm_ball_radius 100 "Distance from the fireball within which you may get burned"
// Napalm Fire fountain
set g_nades_napalm_fountain_lifetime 3 "Time period during which extra fire mines are ejected"
set g_nades_napalm_fountain_delay 0.5 "Delay between emissions by the fountain"
set g_nades_napalm_fountain_damage 50 "Damage caused by the center of the fountain"
set g_nades_napalm_fountain_edgedamage 20 "Damage caused by the edge of the fountain"
-set g_nades_napalm_fountain_radius 130
+set g_nades_napalm_fountain_radius 130 "Distance from the fountain"
// Ice (3)
set g_nades_ice_freeze_time 3 "How long the ice field will last"
set g_nades_heal_friend 1 "Multiplier of health given to team mates"
set g_nades_heal_foe -2 "Multiplier of health given to enemies"
-// Pokenade (7)
+// Tandem (7)
set g_nades_pokenade_monster_lifetime 150 "How long pokenade monster will survive"
-set g_nades_pokenade_monster_type "zombie" "Monster to spawn"
+set g_nades_pokenade_type "zombie" "Monster, item, vehicle and turret to spawn"
+set g_nades_tandemnade_type 0 "Tandem nade selection; 0: monster, 1: item, 2: vehicle, 3: turret"
+set g_nades_tandem_ball_spread 0.5 "Maximum force which the ball will have on explosion"
+set g_nades_tandem_ball_item_spawncount 10 "Number of items ball will spawn at their explosion location"
+set g_nades_tandem_ball_lifetime 1 "How long the ball will last"
+set g_nades_tandem_fountain_lifetime 1 "Time period during which fountain is ejected"
+set g_nades_tandem_fountain_delay 5 "Delay between emissions by the fountain"
+set g_nades_tandem_item_lifetime 5 "Life time of the item"
+set g_nades_tandem_item_includespecial 0 "Include jetpack and powerups"
+set g_nades_tandem_randomweapon_includespecial 0 "Include special and super weapons"
// Entrap (8)
set g_nades_entrap_strength 0.01 "Strength of the orb's movement slowing powers"
set g_nades_entrap_speed 0.5 "Running speed while entrapped"
set g_nades_entrap_time 10 "Life time of the orb"
-set g_nades_entrap_radius 500
+set g_nades_entrap_radius 500 "Distance from the entrap orb"
// Veil (9)
set g_nades_veil_time 8 "Life time of the orb"
-set g_nades_veil_radius 200
-
+set g_nades_veil_radius 200 "Distance from the veil orb"
+
+// Ammo (10)
+set g_nades_ammo_time 4 "Life time of the orb"
+set g_nades_ammo_rate 30 "Ammo given per second"
+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_damage 25 "How much damage dark orb can do when foes are entering inside"
+set g_nades_dark_time 13 "Life time of the orb"
+set g_nades_dark_radius 700 "Distance from the dark orb"
// ============
// camp check
#include <common/gamemodes/_mod.qh>
#include <common/monsters/sv_spawn.qh>
#include <common/monsters/sv_monsters.qh>
-//LegendGuard adds include for spawning vehicles 20-06-2021
#include <common/vehicles/all.qh>
-//LegendGuard adds include for spawning turrets 22-06-2021
#include <common/turrets/all.qh>
.float nade_time_primed;
settouch(orb, nade_heal_touch);
orb.colormod = '1 0 0';
}
-
-void nade_monster_boom(entity this)
-{
- if(!autocvar_g_monsters)
- return;
- entity e = spawn();
- e.noalign = true; // don't drop to floor
- e = spawnmonster(e, this.pokenade_type, MON_Null, this.realowner, this.realowner, this.origin, false, false, 1);
- if(!e)
- return; // monster failed to be spawned
-
- if(autocvar_g_nades_pokenade_monster_lifetime > 0)
- e.monster_lifetime = time + autocvar_g_nades_pokenade_monster_lifetime;
- e.monster_skill = MONSTER_SKILL_INSANE;
-}
-
-void nade_veil_touch(entity this, entity toucher)
-{
- if ( IS_REAL_CLIENT(toucher) || (IS_VEHICLE(toucher) && toucher.owner) )
- {
- entity show_tint = (IS_VEHICLE(toucher) && toucher.owner) ? toucher.owner : toucher;
-
- float tint_alpha = 0.75;
- if(SAME_TEAM(toucher, this.realowner))
- {
- tint_alpha = 0.45;
- if(!STAT(VEIL_ORB, show_tint))
- {
- toucher.nade_veil_prevalpha = toucher.alpha;
- toucher.alpha = -1;
- }
- }
- STAT(VEIL_ORB, show_tint) = time + 0.1;
- STAT(VEIL_ORB_ALPHA, show_tint) = tint_alpha * (this.ltime - time) / this.orb_lifetime;
- }
-}
-
-void nade_veil_boom(entity this)
-{
- entity orb = nades_spawn_orb(this.owner, this.realowner, this.origin, autocvar_g_nades_veil_time, autocvar_g_nades_veil_radius);
-
- settouch(orb, nade_veil_touch);
- orb.colormod = NADE_TYPE_VEIL.m_color;
-}
-/**************LEGENDGUARD NEW NADES: EMERALD, AMMO AND DARK NADES functions "cl_nade_type 10", "cl_nade_type 11" and "cl_nade_type 12" *** //more ideas: SPAWNING MINI SPIDERS NADE, SPARKING NADE ***********************/
-// All nade icons are in these directories, samples: gfx/hud/default/nade_emerald.tga and gfx/hud/luma/nade_emerald.tga 02-03-2021
-// Mario suggests to rename itemdrop nade name to "emerald" nade 02-03-2021
-
-//LegendGuard adds weapon item spawn option for emerald nade 25-05-2021
-
-//LegendGuard adds random weapon item spawn function for emerald nade 25-05-2021
-void nade_emerald_randomweapon(entity e, vector org)
+void nade_tandem_randomweapon(entity e, vector org)
{
RandomSelection_Init();
FOREACH(Weapons,
|| (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)
|| (it.spawnflags & WEP_FLAG_SPECIALATTACK)
|| (it.spawnflags & WEP_FLAG_SUPERWEAPON))
- || autocvar_g_nades_emerald_randomweapons_includespecial),
+ || autocvar_g_nades_tandem_randomweapon_includespecial),
{
if((it.spawnflags & WEP_FLAG_HIDDEN)
&& (it.spawnflags & WEP_FLAG_MUTATORBLOCKED))
weapon_defaultspawnfunc(e, RandomSelection_chosen_ent);
}
-//LegendGuard adds vehicle spawn option for emerald nade 20-06-2021
-
-//LegendGuard adds turret spawn option for emerald nade 22-06-2021
-
-entity nade_emerald_randomitem()
+entity nade_tandem_randomitem()
{
RandomSelection_Init();
FOREACH(Items,
&& !(it.m_itemid & IT_INVINCIBLE)
&& !(it.m_itemid & IT_INVISIBILITY)
&& !(it.m_itemid & IT_SPEED)
- || autocvar_g_nades_emerald_items_includespecial),
+ || autocvar_g_nades_tandem_item_includespecial),
{
if(it.m_canonical_spawnfunc == "item_armor_mega"
|| it.m_canonical_spawnfunc == "item_health_mega"
return RandomSelection_chosen_ent;
}
-void nade_emerald_spawnitem(entity e, vector org)
+void nade_tandem_spawnitem(entity e, vector org)
{
entity itm;
}
case "jetpack" :
{
- itm = (!autocvar_g_nades_emerald_items_includespecial) ?
+ itm = (!autocvar_g_nades_tandem_item_includespecial) ?
ITEM_JetpackFuel : (random() < 0.5) ?
ITEM_JetpackFuel : ITEM_Jetpack;
break;
}
- default: { itm = nade_emerald_randomitem(); break; }
+ default: { itm = nade_tandem_randomitem(); break; }
}
if((IS_GAMETYPE(FREEZETAG) || IS_GAMETYPE(LMS))
setorigin(e, org);
e.velocity = randomvec() * 175 + '0 0 325';
e.item_spawnshieldtime = time + 0.7;
- SUB_SetFade(e, time + autocvar_g_nades_emerald_lifetime, 1);
+ SUB_SetFade(e, time + autocvar_g_nades_tandem_item_lifetime, 1);
}
-void nade_emerald_dropping(entity this, vector org)
+void nade_tandem_dropping(entity this, vector org)
{
entity e = spawn();
e.spawnfunc_checked = true;
{
switch (this.pokenade_type)
{
- case "weapon" : { nade_emerald_randomweapon(e, org); return; }
+ case "weapon" : { nade_tandem_randomweapon(e, org); return; }
case "health" :
case "armor" :
case "ammo" :
case "jetpack" :
- default : { nade_emerald_spawnitem(e, org); return; }
+ default : { nade_tandem_spawnitem(e, org); return; }
}
}
else print_to(this, "Items can't be spawned on CA and Instagib");
}
-void emerald_ball_think(entity this)
+void tandem_ball_think(entity this)
{
if(round_handler_IsActive())
if(!round_handler_IsRoundStarted())
this.angles = vectoangles(this.velocity);
- if (this.nade_item_spawncount < autocvar_g_nades_emerald_spawncount)
+ if (this.nade_item_spawncount < autocvar_g_nades_tandem_ball_item_spawncount)
{
this.nade_item_spawncount++;
- nade_emerald_dropping(this, this.origin);
+ nade_tandem_dropping(this, this.origin);
}
this.nextthink = time + 0.1;
}
-void nade_emerald_ball(entity this)
+void nade_tandem_ball(entity this)
{
entity proj;
vector kick;
proj.scale = 1; //0.5;
setsize(proj, '-4 -4 -4', '4 4 4');
setorigin(proj, this.origin);
- setthink(proj, emerald_ball_think);
+ setthink(proj, tandem_ball_think);
proj.nextthink = time;
proj.effects = EF_LOWPRECISION;
- kick.x =(random() - 0.5) * 2 * autocvar_g_nades_emerald_ball_spread;
- kick.y = (random() - 0.5) * 2 * autocvar_g_nades_emerald_ball_spread;
- kick.z = (random() / 2 + 0.5) * autocvar_g_nades_emerald_ball_spread;
+ kick.x =(random() - 0.5) * 2 * autocvar_g_nades_tandem_ball_spread;
+ kick.y = (random() - 0.5) * 2 * autocvar_g_nades_tandem_ball_spread;
+ kick.z = (random() / 2 + 0.5) * autocvar_g_nades_tandem_ball_spread;
proj.velocity = kick;
- proj.pushltime = time + autocvar_g_nades_emerald_ball_lifetime;
+ proj.pushltime = time + autocvar_g_nades_tandem_ball_lifetime;
proj.angles = vectoangles(proj.velocity);
proj.flags = FL_PROJECTILE;
proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC;
}
-void emerald_fountain_think(entity this)
+void tandem_fountain_think(entity this)
{
if(round_handler_IsActive())
if(!round_handler_IsRoundStarted())
this.nextthink = time + 0.1;
if(time >= this.nade_special_time)
{
- this.nade_special_time = time + autocvar_g_nades_emerald_fountain_delay;
- nade_emerald_ball(this);
+ this.nade_special_time = time + autocvar_g_nades_tandem_fountain_delay;
+ nade_tandem_ball(this);
Send_Effect(EFFECT_SMOKE_LARGE, this.origin, '0 0 0', 1);
}
}
-void emerald_item_fountain_explode(entity this)
+void tandem_item_fountain_explode(entity this)
{
- entity fountain = new(nade_emerald_fountain);
+ entity fountain = new(nade_tandem_fountain);
fountain.owner = this.owner;
fountain.realowner = this.realowner;
fountain.origin = this.origin;
IL_PUSH(g_projectiles, fountain);
IL_PUSH(g_bot_dodge, fountain);
setorigin(fountain, fountain.origin);
- setthink(fountain, emerald_fountain_think);
+ setthink(fountain, tandem_fountain_think);
fountain.nextthink = time;
- fountain.ltime = time + autocvar_g_nades_emerald_fountain_lifetime;
+ fountain.ltime = time + autocvar_g_nades_tandem_fountain_lifetime;
fountain.pushltime = fountain.ltime;
fountain.team = this.team;
fountain.bot_dodge = true;
fountain.nade_special_time = time;
setsize(fountain, '-16 -16 -16', '16 16 16');
- CSQCProjectile(fountain, true, PROJECTILE_NADE_EMERALD_BURN, true);
+ CSQCProjectile(fountain, true, PROJECTILE_NADE_TANDEM_BURN, true);
}
-void nade_emerald_boom(entity this)
+void nade_tandem_boom(entity this)
{
entity e = spawn();
e.noalign = true; // don't drop to floor
{
case 1:
{
- emerald_item_fountain_explode(this);
+ tandem_item_fountain_explode(this);
return;
}
case 2:
if(!autocvar_g_monsters)
return;
- e = spawnmonster(e, this.pokenade_type, MON_Null, this.realowner, this.realowner, this.origin, false, false, 1);
+ e = spawnmonster(
+ e,
+ this.pokenade_type,
+ MON_Null,
+ this.realowner,
+ this.realowner,
+ this.origin,
+ false,
+ false,
+ 1
+ );
if(!e)
return; // monster failed to be spawned
}
}
-/***********************************************************************************/
+void nade_veil_touch(entity this, entity toucher)
+{
+ if ( IS_REAL_CLIENT(toucher) || (IS_VEHICLE(toucher) && toucher.owner) )
+ {
+ entity show_tint = (IS_VEHICLE(toucher) && toucher.owner) ? toucher.owner : toucher;
+
+ float tint_alpha = 0.75;
+ if(SAME_TEAM(toucher, this.realowner))
+ {
+ tint_alpha = 0.45;
+ if(!STAT(VEIL_ORB, show_tint))
+ {
+ toucher.nade_veil_prevalpha = toucher.alpha;
+ toucher.alpha = -1;
+ }
+ }
+ STAT(VEIL_ORB, show_tint) = time + 0.1;
+ STAT(VEIL_ORB_ALPHA, show_tint) = tint_alpha * (this.ltime - time) / this.orb_lifetime;
+ }
+}
+
+void nade_veil_boom(entity this)
+{
+ entity orb = nades_spawn_orb(this.owner, this.realowner, this.origin, autocvar_g_nades_veil_time, autocvar_g_nades_veil_radius);
+
+ settouch(orb, nade_veil_touch);
+ orb.colormod = NADE_TYPE_VEIL.m_color;
+}
+/**************LEGENDGUARD NEW NADES: EMERALD, AMMO AND DARK NADES functions "cl_nade_type 10", "cl_nade_type 11" and "cl_nade_type 12" *** //more ideas: SPAWNING MINI SPIDERS NADE, SPARKING NADE ***********************/
+// All nade icons are in these directories, samples: gfx/hud/default/nade_emerald.tga and gfx/hud/luma/nade_emerald.tga 02-03-2021
+// Mario suggests to rename itemdrop nade name to "emerald" (funny suggestion lol) nade 02-03-2021
+
+//LegendGuard adds weapon item spawn option for tandem nade 25-05-2021
+
+//LegendGuard adds random weapon item spawn function for tandem nade 25-05-2021
+
+//LegendGuard adds vehicle spawn option for tandem nade 20-06-2021
+
+//LegendGuard adds turret spawn option for tandem nade 22-06-2021
+
//LegendGuard develops ammo nade 13-02-2021
void nade_ammo_touch(entity this, entity toucher)
{
case NADE_TYPE_TRANSLOCATE:
nade_blast = false;
break;
- case NADE_TYPE_MONSTER:
+ case NADE_TYPE_TANDEM:
if(!autocvar_g_monsters)
{
expef = EFFECT_NADE_EXPLODE(this.realowner.team);
break; // fall back to a standard nade explosion
}
+ if(!autocvar_g_vehicles)
+ {
+ expef = EFFECT_NADE_EXPLODE(this.realowner.team);
+ break; // fall back to a standard nade explosion
+ }
+ if(!autocvar_g_turrets)
+ {
+ expef = EFFECT_NADE_EXPLODE(this.realowner.team);
+ break; // fall back to a standard nade explosion
+ }
case NADE_TYPE_SPAWN:
nade_blast = false;
switch(this.realowner.team)
nade_blast = false;
expef = EFFECT_SPAWN_NEUTRAL;
break;
-
- case NADE_TYPE_EMERALD: //LegendGuard adds nade case 11-02-2021
- nade_blast = false;
- expef = EFFECT_EXPLOSION_SMALL;
- break;
case NADE_TYPE_AMMO: //LegendGuard adds nade case 13-02-2021
nade_blast = false;
case NADE_TYPE_TRANSLOCATE: nade_translocate_boom(this); break;
case NADE_TYPE_SPAWN: nade_spawn_boom(this); break;
case NADE_TYPE_HEAL: nade_heal_boom(this); break;
- case NADE_TYPE_MONSTER: nade_monster_boom(this); break;
+ case NADE_TYPE_TANDEM: nade_tandem_boom(this); break;
case NADE_TYPE_ENTRAP: nade_entrap_boom(this); break;
case NADE_TYPE_VEIL: nade_veil_boom(this); break;
- case NADE_TYPE_EMERALD: nade_emerald_boom(this); break; //LegendGuard adds the register of new nade 11-02-2021
case NADE_TYPE_AMMO: nade_ammo_boom(this); break; //LegendGuard adds the register of new nade 13-02-2021
case NADE_TYPE_DARK: nade_dark_boom(this); break; //LegendGuard adds the register of new nade 08-02-2021
}
else
{
ntype = ((autocvar_g_nades_client_select) ? CS_CVAR(this).cvar_cl_nade_type : autocvar_g_nades_nade_type);
- pntype = ((autocvar_g_nades_client_select) ? CS_CVAR(this).cvar_cl_pokenade_type : autocvar_g_nades_pokenade_monster_type);
+ pntype = ((autocvar_g_nades_client_select) ? CS_CVAR(this).cvar_cl_pokenade_type : autocvar_g_nades_pokenade_type);
tntype = ((autocvar_g_nades_client_select) ? CS_CVAR(this).cvar_cl_tandemnade_type : autocvar_g_nades_tandemnade_type);
}
else
{
STAT(NADE_BONUS_TYPE, player) = autocvar_g_nades_bonus_type;
- player.pokenade_type = autocvar_g_nades_pokenade_monster_type;
+ player.pokenade_type = autocvar_g_nades_pokenade_type;
player.tandemnade_type = autocvar_g_nades_tandemnade_type;
}
float autocvar_g_nades_entrap_time = 10;
float autocvar_g_nades_veil_time = 8;
float autocvar_g_nades_veil_radius = 300;
-float autocvar_g_nades_emerald_lifetime = 5; //LegendGuard adds new nade cvars 28-02-2021
-bool autocvar_g_nades_emerald_randomweapons_includespecial = false;
-bool autocvar_g_nades_emerald_items_includespecial = false;
-float autocvar_g_nades_emerald_spawncount = 1;
-float autocvar_g_nades_emerald_ball_spread = 0.5;
-float autocvar_g_nades_emerald_ball_lifetime = 1; //if much time, many items will spawn
-float autocvar_g_nades_emerald_fountain_delay = 5;
-float autocvar_g_nades_emerald_fountain_lifetime = 1; //if much time, fountain will remain
-float autocvar_g_nades_ammo_time = 5; //LegendGuard adds new nade cvars 13-02-2021
-float autocvar_g_nades_ammo_rate = 30;
-float autocvar_g_nades_ammo_friend = 1;
-float autocvar_g_nades_ammo_foe = -2;
-float autocvar_g_nades_dark_damage = 25; //LegendGuard adds new nade cvars 08-02-2021
-float autocvar_g_nades_dark_time = 13;
-float autocvar_g_nades_dark_radius = 700;
-string autocvar_g_nades_pokenade_monster_type;
+float autocvar_g_nades_tandem_item_lifetime; //LegendGuard adds new nade cvars 28-02-2021
+bool autocvar_g_nades_tandem_randomweapon_includespecial = false;
+bool autocvar_g_nades_tandem_item_includespecial;
+float autocvar_g_nades_tandem_ball_item_spawncount = 1;
+float autocvar_g_nades_tandem_ball_spread;
+float autocvar_g_nades_tandem_ball_lifetime = 1; //if much time, ball will stay longer
+float autocvar_g_nades_tandem_fountain_delay = 5;
+float autocvar_g_nades_tandem_fountain_lifetime;
+float autocvar_g_nades_ammo_time; //LegendGuard adds new nade cvars 13-02-2021
+float autocvar_g_nades_ammo_rate;
+float autocvar_g_nades_ammo_friend;
+float autocvar_g_nades_ammo_foe;
+float autocvar_g_nades_dark_damage; //LegendGuard adds new nade cvars 08-02-2021
+float autocvar_g_nades_dark_time;
+float autocvar_g_nades_dark_radius;
+string autocvar_g_nades_pokenade_type;
int autocvar_g_nades_tandemnade_type; //LegendGuard adds new nade cvar for emerald nade options 01-07-2021
float autocvar_g_nades_pokenade_monster_lifetime;
#endif
const int PROJECTILE_NADE_SPAWN = 79;
const int PROJECTILE_NADE_HEAL = 80;
const int PROJECTILE_NADE_HEAL_BURN = 81;
-const int PROJECTILE_NADE_MONSTER = 82;
-const int PROJECTILE_NADE_MONSTER_BURN = 83;
+const int PROJECTILE_NADE_TANDEM = 82;
+const int PROJECTILE_NADE_TANDEM_BURN = 83;
const int PROJECTILE_NADE_ENTRAP = 84;
const int PROJECTILE_NADE_ENTRAP_BURN = 85;
const int PROJECTILE_NADE_VEIL = 86;