PDA

View Full Version : saber locking ending in a dismemberments


Markaine
02-24-2003, 10:44 AM
Is there a way to code mp saberlocking victories\loses to always or almost always to end in dimemberments like in sp.

I saw a line about
gGAvoidDismember = 1; and
gGAvoidDismember = 2

in g_active.c, is that what i should play with?

Markaine
02-24-2003, 01:44 PM
Oh ,yeah...
What is the trick to get bots to always use a lightsaber?
I made a couple of bots with all different combinations of weapon weights, and they still only pull out a saber when you get really close to them, like the Tex_Qui Gon. I want them to behave like CT_Windu or MP_Vader. I even copy/pasted the exact weapon weights...

razorace
02-26-2003, 04:57 AM
Originally posted by Markaine
Is there a way to code mp saberlocking victories\loses to always or almost always to end in dimemberments like in sp.

I saw a line about
gGAvoidDismember = 1; and
gGAvoidDismember = 2

in g_active.c, is that what i should play with?
You're very close. You'll need to play with the following line (it's above the point where gGAvoidDismember = 1; in g_active.c
if (clientLost && clientLost->inuse && clientLost->client && Q_irand(0, 40) > clientLost->health)The "Q_irand(0, 40) > clientLost->health" is what you're looking for.

Basically, Q_irand(0, 40) is a random number between 0 and 40 + zero. If the health of the losing player is less than the Q_irand(0, 40), the player dies and is dismembered. To increase the chances of dismemberment to 100%, just remove the "Q_irand(0, 40) > clientLost->health" part of the if statement.

Wudan
02-26-2003, 09:02 AM
Don't forget you have to turn dismemberment on in MP, I beleive razorace has done it but I've never taken the time to do it.

razorace
02-26-2003, 04:42 PM
yeah, you need to do that too. :) Note: This should still kill the player even if you don't have dismemberment on. However, the hand won't visually pop off unless the server and the client has dismemberment on.

Markaine
02-26-2003, 08:48 PM
Yup, everything's working perfectly. Thanks guys