View Single Post
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 06-10-2011 , 23:51   Re: [SNIPPET] Detecting button presses (and releases)
Reply With Quote #2

This does not work fully with the most recent version of CSS.

If I press the use key, it does not detect it until I hold a movement key as well.

I do have sort of a newbish question what does:
Code:
        if ((buttons & button) && (g_LastButtons[id] & ~button))
        {
            OnButtonPress(id, button);
        }
do?

I understand that the if statement is looking for both sets to return true, but what does "(buttons & button)" mean? I understand it looks for "button" as apart of "buttons" but is that all?
__________________


Last edited by mysticssjgoku4; 06-11-2011 at 00:43.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4