Raised This Month: $ Target: $400
 0% 

Real Weapon Drop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 05-02-2008 , 06:05   Re: Real Weapon Drop
Reply With Quote #6

Quote:
Originally Posted by Emp` View Post
Code:
parse(buffer, s_ent, 4, "", 0, "", 0, "", 0, "", 0, "", 0, "", 0, "", 0, "", 0, "", 0, "", 0);
// ->
parse(buffer, s_ent, 4);
Code:
	while( (ent=engfunc(EngFunc_FindEntityByString, ent, "classname", "weaponbox"))>0 )
	{
		if( ent>0 )
//you already check if the ent is >0 in the while loop
Code:
		classname = "";
// ->
		copy(classname, 1, "");
//poor way to clear an array
Code:
set_task(0.01,
//this just rounds down to 0.0, but look at next comment
don't see a point in modify_death_speed(weaponbox_ent) because you already set the velocity in weaponbox_spawned(weaponbox_ent, owner) so it really isn't doing anything
Code:
				buffer = "";
//same as other comment with clearing array
Approval with changes and confirmation that it works.
1. Agree, but didn't know, that it's poss. =P
2. If there are no weaponbox'es that while will be true, but only once (first check), that's why I'm checking it twice.
3. Kk, will change array clear, but just quiruous - what's the diffrence?
4. Set task 0.01 - exucates task in next frame (if 100 fps). Kz_jump_plugin uses the same set_task time to remove duck when teleported. Example: c4 exploaded - predeath - player speed is low speed. Delay - modifyes speed to explotion speed, what can be much bigger.

But ok. I'll make all that, butwont change delay, cuz i'm 100% sure, that it works. I was impressed finding that out two, but belive me - it makes a delay even with 0.0 will make 1 frame delay.

// edit:

Updated to 1.1 :
Changed: (code) modifyed array clear (less cpu usage - I think).
Changed: (code) entity scan (less cpu usage).
Changed: (code) unneded data getting from array - removed (less cpu usage).
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.

Last edited by MPNumB; 05-02-2008 at 07:56.
MPNumB is offline
Send a message via Skype™ to MPNumB
 



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 09:07.


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