[solved] addtofullpack from an entity
I want to make an entity that I spawn glow to a single team, but I can't seem to make it working...
PHP Code:
|
Re: addtofullpack from an entity
PHP Code:
PHP Code:
|
Re: addtofullpack from an entity
Ok testing it out, but what does the "player" variable stands for ? if the host is a player or the ent ? :?
also hostflags and pSet, what are those for ? :} edit: yep, works... it was like my version, but I checked if "player" was positive, I would have cached the ent afterwards anyway :P |
Re: addtofullpack from an entity
never do something like retrieving a classname + equal() in addtofullpack, it takes a lot cpu! addtofullpack is called thousands of times within a few seconds! always cache data you need to check in addtofullpack.
Code:
FM_AddToFullPack(entState, e, ent, host, iHostFlags, iPlayer, pSet) |
Re: [solved] addtofullpack from an entity
Yeah I know, it's like prethink, I used entity_get_string() just to test, so I don't do all the global variables and stuff and then I have the big surprise of not working xD
Hmm, would it help if I skip some frames from it... like so: PHP Code:
|
Re: [solved] addtofullpack from an entity
its not like prethink, test it yourself :X prethink is maybe called 10000 times when addtofullpack is near to 1mio (dont remember my testing values but addtofullpack also depends on the map).
skipping shouldnt be a huge thing to improve the plugins performance since you have to check, increment and reset the var. |
| All times are GMT -4. The time now is 01:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.