Quote:
Originally Posted by HamletEagle
We can't answer, a plugin alone won't usually cause any clear difference(of course, if not using, for example, per frame forwards badly with crap code).
What you can do is to remove CurWeapon event and also weapPickupEvent, and use Ham_Item_Deploy. Even with CurWeapon, you don't need the weapPickupEvent, but Item_Deploy is better than CurWeapon, it's called only at the moment when you need to show the model again.
Ham_TakeDamage is using game default function(for players it should be CBasePlayer::TakeDamage), and it's okay to use it too. Generally, if it's ok for the game it should be ok for you too.
For example, instead of:
PHP Code:
give_item(id,"ammo_9mm"); give_item(id,"ammo_9mm"); give_item(id,"ammo_9mm"); give_item(id,"ammo_9mm");
You could use cs_set_user_bpammo to save some native calls, even if kinda trivial. give_item firstly creates an entity then force touch between the ent and the player, cs_set_user_bpammo is a more direct way, it alters directly the m_rgAmmo offset.
|
Thank you for your time. I am going to adjust the code.
Quote:
Originally Posted by HamletEagle
Edit: About your last post, it's bullshit, don't try to micro optimize, why you are afraid of few checks ?
|
Hey, hahhahaha. Because I want fun stuff at my server, but if this fun stuff causes lag, then I prefer don't have them at all. So, if I can make 'micro optimize' to get rid of lag and keep the good stuff, would it be a good trade, don't you think?
For example, if there is something that is executed at server side depending about the 'ping', and it could be implemented at another way where it is computed at client side, hence don't increasing the client't ping, would be a good trade if its improvement where good.
Like the
Ham_TakeDamage, which is using the game default function. I am using it, instead of the original's
SilverWeapon stranger techniques, which of course is more powerful because affects the cs built-in bots, but it is of course, a sacrifice that is a good trade for server's/client's performance.