I’ve been trying variations on an idea i had for about six months off and on now. Eventually I got it to actually compile, but it looks like it spawns a small health and when I try to “use item” it says no item to use. I can’t pickup holdables until I use it, but it does nothing. I’ve tried modifying code for the ‘give_all’ cheat, and code from weapon banning tutorials… help?
in g_items.
void ClearRegisteredItems( void ) {
/* int it;
gentity_t it_ent;/
gclient_t *client;
I haven’t been modding since a very long time, but I’ll try to help.
The only holdable items in Quake 3 are the teleporter and the medkit. The weapons and the powerups are not holdable items and are handled separately.
So, what do you want to do ? You want to have all players to spawn with a medkit ?
I just checked the code, and maybe you should try to use the ‘Pickup_Holdable’ function (in g_items.c, line 195) ?
I don’t know if you’re allowed to use it in the function that handles player spawning, but let’s check it out :
g_client.c, void ClientSpawn(gentity_t *ent) :
Here’s line 1179 :
The funny thing about what you’re trying to do, is that’s pretty easy to do from a level designers perspective, there are tutorials to make players spawn with (or without) certain weapons, just by connecting the player spawn entities to weapons or items. But to generalize this you’ll have to add some code
Got it! I’ll be happy to share, as I don’t think anyone has done this before…
In g_client in the void ClientSpawn function, not sure what lines because the changes
are so many in my mod. But there’s these lines.