AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Physics fix [9-August-2013] (https://forums.alliedmods.net/showthread.php?t=178076)

disawar1 02-10-2012 19:22

[L4D & L4D2] Physics fix [9-August-2013]
 
1 Attachment(s)
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


McFlurry 02-10-2012 22:42

Re: [L4D & L4D2] Physics fix
 
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.

psychonic 02-12-2012 11:13

Re: [L4D & L4D2] Physics fix
 
Quote:

Originally Posted by McFlurry (Post 1648182)
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?

dcx2 02-12-2012 12:47

Re: [L4D & L4D2] Physics fix
 
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.

disawar1 02-12-2012 14:16

Re: [L4D & L4D2] Physics fix
 
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);
..... 


McFlurry 02-12-2012 15:36

Re: [L4D & L4D2] Physics fix
 
1 Attachment(s)
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

disawar1 02-13-2012 07:36

Re: [L4D & L4D2] Physics fix
 
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!

psychonic 02-14-2012 11:22

Re: [L4D & L4D2] Physics fix
 
Quote:

Originally Posted by McFlurry (Post 1649196)
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; }

McFlurry 02-14-2012 15:33

Re: [L4D & L4D2] Physics fix
 
Ah, now I see how that works. I guess disawar should fix it so it includes sdkhooks for safety.

disawar1 02-14-2012 20:42

Re: [L4D & L4D2] Physics fix
 
oh Jesus ><


All times are GMT -4. The time now is 07:46.

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