Raised This Month: $ Target: $400
 0% 

Nade Radius


Post New Thread Reply   
 
Thread Tools Display Modes
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 10-11-2010 , 02:39   Re: Nade Radius
Reply With Quote #11

We need to find solution to remove OnGameFrame for that simple task.
__________________
altex is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 10-11-2010 , 02:52   Re: Nade Radius
Reply With Quote #12

For this simple matter of code, there's no harm in it running OnGameFrame. The only other solution that comes to mind is a timer that fires before a grenade explodes and calls itself every 0.1 seconds until the grenade actually explodes.

While I cannot for the life of me find the post to link you to it, it roughly describes everything that's occurring during an OnGameFrame call. If memory serves me correctly however, it loops through all clients in-game at least twice, all of the entities, and a few other things. That being said, the server can handle a few additional calls to OnGameFrame, especially something as light as this. It's when you get several plugins calling it, or plugins doing a lot more than they should, that you'll run into lag issues.
__________________

Last edited by thetwistedpanda; 10-11-2010 at 02:58.
thetwistedpanda is offline
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 10-11-2010 , 03:13   Re: Nade Radius
Reply With Quote #13

I think it should be another way.
Where is engine get default values for nade radius and demage from? Maybe there is special entity, or maybe we should set some property of hegrenade too, not only on hegrenade_projectile etc.
__________________
altex is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 10-13-2010 , 08:51   Re: Nade Radius
Reply With Quote #14

OnEntityCreated fires before the entity spawns, you need a spawn hook, it doesn't seem to work on all entities so you may need to change the values on the next gameframe or at latest 0.1 seconds with a timer. also you only need to change the radius and damage once as they don't get reset (well the last time i checked).
blodia is offline
tigerox
AlliedModders Donor
Join Date: Oct 2008
Location: Canada
Old 10-16-2010 , 13:24   Re: Nade Radius
Reply With Quote #15

You can use my StickyNades Lite plugin to modify your grenade damage and radius. It uses a SpawnHook instead of using OnGameFrame.
__________________
tigerox 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 12:29.


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