by Urre » Mon Apr 14, 2008 2:23 pm
Absolutely. If your cursor was csqc, it'd be a lot easier to do huds, but managing the units is a lot harder then, as you need to make them shared, and basicly code all the stuff yourself whcih prydoncursor does for you. I'm doing it the hard way, using csqc all the way, and I can tell you it's no fun. Until it works, ofcourse.
If not doing csqc, you'll have to use the same kind of hack Chris does for his game, where you disable all the unit selection code and whatnot whenever the cursor is within certain bounds, hardcoded on the server. Then manage mouse clicks according to where it is in the hud, also done on server. The only thing done on client in this case is the actual drawing of the hud. This works, but IMO is messy and doesn't allow as cool stuff.
Another idea, which I guess will work best for you, is a hybrid. Run both prydoncursor code and csqc mousepointer code, and disable/enable the two depending on wether the mouse position is above the hud or not, and just have one of the pointers be a hidden one. This way you don't have to hardcode things (as much) on the server, and can do cooler things on the client side of things. It will require you to send info about hud clicks to server though, which currently has no standardized way of doing it. Currently you need to stuffcmd all commands from the client, which is what I'm doing also, until something better comes along.
I was once a Quake modder