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 cmdBoom( id ) {
new vOrigin[ 3 ];
get_user_origin( id, vOrigin, 3 );
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_EXPLOSION );
write_coord( vOrigin[0] );
write_coord( vOrigin[1] );
write_coord( vOrigin[2] );
write_short( gBoomSprite );
write_byte( 30 );
write_byte( 15 );
write_byte( 0 );
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.
__________________