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

Hero: Punisher V2


Post New Thread Reply   
 
Thread Tools Display Modes
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 07-26-2010 , 15:10   Re: Hero: Punisher V2
Reply With Quote #11

This is what i call an optimized version.

If it was me i would find another hero name and use this version for hoping a chance of approval.

Last edited by Fr33m@n; 07-26-2010 at 17:11. Reason: for optimized version see below.
Fr33m@n is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 07-26-2010 , 15:34   Re: Hero: Punisher V2
Reply With Quote #12

I was never aiming for approval, just a new hero.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 07-26-2010 , 17:02   Re: Hero: Punisher V2
Reply With Quote #13

optimized again.
Attached Files
File Type: sma Get Plugin or Get Source (sh_punisherv2.sma - 524 views - 2.3 KB)

Last edited by Fr33m@n; 07-27-2010 at 06:39.
Fr33m@n is offline
slamx
Member
Join Date: Jun 2006
Old 07-26-2010 , 17:54   Re: Hero: Punisher V2
Reply With Quote #14

Quote:
Originally Posted by Fr33m@n View Post
optimized again.
What did you optimize? I'm not sure what you mean.
__________________
slamx is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 07-26-2010 , 18:30   Re: Hero: Punisher V2
Reply With Quote #15

the code. more efficient, use less ressources.
Fr33m@n is offline
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 07-26-2010 , 22:39   Re: Hero: Punisher V2
Reply With Quote #16

I would suggest moving the get_pcvar_num(gPcvarAmmoToAdd) outside the loop and caching to a variable to optimize further, something I should point out to both you and Jelle is that the purpose of using SH_MAXSLOTS in the coding is so server ops can open superheroconst.inc and change the const to the number of slots they have on their server to do a quick optimization of all their scripts, but your usage of it with your players array will throw an error if they do that because get_players requires an array of exactly 32 cells so instead of doing players[SH_MAXSLOTS] you should have players[32].
__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 07-27-2010 , 06:36   Re: Hero: Punisher V2
Reply With Quote #17

done.

I know it need a 32 cells arrays for loop but i never considered this kind of view for players loop.

I used players[SH_MAXSLOTS] as a reference in my heroes because it was the way used in base package heroes.

I'm agree, i will change it.

Edit : Bug Repport done.

Last edited by Fr33m@n; 07-27-2010 at 06:48.
Fr33m@n is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 07-31-2010 , 13:23   Re: Hero: Punisher V2
Reply With Quote #18

Quote:
Originally Posted by Jelle View Post
I was never aiming for approval, just a new hero.
Then post it in off topic so it wont get thrashed?

But this hero should get approved, atleast the idea. Punisher is too powerful for "soft" sh servers.
__________________
The Art of War is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 07-31-2010 , 14:20   Re: Hero: Punisher V2
Reply With Quote #19

Quote:
Originally Posted by The Art of War View Post
Then post it in off topic so it wont get thrashed?

But this hero should get approved, atleast the idea. Punisher is too powerful for "soft" sh servers.
You can also just set the cvar for punisher to drop current weapon and get a new one with full clip. Then it takes some time to drop current and get a new, so you wont be spraying all the time.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 07-31-2010 , 16:46   Re: Hero: Punisher V2
Reply With Quote #20

Quote:
Originally Posted by Jelle View Post
You can also just set the cvar for punisher to drop current weapon and get a new one with full clip. Then it takes some time to drop current and get a new, so you wont be spraying all the time.
Hmm yes indeed, but I recall there's a line saying (not recommended) after that mode, and I prefer not to use things vittu are saying are not recommended, though of course it is possible.

Still, the idea is brilliant, and Fr33 really optimised the whole code, but I havent seen vittu around for a while but I hope at some point some version gets approved.
__________________
The Art of War 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 21:28.


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