forked from speed-dreams/speed-dreams-code
Fixed #179 (Speed limiter should toggle on/off). Thanks Simon
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2804 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: d1900593f729e6983902bc4c7fb2f46cb9567664 Former-commit-id: 0a53593412e63e5014aba20a7296fb1171a2cd64
This commit is contained in:
parent
a3070116bd
commit
75221cb6db
1 changed files with 5 additions and 8 deletions
|
@ -600,20 +600,17 @@ common_drive(const int index, tCarElt* car, tSituation *s)
|
|||
GfParmWriteFile(NULL, PrefHdle, "Human");
|
||||
}
|
||||
|
||||
sprintf(car->_msgCmd[0], "%s %s", (HCtx[idx]->paramAbs ? "ABS" : ""), (HCtx[idx]->paramAsr ? "ASR" : ""));
|
||||
sprintf(car->_msgCmd[0], "%s %s", (HCtx[idx]->paramAbs ? "ABS" : ""), (HCtx[idx]->paramAsr ? "TCS" : ""));
|
||||
memcpy(car->_msgColorCmd, color, sizeof(car->_msgColorCmd));
|
||||
|
||||
if ((cmd[CMD_SPDLIM].type == GFCTRL_TYPE_JOY_BUT && joyInfo->levelup[cmd[CMD_SPDLIM].val] == 1)
|
||||
if ((cmd[CMD_SPDLIM].type == GFCTRL_TYPE_JOY_BUT && joyInfo->edgeup[cmd[CMD_SPDLIM].val])
|
||||
|| (cmd[CMD_SPDLIM].type == GFCTRL_TYPE_MOUSE_BUT && mouseInfo->edgeup[cmd[CMD_SPDLIM].val])
|
||||
|| (cmd[CMD_SPDLIM].type == GFCTRL_TYPE_KEYBOARD && keyInfo[lookUpKeyMap(cmd[CMD_SPDLIM].val)].state == GFUI_KEY_DOWN))
|
||||
|| (cmd[CMD_SPDLIM].type == GFCTRL_TYPE_KEYBOARD && keyInfo[lookUpKeyMap(cmd[CMD_SPDLIM].val)].edgeUp))
|
||||
{
|
||||
speedLimiter = true;
|
||||
sprintf(car->_msgCmd[1], "Speed Limiter On");
|
||||
} else {
|
||||
speedLimiter = false;
|
||||
sprintf(car->_msgCmd[1], "Speed Limiter Off");
|
||||
speedLimiter = !speedLimiter;
|
||||
}
|
||||
|
||||
sprintf(car->_msgCmd[1], "Speed Limiter %s", (speedLimiter ? "On" : "Off"));
|
||||
|
||||
if ((cmd[CMD_LIGHT1].type == GFCTRL_TYPE_JOY_BUT && joyInfo->edgeup[cmd[CMD_LIGHT1].val])
|
||||
|| (cmd[CMD_LIGHT1].type == GFCTRL_TYPE_MOUSE_BUT && mouseInfo->edgeup[cmd[CMD_LIGHT1].val])
|
||||
|
|
Loading…
Reference in a new issue