// }}}
// {{{ mortar
set g_balance_grenadelauncher_primary2secondary 0
+set g_balance_grenadelauncher_primary_sticky 0
set g_balance_grenadelauncher_primary_damage 50
set g_balance_grenadelauncher_primary_edgedamage 38
set g_balance_grenadelauncher_primary_force 400
set g_balance_grenadelauncher_primary_speed_z 0
set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_primary_lifetime 30
+set g_balance_grenadelauncher_primary_lifetime2 1
set g_balance_grenadelauncher_primary_refire 0.8
set g_balance_grenadelauncher_primary_animtime 0.3
set g_balance_grenadelauncher_primary_ammo 2
+set g_balance_grenadelauncher_primary_health 25
set g_balance_grenadelauncher_secondary_damage 60
set g_balance_grenadelauncher_secondary_edgedamage 38
set g_balance_grenadelauncher_secondary_force 400
// }}}
// {{{ mortar
set g_balance_grenadelauncher_primary2secondary 0
+set g_balance_grenadelauncher_primary_sticky 0
set g_balance_grenadelauncher_primary_damage 70
set g_balance_grenadelauncher_primary_edgedamage 38
set g_balance_grenadelauncher_primary_force 400
// }}}
// {{{ mortar // TODO
set g_balance_grenadelauncher_primary2secondary 0
+set g_balance_grenadelauncher_primary_sticky 1
set g_balance_grenadelauncher_primary_damage 60
set g_balance_grenadelauncher_primary_edgedamage 28
set g_balance_grenadelauncher_primary_force 200
set g_balance_grenadelauncher_primary_speed_up 200
set g_balance_grenadelauncher_primary_speed_z 0
set g_balance_grenadelauncher_primary_spread 0
-set g_balance_grenadelauncher_primary_lifetime 10
+set g_balance_grenadelauncher_primary_lifetime 5
+set g_balance_grenadelauncher_primary_lifetime2 1
set g_balance_grenadelauncher_primary_refire 0.8
set g_balance_grenadelauncher_primary_animtime 0.5
set g_balance_grenadelauncher_primary_ammo 2
+set g_balance_grenadelauncher_primary_health 25
set g_balance_grenadelauncher_secondary_damage 65
set g_balance_grenadelauncher_secondary_edgedamage 30
set g_balance_grenadelauncher_secondary_force 300
set g_balance_grenadelauncher_secondary_speed_up 0
set g_balance_grenadelauncher_secondary_speed_z 200
set g_balance_grenadelauncher_secondary_spread 0
-set g_balance_grenadelauncher_secondary_lifetime 2
+set g_balance_grenadelauncher_secondary_lifetime 1.5
set g_balance_grenadelauncher_secondary_refire 0.8
set g_balance_grenadelauncher_secondary_animtime 0.5
set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_tracer 0
+set g_balance_campingrifle_tracer 1
set g_balance_campingrifle_primary_damage 60
set g_balance_campingrifle_primary_headshotaddeddamage 100
set g_balance_campingrifle_primary_spread 0
// }}}
// {{{ mortar
set g_balance_grenadelauncher_primary2secondary 0
+set g_balance_grenadelauncher_primary_sticky 0
set g_balance_grenadelauncher_primary_damage 50
set g_balance_grenadelauncher_primary_edgedamage 38
set g_balance_grenadelauncher_primary_force 400
set g_balance_grenadelauncher_primary_speed_z 0
set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_primary_lifetime 30
+set g_balance_grenadelauncher_primary_lifetime2 1
set g_balance_grenadelauncher_primary_refire 0.8
set g_balance_grenadelauncher_primary_animtime 0.3
set g_balance_grenadelauncher_primary_ammo 2
+set g_balance_grenadelauncher_primary_health 25
set g_balance_grenadelauncher_secondary_damage 60
set g_balance_grenadelauncher_secondary_edgedamage 38
set g_balance_grenadelauncher_secondary_force 400
// }}}
// {{{ mortar
set g_balance_grenadelauncher_primary2secondary 1
+set g_balance_grenadelauncher_primary_sticky 0
set g_balance_grenadelauncher_primary_damage 60
set g_balance_grenadelauncher_primary_edgedamage 10
set g_balance_grenadelauncher_primary_force 250
set g_balance_grenadelauncher_primary_speed_z 0
set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_primary_lifetime 5
+set g_balance_grenadelauncher_primary_lifetime2 1
set g_balance_grenadelauncher_primary_refire 0.7
set g_balance_grenadelauncher_primary_animtime 0.3
set g_balance_grenadelauncher_primary_ammo 2
+set g_balance_grenadelauncher_primary_health 25
set g_balance_grenadelauncher_secondary_damage 65
set g_balance_grenadelauncher_secondary_edgedamage 10
set g_balance_grenadelauncher_secondary_force 300
remove (self);
}
+void W_Grenade_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+{
+ if (self.health <= 0)
+ return;
+ self.health = self.health - damage;
+ if (self.health <= 0)
+ {
+ W_PrepareExplosionByDamage(attacker, self.think);
+ }
+}
+
void W_Grenade_Touch1 (void)
{
PROJECTILE_TOUCH;
- W_Grenade_Explode ();
+ if(cvar("g_balance_grenadelauncher_primary_sticky") && other.takedamage != DAMAGE_AIM)
+ {
+ entity oldowner;
+ oldowner = self.owner;
+
+ vector temporigin;
+ temporigin = self.origin;
+
+ remove(self);
+ local entity gren;
+
+ gren = spawn ();
+ gren.owner = oldowner;
+ gren.classname = "grenade";
+ gren.bot_dodge = TRUE;
+ gren.bot_dodgerating = cvar("g_balance_grenadelauncher_primary_damage");
+ gren.movetype = MOVETYPE_NONE;
+ PROJECTILE_MAKETRIGGER(gren);
+ gren.projectiledeathtype = WEP_GRENADE_LAUNCHER;
+ setorigin(gren, temporigin);
+ setsize(gren, '0 0 -3', '0 0 -3');
+
+ gren.nextthink = time + cvar("g_balance_grenadelauncher_primary_lifetime2");
+ gren.think = adaptor_think2use_hittype_splash;
+ gren.use = W_Grenade_Explode;
+
+ gren.flags = FL_PROJECTILE;
+
+ gren.takedamage = DAMAGE_YES;
+ gren.health = cvar("g_balance_grenadelauncher_primary_health");
+ gren.event_damage = W_Grenade_Damage;
+
+ CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE, TRUE);
+ }
+ else
+ W_Grenade_Explode ();
}
void W_Grenade_Touch2 (void)
}
}
-void W_Grenade_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
-{
- if (self.health <= 0)
- return;
- self.health = self.health - damage;
- if (self.health <= 0)
- {
- W_PrepareExplosionByDamage(attacker, self.think);
- }
-}
-
void W_Grenade_Attack (void)
{
local entity gren;