Programming Question getting started with C++

I see, that makes sense (maybe :blink:.) Thanks very much. :)

Well, the code compiles now at any rate. I've a long way to go to get anything useful into it, though (RCS thrusters for a start, then a key-bound attachment system, then lights on the thrusters and/or a floodlight over the cargo rack, UMMU, etc...)

It's all very intriguing. :)
 
I'm trying to get an attachment system much like Atlantis's post-tank-separation configuration (IE press J to release payload) but without knowing quite what is doing what. As it is, strange things are happening (much lag, keyboard most keyboard events unresponsive, impossible to change RCS mode though ROT RCS works fine, no autopilots (pro, retro, killrot, normal/antinormal, etc.) and really bad lag. I've been at this wizardry all day and haven't hit on a solution.

Most importantly, is this the simplest way of doing this? It seems just a bit roundabout, even if hacked together after scrutinising Atlantis's sample.

Source: http://pastebin.ca/2045307
 
Looks like you're missing a "return 0;" just before the last bracket of the clbkConsumeBufferedKey, I'm pretty sure that that'd stop most keys from working correctly, so it should look like this:
Code:
int LSS::clbkConsumeBufferedKey (DWORD key, bool down, char *kstate)
{
        if (!down) return 0;
        switch (key)
        {
                case OAPI_KEY_J:  // "Jettison"
                        {
                        bManualSeparate = true;
                        }
                return 1;
        }
[COLOR="Red"]return 0;[/COLOR]
}
 
Back
Top