I'm sure some aimbots directly manipulate the "look direction" in the engine frame by frame and completely ignore mouse input... the really obvious ones with instant lockon even 180° away for instance. Then yes you could compare that with mouse input and tell there's a problem (if the hack lets you run your detection in the first place). But those aren't the problematic aimbots. A decent aimbot will most likely emulate/modify the mouse input itself so you can't tell there's cheating going on by comparing mouse input (which could theoretically be sent over the network for investigation instead of just look direction) and look direction.
I think it would be easy to override. After all the computer doesn't really know there's a mouse, it's just getting data from a device driver, and QL doesn't really know either. It would be easy to fool. In fact I suspect it is already fooled.
The aimbot can't be issuing commands like +right and +lookup because yawspeed/pitchspeed are locked down. There are no other commands to send to get the view to move, so it must be sending mouse counts.
Maybe it even examines your cvars, like, sens/yaw/pitch/accel/ and adopts its counts accordingly. This wouldn't be too difficult imo. Or the cheat authors could just say please set sens 1 yaw/pitch 0.022 for aimbot to work properly or somet.
As for analyzing the motion, this was discussed somewhat in this thread here in 2011:
What's weird was two people chimed in who seemed like cheat authors. One of them 'requrse' seemed to think the idea of detecting cheats in such a way was crazy, and the other was certain that it was.
The other guy "imnotserious", had his post deleted, but he posted a block of code that apparently randomizes/humanizes the bot's motion.
I'm not convinced that detecting cheats this way is impossible, but it may be very very difficult. I feel like the cheat authors 'protest too much' here though, like they sense that this could really bust them up. Who knows.
The best cheat protection is players, all devs would have to do is implement a quick report feature where players can flag a player as a likely cheat or not.
Once enough suspicion has been attributed to an account that player gets flagged for manual analysis, if the player is proven as a cheat or not, it should reflect in the reps of those who accused him.
All this data should be visible as soon as a player joins, so before you even play someone, you should have an idea of how other people have perceived him.
When you use ebay, the first thing I check is the feedback.
Apparent cheats can be cleared as genuine if they well known in the community.
its not perfect, but IMO that's the best way and I don't think anyone has really tried this yet.
1) the cheating program can do anything it feels like. This includes writing an alternative game client (with or without graphics) that speaks the game communication protocol and plays automatically. Messing with the game client that you play on is only one way to write the aimbot.
2) detecting discrepancies only works if you can trust the code doing the detection and that your data is clean. Usually you can't guarantee either.
In practice cheat detection is hide and seek. The devs put a new trap and hope some more cheat users fall in it, because they didn't know it's there.
Your player struct contains where you are looking, you get the pos from another player, change the values so that the pov is pointing at the desired location.
This will be snappy so cheat-devs create algorithms for smooth transitions between angles. What all the dinosaurs in here calls "humanized".
But you could do the same with the length of the mouse input to evade AC.
i've read that battlefield's fairfight anticheat system uses something similar to your idea. from what i've gathered it largely fails at what it tries to do ;)
a mouse is just an usb device hooked up to a player's pc, as all things clientside it's open to be manipulated as long as someone bothers enough.
if you've followed the recent ban 'wave' of cs go pro players you'd realize that even lan events with some serious money on the line and a huge crowd of spectators are not free of cheats.
first question you should ask yourself is how ingame bots works out of the box, like Sorlag or Hunter etc. Answer is here. Its just that their behaviour i limited in Q3engine for perfomances purpose aka jittery moves. I suggest you look at how left 4 dead ingame bots are working. amasingly well and low on ressources, yet smooth aim.