Skip to content

Commit

Permalink
GE: speedup gun-centering, hopefully closer to gamepad now
Browse files Browse the repository at this point in the history
  • Loading branch information
emoose committed Feb 15, 2021
1 parent 39bca7c commit 0ffeccf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/xenia/hid/winkey/hookables/goldeneye.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,19 @@ bool GoldeneyeGame::DoHooks(uint32_t user_index, RawInputState& input_state) {
// Smoothly bring gun back to center
if (player_exiting_aim_mode_) {
if (*player_gun_x > 0) {
float gX = *player_gun_x - std::min(0.05f, (float)*player_gun_x);
float gX = *player_gun_x - std::min(0.2f, (float)*player_gun_x);
*player_gun_x = gX;
}
if (*player_gun_x < 0) {
float gX = *player_gun_x + std::min(0.05f, -((float)*player_gun_x));
float gX = *player_gun_x + std::min(0.2f, -((float)*player_gun_x));
*player_gun_x = gX;
}
if (*player_gun_y > 0) {
float gX = *player_gun_y - std::min(0.05f, (float)*player_gun_y);
float gX = *player_gun_y - std::min(0.2f, (float)*player_gun_y);
*player_gun_y = gX;
}
if (*player_gun_y < 0) {
float gX = *player_gun_y + std::min(0.05f, -((float)*player_gun_y));
float gX = *player_gun_y + std::min(0.2f, -((float)*player_gun_y));
*player_gun_y = gX;
}
if (*player_gun_y == 0 && *player_gun_x == 0) {
Expand Down
6 changes: 2 additions & 4 deletions src/xenia/hid/winkey/hookables/halo3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ bool Halo3Game::IsGameSupported() {
return false;
}

bool supported = false;

for (auto& build : supported_builds) {
auto* build_ptr = kernel_memory()->TranslateVirtual<const char*>(
build.second.build_string_addr);
Expand All @@ -118,8 +116,8 @@ bool Halo3Game::DoHooks(uint32_t user_index, RawInputState& input_state) {
}

if (supported_builds.count(game_build_)) {
// Doesn't seem to be any way to get tls_static_address_ besides this
// (XThread::GetTLSValue only returns tls_dynamic_address_, and doesn't
// HACKHACK: Doesn't seem to be any way to get tls_static_address_ besides
// this (XThread::GetTLSValue only returns tls_dynamic_address_, and doesn't
// seem to be any functions to get static_addr...)

uint32_t pcr_addr =
Expand Down

0 comments on commit 0ffeccf

Please sign in to comment.