mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Added wallhack
This commit is contained in:
parent
1419e989cd
commit
fc3ce84420
6 changed files with 12 additions and 1 deletions
|
|
@ -116,6 +116,8 @@ static buttonCodes[] = {
|
|||
{ "RUN", Input::Run },
|
||||
{ "DEACTIVATE", Input::Deactivate },
|
||||
|
||||
{ "DEBUGACTION",Input::DebugAction},
|
||||
|
||||
{ "L", Input::L },
|
||||
{ "R", Input::R },
|
||||
|
||||
|
|
|
|||
|
|
@ -125,6 +125,9 @@ class Game_Character
|
|||
# * 0 = Determines if all directions are impassable (for jumping)
|
||||
#--------------------------------------------------------------------------
|
||||
def passable?(x, y, d)
|
||||
if Window_Settings.DebugIsEnabled && Input.press?(Input::DEBUGACTION)
|
||||
return true
|
||||
end
|
||||
# Get new coordinates
|
||||
new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
|
||||
new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,9 @@ public:
|
|||
F5 = 25, F6 = 26, F7 = 27, F8 = 28, F9 = 29,
|
||||
|
||||
/* Non-standard extensions */
|
||||
MouseLeft = 38, MouseMiddle = 39, MouseRight = 40
|
||||
MouseLeft = 38, MouseMiddle = 39, MouseRight = 40,
|
||||
|
||||
DebugAction = 41
|
||||
};
|
||||
|
||||
void update();
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ static const KbBindingData defaultKbBindings[] ={
|
|||
{ SDL_SCANCODE_S, Input::Items },
|
||||
{ SDL_SCANCODE_LSHIFT, Input::Run },
|
||||
{ SDL_SCANCODE_C, Input::Deactivate },
|
||||
{ SDL_SCANCODE_LCTRL, Input::DebugAction},
|
||||
{ SDL_SCANCODE_Q, Input::L },
|
||||
{ SDL_SCANCODE_W, Input::R },
|
||||
};
|
||||
|
|
@ -207,6 +208,7 @@ static bool verifyDesc(const BindingDesc &desc){
|
|||
Input::Items,
|
||||
Input::Run,
|
||||
Input::Deactivate,
|
||||
Input::DebugAction,
|
||||
Input::L, Input::R,
|
||||
Input::F5, Input::F6, Input::F7, Input::F8, Input::F9
|
||||
};
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ struct VButton{
|
|||
BTN_STRING(Right, TRSTR_KEYBIND_RIGHT),
|
||||
BTN_STRING(Run, TRSTR_KEYBIND_RUN),
|
||||
BTN_STRING(Deactivate, TRSTR_KEYBIND_DEACTIVATE),
|
||||
BTN_STRING(DebugAction, TRSTR_KEYBIND_DEBUGACTION),
|
||||
BTN_STRING(Items, TRSTR_KEYBIND_ITEMS),
|
||||
BTN_STRING(R, TRSTR_KEYBIND_R),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,3 +50,4 @@
|
|||
#define TRSTR_KEYBIND_DEACTIVATE 49
|
||||
#define TRSTR_KEYBIND_ITEMS 50
|
||||
#define TRSTR_KEYBIND_R 51
|
||||
#define TRSTR_KEYBIND_DEBUGACTION 50
|
||||
|
|
|
|||
Loading…
Reference in a new issue