Well I do not remember saying I knew c++.

As most of my posts state I am still learning.

If you don't want to help then don't reply.

I usually try to figure things out for my own, however some things I am not
clear on in c++.
Also at the top of the message I said "Disregard all the junk because I am
testing"
Which I was trying different things to see what happened.

The ! was a typo in the email I sent not the actual code...
Sorry about that.

I ask because I am trying to learn, and read docs online, sometimes things
do not make sense and that is when I ask.



r00t 3:16
CQC Gaming
www.cqc-gaming.com



----- Original Message -----
From: "Tony "omega" Sergi" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, January 09, 2005 10:09 PM
Subject: RE: [hlcoders] Keybind / prone


Dear god. <rant>
Sorry but, you said you knew c++ in another post..

Your code:
       mv->m_nOldButtons != IN_PRONE; <-- and you know c++ huh? :P

this is why I get so frustrated with newbies who insist they know how to
program in c/c++ and then work with a mod sdk. These are things a
programmer
should already know before venturing into a complicated game sdk :P

</rant>

ANYWAY...


mv->m_nOldButtons |= IN_PRONE; //add to old buttons mv->m_nButtons &= ~IN_PRONE; //remove from current buttons

also, you could also change the first if statement to this:

if ( mv->m_nButtons & IN_PRONE && !(mv->m_nOldButtons & IN_PRONE))
{
//do your stuff
}

-----Original Message-----
From: r00t 3:16 [mailto:[EMAIL PROTECTED]
Sent: January 9, 2005 2:18 AM
To: [email protected]
Subject: Re: [hlcoders] Keybind / prone

Not really.
Because what he said doesn't work.

I currently have
(disregard all the junk im trying to test stuff )


if ( mv->m_nButtons & IN_PRONE ) { if ( m_bToggleProne && bInProne ) { DevMsg(2,"Will Unprone Here\n"); m_bToggleProne = false; FinishUnProne(); mv->m_nOldButtons != IN_PRONE; } else { player->m_Local.m_bGoneProne = true; player->m_Local.m_flPronetime = GAMEMOVEMENT_PRONE_TIME; FinishProne(); m_bToggleProne = true; DevMsg(2, "Will prone here"); mv->m_nOldButtons != IN_PRONE; } }

You would think that would work ?
Well it scrolls the console forever

Will Unprone Here
Will prone here
Will Unprone Here
Will prone here
etc etc etc

As soon as I push the g button (that is what I have bound to prone )
The above scrolls forever...

I would imagine because my prone does not have a KeyUp(&in_prone); this
could be causing some issues.
As the flags need to be reset... KeyUp from what I can tell does this for
you????

Maybe Yahn or someone at valve can shed some light on this.
Maybe because this movement type I shouldn't add it this way.



r00t 3:16
CQC Gaming
www.cqc-gaming.com
----- Original Message -----
From: "Hasan Aljudy" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, January 09, 2005 2:02 AM
Subject: Re: [hlcoders] Keybind / prone


Wasn't this answered by someone already? put an "else if"

On Sun, 9 Jan 2005 01:22:30 -0500, r00t 3:16 <[EMAIL PROTECTED]>
wrote:
Well that isn't the problem really.
The prone code is being called etc ..

The problem is the toggle on / off part.

On key press it prones
On key press again it unprones.

Funny part though DOD has a prone from the looks of the code :P


r00t 3:16 CQC Gaming www.cqc-gaming.com ----- Original Message ----- From: "Hasan Aljudy" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Sunday, January 09, 2005 1:06 AM Subject: Re: [hlcoders] Keybind / prone

>I think you don't need to do all this .. simply put it in a ConCommand
>
> static ConCommand prone("prone", CC_Player_Prone);
> right above it declare void CC_Player_Prone( void ) {  [...]  }
>
> I'm not sure if this will work in multiplayer but by looking at some
> code, I *think* it will.
>
> On Sat, 8 Jan 2005 23:40:35 -0500, r00t 3:16 <[EMAIL PROTECTED]>
> wrote:
>> Could I remove the flag with
>> mv->m_nButtons &= ~IN_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
>>
>>
>
> _______________________________________________
> 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



_______________________________________________ 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



Reply via email to