Skip to content

Commit

Permalink
Better ToggleSprint method
Browse files Browse the repository at this point in the history
  • Loading branch information
marioCST committed Aug 22, 2024
1 parent bf993cb commit 1da9f9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/client/feature/module/impl/game/ToggleSprintSneak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ void ToggleSprintSneak::onTick(Event& evGeneric) {
}
else if ((std::get<BoolValue>(sprint) && toggleSprinting) || input->sprintKey) {
left = L"Sprinting";
if (input->front && !plr->getItemUseDuration() && !input->sneak && plr->getHunger() > 6.f) { // TODO: check CollidedHorizontally/vertically + hunger
if (!input->sprintKey) {
plr->setSprinting(true);
}
}
input->sprinting = true;
if (toggleSprinting) {
right = L"Toggled";
if (std::get<BoolValue>(alwaysSprint)) right = L"Always";
Expand Down
1 change: 1 addition & 0 deletions src/sdk/common/entity/component/MoveInputComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ namespace SDK {
MVCLASS_FIELD(bool, back, 0x0B, 0x60, 0x60);
MVCLASS_FIELD(bool, left, 0x0C, 0x61, 0x61);
MVCLASS_FIELD(bool, right, 0x0D, 0x62, 0x62);
MVCLASS_FIELD(bool, sprinting, 0x27, 0x6C, 0x6C);
};
}

0 comments on commit 1da9f9e

Please sign in to comment.