( I will only explain the goodies that are not self explanitory) If you don’t understand what the Vector… functions then you need to read the Vectors article on code3arena. What the hell is this you ask ? Lets disect this function and see what is does. Open bg_misc.c and goto line 329 and add the following code after line 329 : /*QUAKED weapon_flamethrower (.3. Next we are going to add the definitions for our new weapon and the ammo it uses. Open inv.h and add the code bellow after lines 17 and and 65 : #define INVENTORY_FLAMETHROWER35 #define MODELINDEX_FLAMETHROWER36 Now we must add the inventory and model indexes. Open g_combat.c and add the following after line 155. MOD_PLASMA, MOD_PLASMA_SPLASH, MOD_FLAME_THROWER, MOD_RAILGUN, Now goto line 444 and add the following MOD flag, we will use this later to determine the means of death and print a relevant message. WP_GRAPPLING_HOOK, WP_FLAME_THROWER, WP_NUM_WEAPONS } weapon_t
We will use this flag to indentify with the weapon and it’s state. open bg_public.h and add the following code after line 247. ADDING WEAPON AND AMMO DEFINITIONSįirst we are going to add a new flag for the flame thrower and the means of death (MOD). This is a very large tutorial and requires a number of additions to the cgame,ui and game code, so get yourself a coke and start reading… 1. For this tutorial I will be using the flame thrower from the solidground v2.0 mod.
In this Tutorial I will explain how to add a new weapon with new models,shaders,skins and logic into Q3A.