I have modeled a few weapons and i'm looking into replacing the stock Q3 ones with mine. However, i noticed that the code responsible for loading weapons is really "coupled" with the stock weapons: there's a lot of switch's and if's depending on the weapon, for loading some parts of the model, or rotating other parts... a real mess.
Does anyone with a better experience with the Q3 codebase could guide me (or point me some tuts/docs) into the job of replacing the weapon models? Which files have weapon-specific loading/switching? For example: to replace the machine gun, i have to alter a few files with MD3 loading of separate parts, and other files to make the weapon rotate (i have to disable that for my model), etc.
Replacing stock Q3 weapons with custom ones
Re: Replacing stock Q3 weapons with custom ones
Here's a tutorial about adding a new weapon.
http://www.quake3hut.co.uk/q3coding/mor ... eapons.htm
It might be a starting point for what you are looking for.
Perhaps somebody else here can help you better detail...
http://www.quake3hut.co.uk/q3coding/mor ... eapons.htm
It might be a starting point for what you are looking for.
Perhaps somebody else here can help you better detail...
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
Re: Replacing stock Q3 weapons with custom ones
I have noticed that this tut does not cover adding first-person weapon model. How is this done?
Re: Replacing stock Q3 weapons with custom ones
Do you really need to alter the code to do this? What's exactly what you want to do? You can take a look at other custom models, it might help.
Re: Replacing stock Q3 weapons with custom ones
I just find the whole thing difficult because the code is so tightly coupled. Adding a new weapon is a nightmare.