Raised This Month: $32 Target: $400
 8% 

Anything that is Explosive..


Post New Thread Reply   
 
Thread Tools Display Modes
Legitified
Member
Join Date: Jul 2013
Old 01-02-2014 , 22:32   Re: Anything that is Explosive..
Reply With Quote #21

Panda I think it helped A LOT. Thank you very much.
Until I switch back to Windows, I hope this keeps it from crashing until then, Panda may I have permission to msg you?

Last edited by Legitified; 01-02-2014 at 22:43.
Legitified is offline
Legitified
Member
Join Date: Jul 2013
Old 01-03-2014 , 03:35   Re: Anything that is Explosive..
Reply With Quote #22

Quote:
Originally Posted by thetwistedpanda View Post
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_NONEtrue0.0true1.0);
    
AutoExecConfig(true"env_explosions");
}

public 
OnEntityCreated(entity, const String:classname[])
{
    if(
entity 0)
    {
        if(
StrEqual(classname"env_explosion"))
            
CreateTimer(0.0Timer_OnEntityCreatedEntIndexToEntRef(entity));
    }
}

public 
Action:Timer_OnEntityCreated(Handle:ownerany:ref)
{
    new 
entity EntRefToEntIndex(ref);
    if(
entity != INVALID_ENT_REFERENCE && IsValidEdict(entity))
    {
        if(
GetConVarBool(g_hMethod))
            
AcceptEntityInput(entity"Kill");
        else
        {
            
SetEntProp(entityProp_Data"m_iMagnitude"0);
            
SetEntProp(entityProp_Data"m_iRadiusOverride"0);
            
SetEntPropFloat(entityProp_Data"m_flDamageForce"0.0);
            
SetEntProp(entityProp_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.
Legitified is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 01-03-2014 , 08:15   Re: Anything that is Explosive..
Reply With Quote #23

That's sorta what it's supposed to do, it doesn't have any logic for re-creating a non-crashing explosion. It just disables the entity (or deletes) to stop the crashing, then another plugin or map modification is required to either re-create the explosion effect with temp ents and manual damage application or whatever is fancied.
__________________
thetwistedpanda is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-03-2014 , 10:30   Re: Anything that is Explosive..
Reply With Quote #24

Dunno, but I think it is some interaction with sdkhooks and the env_explosion, or explosions in general.
I can't for the life of me figure it out, and unfortunately I don't have a linux server to get meaningful debug info from.

Also, you are supposed to be able to hookspawn and return plugin handled yes? Always hangs my server for every entity I try it on.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Legitified
Member
Join Date: Jul 2013
Old 01-03-2014 , 18:53   Re: Anything that is Explosive..
Reply With Quote #25

Quote:
Originally Posted by friagram View Post
Dunno, but I think it is some interaction with sdkhooks and the env_explosion, or explosions in general.
I can't for the life of me figure it out, and unfortunately I don't have a linux server to get meaningful debug info from.

Also, you are supposed to be able to hookspawn and return plugin handled yes? Always hangs my server for every entity I try it on.
If you move to a linux nothing would change honestly. That's what I did and nope, it didn't help!
There's no way to find a solution for this on my part. I have no knowledge in coding Sourcemod/SourcePawn.

Last edited by Legitified; 01-03-2014 at 18:54.
Legitified is offline
Legitified
Member
Join Date: Jul 2013
Old 01-05-2014 , 04:15   Re: Anything that is Explosive..
Reply With Quote #26

Disabled SMAC, seems to take a lot of stress of the server, and is now able to handle the env_explosion(s) but I need that plugin to prevent cheaters..
Legitified is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode