Raised This Month: $ Target: $400
 0% 

Making C4 Explode Effects


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-11-2009 , 06:24   Re: Making C4 Explode Effects
Reply With Quote #5

Your code calls 20 times a native

This one calls 11 natives and does exactly the same (should be 2 times faster) :
PHP Code:
public cmdBoomid ) {
    new 
vOrigin];
    
get_user_originidvOrigin);
   
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
    
write_byteTE_EXPLOSION );
    
write_coordvOrigin[0] );
    
write_coordvOrigin[1] );
    
write_coordvOrigin[2] );
    
write_shortgBoomSprite );
    
write_byte30 );
    
write_byte15 );
    
write_byte);
    
message_end( );

You could hook FM_PrecacheModel post, and log sprites names, then when an explosion is triggered, and by hooking SVC_TEMPENTITY you can retrieve which sprite is used.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-11-2009 at 06:27.
ConnorMcLeod is offline
 



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 02:16.


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