Hello!
Last time I posted here I announced a mod called Uber Arena and requested help with an issue regarding ioquake3 compatibility, and the kind folks here helped me out significantly. Since then I have made lots of progress on it, cleaning up a bunch of junk code, adding new features, and even getting featured on ModDB for a short while. So just wanted to give a shout out and a huge thank you to everyone here at the ioquake3 forums.
I’m returning here as I am currently hitting a massive roadblock in regards to transmitting entity flag info from the server to the client. I encountered it a while back, decided to just leave it be and come back to it, hoping that maybe I missed something, but I’m still running into the same problems.
So in bg_public.h there are several definitions for entity flags, and because they’re in a bg file they are, in theory, readable from both the server and client games, which should make them a good way to send information about entity state to the client game. I want to add flags for each uberweapon so I can start adding effects like beeping sounds for homing rockets, different colors for the arc lightning gun / ion plasma bolts, etc.
To test things out, I quickly defined an entity flag:
#define EF_TRANSMIT 0x00200000 // just for testing
The one right before it is 0x00100000, so it follows the hex flag numbering scheme properly.
Then I do a bitwise OR assignment in the Upgrade_Weapon function to turn that flag on.
void Upgrade_Weapon(int counter, gentity_t *other, int steps) {
other->client->ps.eFlags |= EF_TRANSMIT; // just for testing
...
And a Bitwise AND / check in CG_Missile function:
if (cent->currentState.eFlags & EF_TRANSMIT) {
CG_Printf("can you read this");
}
So the intended outcome of this test is:
- Upgrade any weapon into an uberweapon (either with 3x pickup, tuning device, or the /uber cmd - all call the same function Upgrade_Weapon). EF_TRANSMIT is turned on.
- Game should print “can you read this” continuously while a missile is in the air, if the person who fired it has an uberweapon, since EF_TRANSMIT should now be on.
(And I can easily revert this test code since I make regular commits to GitHub)
But, just like my last attempts, nothing happens - the game still refuses to send over the information from the server to the client. Would love to know if anyone has ran into similar struggles in the past, what their solutions were, and why the problem occurs in the first place.
I also heard from ToKu over on the Q3W forums that, apparently, flags beyond 0x00800000 don’t get sent to the client. ToKu mentioned that this was a limitation in the ETQW code, but the Quake 3 source code doesn’t have such a comment. If this limitation does indeed exist in Q3 as well (and just wasn’t documented in the original source for whatever reason), is there a way to increase that limit / work around it within the confines of a user-made mod? I’d need a flag for each uberweapon, which would definitely send it above the client limit (if it exists), and there’s only so many existing flags that I can replace / move around / reuse for different entities without conflicts before I run out of those, too.
Here’s the original Q3W thread for reference:
https://www.quake3world.com/forum/viewtopic.php?f=16&t=53914