diff --git a/src/zr/cvars.inc b/src/zr/cvars.inc index 8773f98..a11a99e 100644 --- a/src/zr/cvars.inc +++ b/src/zr/cvars.inc @@ -137,6 +137,7 @@ enum CvarsList Handle:CVAR_RESPAWN_TEAM_ZOMBIE, Handle:CVAR_RESPAWN_TEAM_ZOMBIE_WORLD, Handle:CVAR_NAPALM_IGNITE, + Handle:CVAR_NAPALM_TIME_RESET, Handle:CVAR_NAPALM_DOUSE, Handle:CVAR_JUMPBOOST_BHOP_PROTECT, Handle:CVAR_JUMPBOOST_BHOP_MAX, @@ -416,6 +417,7 @@ CvarsCreate() // 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_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]"); diff --git a/src/zr/napalm.inc b/src/zr/napalm.inc index 8057998..f5eaf66 100644 --- a/src/zr/napalm.inc +++ b/src/zr/napalm.inc @@ -132,11 +132,17 @@ NapalmOnClientHurt(client, attacker, const String:weapon[]) // If weapon is a grenade, then ignite player. if (StrEqual(weapon, "hegrenade", false)) { - // Put any existing fire out. - ExtinguishEntity(client); + new bool:reset = GetConVarBool(g_hCvarsList[CVAR_NAPALM_TIME_RESET]); + new flags = GetEntityFlags(client); - // Re-ignite to start burn-time over. - IgniteEntity(client, napalm_time); + if (reset || !(flags & FL_ONFIRE)) + { + // This stops the fire before re-ignition. + ExtinguishEntity(client); + + // Ignite client. + IgniteEntity(client, napalm_time); + } } }