|
Member
|
01-03-2014
, 03:35
Re: Anything that is Explosive..
|
#22
|
Quote:
Originally Posted by thetwistedpanda
You can try this; had to debug the issue for a client a while back, essentially any env_explosion was causing issues with a store module so easiest option was to just smite all env_explosions then manually fix the maps that broke because of it. The latter you'll have to handle.
PHP Code:
#pragma semicolon 1
#include <sourcemod> #include <sdktools> #include <sdkhooks>
#define PLUGIN_VERSION "1.0.0"
new Handle:g_hMethod = INVALID_HANDLE;
public Plugin:myinfo = { name = "Anti Env Explosions", author = "Panduh (AlliedMods: thetwistedpanda)", description = "Potentially assists in resolving crashes relating to env_explosion entities.", version = PLUGIN_VERSION, url = "http://forums.alliedmods.net" }
public OnPluginStart() { g_hMethod = CreateConVar("env_explosions_method", "0", "Determines method for handling env_explosion entities. (0 = Nullify Effect, 1 = Kill in OnEntityCreated)", FCVAR_NONE, true, 0.0, true, 1.0); AutoExecConfig(true, "env_explosions"); }
public OnEntityCreated(entity, const String:classname[]) { if(entity > 0) { if(StrEqual(classname, "env_explosion")) CreateTimer(0.0, Timer_OnEntityCreated, EntIndexToEntRef(entity)); } }
public Action:Timer_OnEntityCreated(Handle:owner, any:ref) { new entity = EntRefToEntIndex(ref); if(entity != INVALID_ENT_REFERENCE && IsValidEdict(entity)) { if(GetConVarBool(g_hMethod)) AcceptEntityInput(entity, "Kill"); else { SetEntProp(entity, Prop_Data, "m_iMagnitude", 0); SetEntProp(entity, Prop_Data, "m_iRadiusOverride", 0); SetEntPropFloat(entity, Prop_Data, "m_flDamageForce", 0.0); SetEntProp(entity, Prop_Data, "m_nNextThinkTick", -1); } } }
|
The source pawn file that you posted is handling its job, although it disabled a lot of the feature of the map, it's not dealing any damage to anyone at all, it's exploding but there's no damage.
|
|
|
|