Skip to content

Commit

Permalink
GE: remove gun-centering delays
Browse files Browse the repository at this point in the history
  • Loading branch information
emoose committed Feb 17, 2021
1 parent 4164e25 commit a7501b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/xenia/hid/winkey/hookables/goldeneye.cc
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,12 @@ bool GoldeneyeGame::DoHooks(uint32_t user_index, RawInputState& input_state,
*player_cam_y = camY;
}

time_start_center_ = time + std::chrono::milliseconds(50);
start_centering_ = true;
disable_sway_ = true; // skip weapon sway until we've centered
centering_speed_ = 0.05f; // speed up centering from aim-mode
} else {
// Apply gun-centering once enough time has passed
if (start_centering_ && time >= time_start_center_) {
// Apply gun-centering
if (start_centering_) {
if (gX != 0 || gY != 0) {
if (gX > 0) {
gX -= std::min(centering_speed_, gX);
Expand Down Expand Up @@ -428,7 +427,6 @@ bool GoldeneyeGame::DoHooks(uint32_t user_index, RawInputState& input_state,
}
} else {
if (!start_centering_) {
time_start_center_ = time + std::chrono::milliseconds(100);
start_centering_ = true;
centering_speed_ = 0.0125f;
}
Expand Down
1 change: 0 additions & 1 deletion src/xenia/hid/winkey/hookables/goldeneye.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class GoldeneyeGame : public HookableGame {
uint32_t prev_game_control_active_ = -1;

float centering_speed_ = 0.0125f;
xe::kernel::XClock::time_point time_start_center_;
bool start_centering_ = false;
bool disable_sway_ = false; // temporarily prevents sway being applied
};
Expand Down

0 comments on commit a7501b5

Please sign in to comment.