Welcome to part three of the FAQ (Frequently Asked Questions) series.
This is a very simple, one step process.
Open up bg_pmove.c (or bg_pmove.cpp in SP), and in the function PM_WeaponOkOnVehicle (it will look like this:),
//see if a weapon is ok to use on a vehicle
qboolean PM_WeaponOkOnVehicle( int weapon )
{
//FIXME: check g_vehicleInfo for our vehicle?
switch ( weapon )
{
//case WP_NONE:
case WP_MELEE:
case WP_SABER:
case WP_BLASTER:
//case WP_THERMAL:
return qtrue;
break;
}
return qfalse;
}
Add whatever weapons you want to be included here. So for instance, if we wanted to make the Repeater usable on a swoop, you might want to add it thusly:
//see if a weapon is ok to use on a vehicle
qboolean PM_WeaponOkOnVehicle( int weapon )
{
//FIXME: check g_vehicleInfo for our vehicle?
switch ( weapon )
{
//case WP_NONE:
case WP_MELEE:
case WP_SABER:
case WP_BLASTER:
case WP_REPEATER: // eezstreet add
//case WP_THERMAL:
return qtrue;
break;
}
return qfalse;
}
That's all you need to do! There's nothing else needed here.
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now