[L4D2] Meteor Hunter
1 Attachment(s)
i was trying to think of ways to give infected players new abilities that can also encourage them to play with a higher level of skill.
this plugin rewards hunters who can pull off long distance pounces. when a hunter lands a pounce with a distance over 500 it creates an impact crater, plays an explosion sound, flings all survivors in the area away and they take 20 damage. i left in my testing command !testhit that admins can use to see what it actually does when a hunter lands. |
Re: [L4D2] Meteor Hunter
when compiled on 1.9 E:\sourcemod\addons\sourcemod\scripting\meteo r hunter.sp(24) : warning 203: symbol is never used: "hunter"
|
Re: [L4D2] Meteor Hunter
wait, you have signature?
so this plugin only works in linux? PHP Code:
|
Re: [L4D2] Meteor Hunter
This code is really really bad sorry to say.
1. Old syntax. 2. Hard coding signatures is bad, use a gamedata file. 3. Your "MySDKCall" is leaking handles, you should only prep the SDKCalls in plugin start storing handle in global variable. Right now you're constantly prepping on use which is bad. 4. See left4dhooks for windows and linux signature, why are you only including linux signature? These have been known for ages. 5. You're leaking the TR_TraceRayFilterEx handle - creating memory leak. 6. Redundant "IsValidEntity" check in player loop. 7. Using old "PrecacheParticle" method, see any of my plugins with effects for better method. 8. Using old "HurtEntity" method, see various plugins of mine for "SDKHooks_TakeDamage" method. 9. Not using entity references in timers to delete entities (so you'll inadvertently delete something else). 10. Using "return Plugin_Stop" in timer callback when it's not a repeating timer, unnecessary. 11. You have multiple warnings: "warning 234: symbol "FloatMul" is marked as deprecated: This native is internal implementation. For multiplication use the '*' operator." 12. Your "Plugin myinfo" section is weirdly placed half way through the script, standard practice is at the top of script. |
Re: [L4D2] Meteor Hunter
added the window signatures and fixed a few of the other issues silvers listed.
my code is still probably pretty bad tho |
Re: [L4D2] Meteor Hunter
I love the idea of this plugin, and want to put it in my server, so I remake code.
Hope you don't mind. Updated: Remake code, thanks to Silvers and Lux -Convar-
Spoiler
-Edit- Latest version always here |
Re: [L4D2] Meteor Hunter
@fbef0102: your version is leaking handles in "CreateRing" - missing "delete hPack".
|
Re: [L4D2] Meteor Hunter
Quote:
do not need to call CloseHandle() only when using "CreateDataTimer"? |
Re: [L4D2] Meteor Hunter
Quote:
PHP Code:
PHP Code:
|
Re: [L4D2] Meteor Hunter
Quote:
should I also write TIMER_DATA_HNDL_CLOSE? PHP Code:
|
| All times are GMT -4. The time now is 04:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.