Cache get_user_weapon
Is it enough to cache it in curweapon event? Is it reliable, because i plan to use cached value in prethink?
|
Re: Cache get_user_weapon
CurWeapon gets called each time player changes their weapon, picks it up, gets it by any entity or is given on spawn.
The only time it couldn't be called properly is when Ham gives player a weapon or removes it from them, but I'm not sure about this. Download drekes' StripWeapons HamSandwich library and try it out. |
Re: Cache get_user_weapon
Hook Ham_Item_Deploy on every weapon, would be enough for caching user's current weapon id
|
Re: Cache get_user_weapon
What do you plain to do in PreThink ?
|
Re: Cache get_user_weapon
Quote:
Problem was with weapons which have silencer and burst. Code:
|
Re: Cache get_user_weapon
find_ent_by_owner in CmdStart sucks
fm_find_ent_by_owner is worst |
Re: Cache get_user_weapon
Quote:
EDIT: maybe to cache entity id, in item deploy, and use it later in cmdstart? but i think that i shouldn't cache every possible value, it's cmdstart, not prethink :S |
| All times are GMT -4. The time now is 20:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.