[ioquake3] g_client.c weapon init question
Robert Hamilton
rob at ccrma.Stanford.EDU
Thu May 29 00:45:19 PDT 2008
Hi all,
I'm sure this topic has been covered before but I'm new to this list and
haven't had much luck looking online.
I'm trying to restrict the weapons my q3osc users can select, while at the
same time giving them the Plasma Gun and the BFG at spawning.
So far, I've tweaked the ClientSpawn method in g_client.c to get rid of the
Gauntlet and the Chaingun:
g_client.c
...
void ClientSpawn(gentity_t *ent) {
...
...
client->ps.stats[STAT_WEAPONS] = ( 1 << WP_PLASMAGUN );
client->ps.ammo[WP_PLASMAGUN] = -1;
client->ps.ammo[WP_BFG] = -1;
This gives the users the PlasmaGun at spawn, with unlimited ammo (ps.ammo = -1 ?)
How can I also give them the BFG at spawn? I'm not exactly sure what this
syntax is saying yet.
Also is there a better way of doing this? I've got a bunch of users who like
to tweak the game more than I want them to, so I'm also locking out the "give"
command in g_cmds.c, which works but also is a bit extreme. I'm just trying to
make sure they can only select certain weapons.
Thanks in advance for any suggestions,
best,
Rob
___________________________________________________________
Robert Hamilton
Center for Computer Research in Music and Acoustics (CCRMA)
Department of Music
Stanford University
rob at ccrma.stanford.edu
http://ccrma.stanford.edu/~rob
http://cm-wiki.stanford.edu/wiki/Q3osc
More information about the ioquake3
mailing list