Colors hack
Posted: Thu Oct 06, 2016 7:48 pm
I'm really not certain of the inner workings of the Quake engines, since I've never looked at that code, but this is my understanding.
When trying to use colors 14 and 15, both the client and the server are working against you.
If you try to change to those funky colors, the server goes "Nope" and sets you at color 13 instead.
If the server has support for the colors hacked in, then you can change to those colors, but on level changes, your client will stop and look and go, "WTF color am I? Nope" and change you back to a legal color.... It's because your client doesn't set it's internal _cl_color variable to those funny colors, because it thinks the server won't allow it anyway (I think). In that case, I use the "colors" command to directly set _cl_color so that your Quake client doesn't see a conflict so doesn't try to change anything.
My hacky method in the case where the server doesn't support the colors, is just to manually force the server to send the WriteByte thing to all connected clients to tell everyone you have changed to funky colors. But that means that it only affects people who are connected when that happens. I also just added in a forced setting of your "team" since the server won't be setting that automatically either -- that's what affects your "pack particle" color.
Of course, with the server not allowing those colors, at level change, the server goes, "Man, WTF color are you?? Nope!"
So now I've made it even more hacky.... I save your funky colors when you use the "colors" command, and upon loading a new level, I do the WriteByte 12 seconds after you enter the server (when it says "press 9 or 0 to suck ass, blah blah") -- the delay is to make sure everyone has time to connect and see it.
Though, again, that won't affect anyone who connects after that point....
I guess I could also send the WriteBye every time you died... which would mean anyone connected at that time would be sure to see your funny colors....
I guess I should really see if Pol can hack it into the server.... That would work much better. I'm not sure if that will happen....
But I've got it all hacky now so you won't have to keep inputting your color yourself. Unless someone new connects and you are trying to show off before the next level change....
When trying to use colors 14 and 15, both the client and the server are working against you.
If you try to change to those funky colors, the server goes "Nope" and sets you at color 13 instead.
If the server has support for the colors hacked in, then you can change to those colors, but on level changes, your client will stop and look and go, "WTF color am I? Nope" and change you back to a legal color.... It's because your client doesn't set it's internal _cl_color variable to those funny colors, because it thinks the server won't allow it anyway (I think). In that case, I use the "colors" command to directly set _cl_color so that your Quake client doesn't see a conflict so doesn't try to change anything.
My hacky method in the case where the server doesn't support the colors, is just to manually force the server to send the WriteByte thing to all connected clients to tell everyone you have changed to funky colors. But that means that it only affects people who are connected when that happens. I also just added in a forced setting of your "team" since the server won't be setting that automatically either -- that's what affects your "pack particle" color.
Of course, with the server not allowing those colors, at level change, the server goes, "Man, WTF color are you?? Nope!"
So now I've made it even more hacky.... I save your funky colors when you use the "colors" command, and upon loading a new level, I do the WriteByte 12 seconds after you enter the server (when it says "press 9 or 0 to suck ass, blah blah") -- the delay is to make sure everyone has time to connect and see it.
Though, again, that won't affect anyone who connects after that point....
I guess I could also send the WriteBye every time you died... which would mean anyone connected at that time would be sure to see your funny colors....
I guess I should really see if Pol can hack it into the server.... That would work much better. I'm not sure if that will happen....
But I've got it all hacky now so you won't have to keep inputting your color yourself. Unless someone new connects and you are trying to show off before the next level change....