From e8c22b950f63b80cb39f222bdcc6033a60f6a296 Mon Sep 17 00:00:00 2001 From: XProger Date: Sun, 2 Jul 2017 23:49:27 +0300 Subject: [PATCH] #59 fix --- src/lara.h | 5 ++++- src/ui.h | 52 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/lara.h b/src/lara.h index a80352a..9a140a4 100644 --- a/src/lara.h +++ b/src/lara.h @@ -1764,7 +1764,10 @@ struct Lara : Character { float ext = angle.y; if (input & FORTH) { - res = STATE_WALK; + if (state == STATE_BACK) + res = STATE_STOP; + else + res = STATE_WALK; } else if (input & BACK) { res = STATE_BACK; ext += PI; diff --git a/src/ui.h b/src/ui.h index 323152e..3f6a1f7 100644 --- a/src/ui.h +++ b/src/ui.h @@ -194,32 +194,32 @@ namespace UI { mesh->addBar(buffer.indices, buffer.vertices, buffer.iCount, buffer.vCount, type, pos, vec2(size.x * value, size.y), 0xFFFFFFFF); } -const char *helpText = \ -"Controls gamepad, touch and keyboard:@"\ -" H - Show or hide this help@"\ -" TAB - Inventory@"\ -" LEFT - Left@"\ -" RIGHT - Right@"\ -" UP - Run@"\ -" DOWN - Back@"\ -" SHIFT - Walk@"\ -" SPACE - Draw Weapon@"\ -" CTRL - Action@"\ -" ALT - Jump@"\ -" Z - Step Left@"\ -" X - Step Right@"\ -" A - Roll@"\ -" C - Look # not implemented #@"\ -" V - First Person View@" -" R - slow motion@"\ -" T - fast motion@"\ -" ALT + ENTER - Fullscreen@@"\ -"Actions:@"\ -" Out of water - Run + Action@"\ -" Handstand - Run + Walk@"\ -" Swan dive - Run + Walk + jump@"\ -" DOZY on - Look + Step Right + Action + Jump@"\ -" DOZY off - Walk@"; + const char *helpText = + "Controls gamepad, touch and keyboard:@" + " H - Show or hide this help@" + " TAB - Inventory@" + " LEFT - Left@" + " RIGHT - Right@" + " UP - Run@" + " DOWN - Back@" + " SHIFT - Walk@" + " SPACE - Draw Weapon@" + " CTRL - Action@" + " ALT - Jump@" + " Z - Step Left@" + " X - Step Right@" + " A - Roll@" + " C - Look # not implemented #@" + " V - First Person View@" + " R - slow motion@" + " T - fast motion@" + " ALT + ENTER - Fullscreen@@" + "Actions:@" + " Out of water - Run + Action@" + " Handstand - Run + Walk@" + " Swan dive - Run + Walk + jump@" + " DOZY on - Look + Step Right + Action + Jump@" + " DOZY off - Walk@"; void renderHelp() { if (showHelp)