Added a cvar to either reset the burn time when naded, or to use the original burn-time.
This commit is contained in:
parent
dd77d99eb9
commit
75d72fb3f2
@ -137,6 +137,7 @@ enum CvarsList
|
|||||||
Handle:CVAR_RESPAWN_TEAM_ZOMBIE,
|
Handle:CVAR_RESPAWN_TEAM_ZOMBIE,
|
||||||
Handle:CVAR_RESPAWN_TEAM_ZOMBIE_WORLD,
|
Handle:CVAR_RESPAWN_TEAM_ZOMBIE_WORLD,
|
||||||
Handle:CVAR_NAPALM_IGNITE,
|
Handle:CVAR_NAPALM_IGNITE,
|
||||||
|
Handle:CVAR_NAPALM_TIME_RESET,
|
||||||
Handle:CVAR_NAPALM_DOUSE,
|
Handle:CVAR_NAPALM_DOUSE,
|
||||||
Handle:CVAR_JUMPBOOST_BHOP_PROTECT,
|
Handle:CVAR_JUMPBOOST_BHOP_PROTECT,
|
||||||
Handle:CVAR_JUMPBOOST_BHOP_MAX,
|
Handle:CVAR_JUMPBOOST_BHOP_MAX,
|
||||||
@ -416,6 +417,7 @@ CvarsCreate()
|
|||||||
// Napalm (module)
|
// Napalm (module)
|
||||||
// ===========================
|
// ===========================
|
||||||
g_hCvarsList[CVAR_NAPALM_IGNITE] = CreateConVar("zr_napalm_ignite", "1", "Ignite grenade in mid-air after player throws it. [Dependency: Human Attribute 'has_napalm']");
|
g_hCvarsList[CVAR_NAPALM_IGNITE] = CreateConVar("zr_napalm_ignite", "1", "Ignite grenade in mid-air after player throws it. [Dependency: Human Attribute 'has_napalm']");
|
||||||
|
g_hCvarsList[CVAR_NAPALM_TIME_RESET] = CreateConVar("zr_napalm_time_reset", "1", "The burn-time is reset when being naded multiple times. [0: Original burn-time is used.]");
|
||||||
g_hCvarsList[CVAR_NAPALM_DOUSE] = CreateConVar("zr_napalm_douse", "0", "Minimum water-saturation before flame is extinguished. ['0' = Disabled | '1' = Feet | '2' = Waist | '3' = Full submersion]");
|
g_hCvarsList[CVAR_NAPALM_DOUSE] = CreateConVar("zr_napalm_douse", "0", "Minimum water-saturation before flame is extinguished. ['0' = Disabled | '1' = Feet | '2' = Waist | '3' = Full submersion]");
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,11 +132,17 @@ NapalmOnClientHurt(client, attacker, const String:weapon[])
|
|||||||
// If weapon is a grenade, then ignite player.
|
// If weapon is a grenade, then ignite player.
|
||||||
if (StrEqual(weapon, "hegrenade", false))
|
if (StrEqual(weapon, "hegrenade", false))
|
||||||
{
|
{
|
||||||
// Put any existing fire out.
|
new bool:reset = GetConVarBool(g_hCvarsList[CVAR_NAPALM_TIME_RESET]);
|
||||||
ExtinguishEntity(client);
|
new flags = GetEntityFlags(client);
|
||||||
|
|
||||||
// Re-ignite to start burn-time over.
|
if (reset || !(flags & FL_ONFIRE))
|
||||||
IgniteEntity(client, napalm_time);
|
{
|
||||||
|
// This stops the fire before re-ignition.
|
||||||
|
ExtinguishEntity(client);
|
||||||
|
|
||||||
|
// Ignite client.
|
||||||
|
IgniteEntity(client, napalm_time);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user