Doh...
haha
Ok not sure how to remove something from the mv->m_nButtons ?
The KeyUp I guess did this for me when I had them set to KeyDown +prone
KeyUp -prone
r00t 3:16
CQC Gaming
www.cqc-gaming.com
----- Original Message -----
From: "Tony "omega" Sergi" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, January 08, 2005 11:17 PM
Subject: RE: [hlcoders] Keybind / prone
Heh.
If (blah && !prone)
{
}
ELSE <-------------- VERY IMPORTANT!!
if (blah && prone)
{
}
you're calling both functions TWICE if the button is down. You also need
to
remove the button from mv->m_nButtons WHEN a toggle is set, or else it
will
just keep getting called.
-----Original Message-----
From: r00t 3:16 [mailto:[EMAIL PROTECTED]
Sent: January 8, 2005 11:12 PM
To: [email protected]
Subject: Re: [hlcoders] Keybind / prone
arggg...
Ok maybe im an idiot and missing the obvious but I can not for the life of
me get a working toggle for prone.
if ( ( mv->m_nButtons & IN_PRONE ) && !bInProne )
{
// go prone ...
GoProne();
bInProne = true;
DevMsg(2, "go prone here");
}
if ( ( mv->m_nButtons & IN_PRONE ) && bInProne )
{
// go unprone ...
GoUnProne();
bInProne = false;
}
Now becaue Prone(); ( NOTE Duck() is in CGameMovement::PlayerMove()
This is where I also put Prone(); PlayerMove is called from some Think()
function (haven't traced this)
Now because the above code gets often as soon as I set bInProne = true;
The GoUnProne(); is then a true statement so it also executes.
r00t 3:16
CQC Gaming
www.cqc-gaming.com
----- Original Message -----
From: "jeff broome" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, January 07, 2005 9:14 PM
Subject: Re: [hlcoders] Keybind / prone
On Fri, 7 Jan 2005 21:07:57 -0500, r00t 3:16 <[EMAIL PROTECTED]>
wrote:
Hmm,
I added the following, to add the key.
static ConCommand startprone("+prone", IN_ProneDown);
static ConCommand endprone("-prone", IN_ProneUp);
Well, take that out and add...
static ConCommand toggleprone("prone", IN_Prone);
Jeffrey "botman" Broome
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 06/01/2005
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 06/01/2005
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders