Quote:
Originally Posted by WATCH_D0GS UNITED
@SVC, thanks for dedicating your time.
|
No problem, I like help when i can.
Also, can you tell me what is offset 220? I dont remember in this moment.
On the other hand:
Quote:
Originally Posted by WATCH_D0GS UNITED
...we want to accurately detect the weapon shot moment.
The less time the functions are active, the less CPU/RAM usage and the higher the fps rate.
|
Completely agree with you, always trying to keep the less CPU usage rather than RAM. But there are some things I can see using this way:
1) I can't test rigth now (maybe tomorrow, i hope), but reading a bit,
can see that not only from weapons shots is called TraceLine but from other places/conditions.
2) In the above example (as you see, and other places),
TraceLine will be called continually on each
StatusBar update, and this is only for 1 player. Now
imagine a 25+ players scenario ----> you will make an extra lot of checks unnecessary.
3) Honestly speaking of
CPU usage, this din't use a
10~20% of all CPU using by
engine-routine in just 1 frame. Of course, everyone programs like want.
4) I supposed the only thing that makes the "
filter" to detect the shoot is the "220 offets" check (of course, with weaponid, but is not as many important than the first).
There is one bad thing, I forget to made in my code and it wast a
pistol-check (since like how is coded, I'm almost sure if you keep +attack press with pistol it will do a
fake shoot-detect).