Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

disabling saber

Page: 1 of 1
 Barada
09-08-2004, 1:17 AM
#1
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!
 razorace
09-08-2004, 10:54 AM
#2
OJP (ojp.jediknight.net) has code that allows you go use the weapon disable cvar to disable any of the weapons.
 Barada
09-08-2004, 6:39 PM
#3
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.
 razorace
09-09-2004, 1:18 AM
#4
So, are you saying that you actually tried OJP?

When I fixed the weapondisable code for OJP, it worked even for the saber.
 Barada
09-09-2004, 1:10 PM
#5
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.
 razorace
09-09-2004, 1:29 PM
#6
You have to actually RUN OJP for the fixes to work. gees.
 Barada
09-09-2004, 2:19 PM
#7
ok, I'm not understanding what OJP is. Reading documents now.
 count_coder
09-12-2004, 10:24 AM
#8
so uhh.. is there no easy way to do this without downloading OJP?
 razorace
09-12-2004, 3:09 PM
#9
yep
 GangsterAngel
09-16-2004, 3:20 AM
#10
There is a real easy way. look in

g_client.c
ClientSpawn
then find: WP_SABER)

just stick a boolen in there
 count_coder
09-18-2004, 7:18 PM
#11
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
 Barada
09-19-2004, 1:21 AM
#12
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.
Page: 1 of 1