I'm wondering how the random hipfire bullet spread is technically handled by the engine. It's certainly different from recoil in that recoil simply changes your viewangles which is then accounted for in CL_FinishMove. But spread?
I've checked the angles, hooking CL_WritePacket, and there's no difference whatsoever. I also know that the spread calculation is done separately for screen rendering - hooking CG_GetSpreadForWeapon and making it return 0 will give you "local" no spread, so the bullets will seem to go perfectly straight, yet in actual gameplay they will still miss just the same. On the other hand, however, spread calculation must be done somewhere in the client since it's possible to create no-spread hacks that offset it by changing viewangles.
If anyone could explain the concept or tell me where in the .exe to look for it, it'd be grateful. Thanks.