Raised This Month: $12 Target: $400
 3% 

[L4D & L4D2] Physics fix [9-August-2013]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
disawar1
AlliedModders Donor
Join Date: Aug 2011
Location: Russian
Plugin ID:
2798
Plugin Version:
1.2
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    15 
    Plugin Description:
    Fixed 3rd party plugins/addons bugs
    Old 02-10-2012 , 19:22   [L4D & L4D2] Physics fix [9-August-2013]
    Reply With Quote #1

    Plugin dedicated to the memory of Heath Ledger whose acting game the impression me
    Physics:

    Description:
    Most plugins use cheat commands to create oxygentank, propanetank or fireworkcrate and this is bad!! When you find such a propanetank on the map and try to shoot to blow up those zombies standing nearby nothing will happen.
    This plugin fixed it! If you are playing with sv_cheats '1' and use the 'give oxygentank' command change 'physics_timer' the value to 1 or 2 sec.

    Video Demonstration: YouTube

    ConVar:
    "physics_version", "1.2", "Plugin version."
    "physics_timer", "0.01", "Time interval when the fix is triggered after oxygentank/fireworkcrate/propanetank created, 0.0: Disable Physics Fix"

    Barrow Fix:

    A requested by Electr000999 and TheJokerx.

    Description:
    Some custom campaings (like this) installed on your server cause a bug where the wheelbarrow may explode like propane tanks, set the value to '0' if this bug never happens.

    Video Demonstration: YouTube

    ConVar:
    "physics_barrow", "0", "WheelBarrow Fix: 1: Enable, 0: Disable"

    Requirement: SDK Hooks

    Change log:
    Code:
    1.2 (9 August 2013)
    
     - Following changes was made
    
    1.1 (13 February 2012)
    
     - 172 .sp/266 .smx views
     - More convars added
    
    1.0 (2 February 2012)
    
     - 48 views
     - release
    Attached Files
    File Type: sp Get Plugin or Get Source (fix_Physics.sp - 2185 views - 10.2 KB)
    __________________

    Last edited by disawar1; 09-26-2018 at 18:26. Reason: removes .smx ; feedback given
    disawar1 is offline
    McFlurry
    Veteran Member
    Join Date: Mar 2010
    Location: RemoveEdict(0);
    Old 02-10-2012 , 22:42   Re: [L4D & L4D2] Physics fix
    Reply With Quote #2

    OnEntityCreated strangely enough exists in somewhere in SourceMod(I don't know which include it's a part of), which means that SDKHooks isn't necessary. I don't know why SDKHooks still has its OnEntityCreated forward.
    __________________
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 02-12-2012 , 11:13   Re: [L4D & L4D2] Physics fix
    Reply With Quote #3

    Quote:
    Originally Posted by McFlurry View Post
    OnEntityCreated strangely enough exists in somewhere in SourceMod(I don't know which include it's a part of), which means that SDKHooks isn't necessary. I don't know why SDKHooks still has its OnEntityCreated forward.
    What are you smoking?
    psychonic is offline
    dcx2
    Senior Member
    Join Date: Sep 2011
    Old 02-12-2012 , 12:47   Re: [L4D & L4D2] Physics fix
    Reply With Quote #4

    Hi disawar,

    I tried to download your sp and compile it myself (web compiler failed). When I load it onto my server, it does not work. I set physics_timer to 5 and used "ent_create weapon_fireworkcrate". Then I waited 5 seconds and shot the firework crate, but it did not explode. I was in a Survival map on L4D2, my server has SDKHooks 2.1 as well.

    tEntDev confirms that the entity I created is still CFireworkCrate. It only becomes CPhysicsProp after I pick it up.

    I hope this can be fixed because I really want a plugin that does this.
    dcx2 is offline
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 02-12-2012 , 14:16   Re: [L4D & L4D2] Physics fix
    Reply With Quote #5

    Hi uhm I used the cheat commands to check plugin, and testing in all gamemod l4d, l4d2, try to compile with #define debug 1 You should see these messages 1.) entity created <weapon_fireworkcrate> 2.) entity re-created %f %f %f . physics_timer value Max 2.0 sec, Min 0.01 sec.

    If you do not see debug msg then it is not "weapon_fireworkcrate" try to modify the code to get entity's name
    PHP Code:
    public OnEntityCreated(entity, const String:classname[])
    {
        
    PrintToChatAll("entity created <%s>"classname);
    ..... 
    __________________

    Last edited by disawar1; 02-12-2012 at 14:44.
    disawar1 is offline
    McFlurry
    Veteran Member
    Join Date: Mar 2010
    Location: RemoveEdict(0);
    Old 02-12-2012 , 15:36   Re: [L4D & L4D2] Physics fix
    Reply With Quote #6

    The web compiler just successfully compiled a modified version of this plugin that excluded the sdkhooks include. Why is that? It still had all the OnEntityCreated forward in the source.

    Edit: Try the attachment
    Attached Files
    File Type: sp Get Plugin or Get Source (fix_Physics.sp - 1712 views - 12.1 KB)
    __________________

    Last edited by McFlurry; 02-12-2012 at 15:36.
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 02-13-2012 , 07:36   Re: [L4D & L4D2] Physics fix
    Reply With Quote #7

    McFlurry Thank you noticed it, I do not know about it because this is my first experience with SDK Hooks so if you have this extension #include <sdkhooks> it is not required. UPDATE!
    __________________

    Last edited by disawar1; 02-13-2012 at 08:31.
    disawar1 is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 02-14-2012 , 11:22   Re: [L4D & L4D2] Physics fix
    Reply With Quote #8

    Quote:
    Originally Posted by McFlurry View Post
    The web compiler just successfully compiled a modified version of this plugin that excluded the sdkhooks include. Why is that? It still had all the OnEntityCreated forward in the source.
    Because you just added another function, albeit a public one. They don't have to be defined somewhere ahead of time.

    The following will also compile fine, despite no inc being included with a forward named hihi:
    Code:
    public hihi() {     return 3; }
    psychonic is offline
    McFlurry
    Veteran Member
    Join Date: Mar 2010
    Location: RemoveEdict(0);
    Old 02-14-2012 , 15:33   Re: [L4D & L4D2] Physics fix
    Reply With Quote #9

    Ah, now I see how that works. I guess disawar should fix it so it includes sdkhooks for safety.
    __________________
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 02-14-2012 , 20:42   Re: [L4D & L4D2] Physics fix
    Reply With Quote #10

    oh Jesus ><
    __________________
    disawar1 is offline
    Reply


    Thread Tools
    Display Modes

    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 12:22.


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