aye, yup, disabling the saber.. but can't figure out best way to do this.
changing the cvar default for g_weapondisable in g_main accomplishes nothing. Any other attempts either crash or don't compile. This has got to be a simple one, and it's not like I haven't seen a mod with a disabled saber.
anyone know the best way to disable a weapon??
Also could be accomplished by disabling FP_SABER_OFFENSE, but I can't seem to even disable that, even with a g_weapondisable number. Again, multiple errors and no compile.
thx in advance!
OJP (ojp.jediknight.net) has code that allows you go use the weapon disable cvar to disable any of the weapons.
same problem. Using G_weapondisable does not work on the saber as far as I have gotten. Most people just take points off of saber attack to access melee.
Typing g_weapon disable 8 (the value for saber) doesn't work. And it wigs out and disables EVERYTHING EXCEPT the saber.
However typing 2048 (rocket) for instance, works fine.
I noticed in the INSTAGIB mod, the default for G_weapondisable and G_forcepowerdisable were both 0. The mod disables weapons and certain force without the cvar command. That's what I'm missing.
So, are you saying that you actually tried OJP?
When I fixed the weapondisable code for OJP, it worked even for the saber.
Maybe I'm not looking in the right place on your site.
I'm going to Documentation>Open Jedi Project Cvars
and using -
g_weaponDisable 0
Multiplayer, Weapons
Description:
Controls which weapons are useable in etc...
g_weapondisable 8 for saber.
You have to actually RUN OJP for the fixes to work. gees.
ok, I'm not understanding what OJP is. Reading documents now.
so uhh.. is there no easy way to do this without downloading OJP?
There is a real easy way. look in
g_client.c
ClientSpawn
then find: WP_SABER)
just stick a boolen in there
Thanks angel for the replay.. I'm a little confused though.. You said stick a boolean in there, could you be a little obvious? I know what booleans are of course but I fail to see what to do with it.. Anyway..
Thanks
count_coder, in g_client..
Around line 3418 (I don't know how many changes I made here, so just look around that line)
{
if (client->ps.fd.forcePowerLevel[FP_SABER_OFFENSE])
{
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_SABER ); //these are precached in g_items, ClearRegisteredItems()
}
else
{ //if you don't have saber attack rank then you don't get a saber
client->ps.stats[STAT_WEAPONS] |= (1 << WP_MELEE);
}
}
Altering that will remove the saber, downside is melee takes a hike too. I'm over removing the saber, instead I removed the deflect missle function which is pretty much all I wanted to accomplish in the first place.