gun: add ability to move look camera while targeting in combat (#1204)

Resolves #1187.
This commit is contained in:
walkawayy 2024-03-26 19:36:13 -04:00 committed by GitHub
parent 0e5a544279
commit d07a87f7b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 20 additions and 10 deletions

View file

@ -8,6 +8,7 @@
- added support for macOS builds (for both Apple Silicon and Intel) - added support for macOS builds (for both Apple Silicon and Intel)
- added optional support for OpenGL 3.3 Core Profile - added optional support for OpenGL 3.3 Core Profile
- added Italian localization to the config tool - added Italian localization to the config tool
- added the ability to move the look camera while targeting an enemy in combat (#1187)
- changed the way music timestamps are internally handled resets music position in existing saves - changed the way music timestamps are internally handled resets music position in existing saves
- changed vertex and fragment shaders into unified files that are runtime pre-processed for OpenGL versions 2.1 or 3.3 - changed vertex and fragment shaders into unified files that are runtime pre-processed for OpenGL versions 2.1 or 3.3
- fixed a missing translation for the Spanish config tool for the Eidos logo skip option (#1151) - fixed a missing translation for the Spanish config tool for the Eidos logo skip option (#1151)

View file

@ -330,6 +330,7 @@ Not all options are turned on by default. Refer to `TR1X_ConfigTool.exe` for det
- added the ability to reset control schemes to default - added the ability to reset control schemes to default
- added customizable controller support - added customizable controller support
- added an inverted look camera option - added an inverted look camera option
- added the ability to move the look camera while targeting an enemy in combat
- fixed freeze when holding the Action key during end of level - fixed freeze when holding the Action key during end of level
- fixed inability to switch Control keys when shimmying - fixed inability to switch Control keys when shimmying
- fixed setting user keys being very difficult - fixed setting user keys being very difficult

View file

@ -170,20 +170,26 @@ void Gun_Pistols_Control(LARA_GUN_TYPE weapon_type)
Gun_AimWeapon(winfo, &g_Lara.right_arm); Gun_AimWeapon(winfo, &g_Lara.right_arm);
if (g_Lara.left_arm.lock && !g_Lara.right_arm.lock) { if (g_Lara.left_arm.lock && !g_Lara.right_arm.lock) {
g_Lara.head_x_rot = g_Lara.left_arm.x_rot / 2; if (g_Camera.type != CAM_LOOK) {
g_Lara.head_y_rot = g_Lara.left_arm.y_rot / 2; g_Lara.head_x_rot = g_Lara.left_arm.x_rot / 2;
g_Lara.head_y_rot = g_Lara.left_arm.y_rot / 2;
}
g_Lara.torso_x_rot = g_Lara.left_arm.x_rot / 2; g_Lara.torso_x_rot = g_Lara.left_arm.x_rot / 2;
g_Lara.torso_y_rot = g_Lara.left_arm.y_rot / 2; g_Lara.torso_y_rot = g_Lara.left_arm.y_rot / 2;
} else if (!g_Lara.left_arm.lock && g_Lara.right_arm.lock) { } else if (!g_Lara.left_arm.lock && g_Lara.right_arm.lock) {
g_Lara.head_x_rot = g_Lara.right_arm.x_rot / 2; if (g_Camera.type != CAM_LOOK) {
g_Lara.head_y_rot = g_Lara.right_arm.y_rot / 2; g_Lara.head_x_rot = g_Lara.right_arm.x_rot / 2;
g_Lara.head_y_rot = g_Lara.right_arm.y_rot / 2;
}
g_Lara.torso_x_rot = g_Lara.right_arm.x_rot / 2; g_Lara.torso_x_rot = g_Lara.right_arm.x_rot / 2;
g_Lara.torso_y_rot = g_Lara.right_arm.y_rot / 2; g_Lara.torso_y_rot = g_Lara.right_arm.y_rot / 2;
} else if (g_Lara.left_arm.lock && g_Lara.right_arm.lock) { } else if (g_Lara.left_arm.lock && g_Lara.right_arm.lock) {
g_Lara.head_x_rot = if (g_Camera.type != CAM_LOOK) {
(g_Lara.right_arm.x_rot + g_Lara.left_arm.x_rot) / 4; g_Lara.head_x_rot =
g_Lara.head_y_rot = (g_Lara.right_arm.x_rot + g_Lara.left_arm.x_rot) / 4;
(g_Lara.right_arm.y_rot + g_Lara.left_arm.y_rot) / 4; g_Lara.head_y_rot =
(g_Lara.right_arm.y_rot + g_Lara.left_arm.y_rot) / 4;
}
g_Lara.torso_x_rot = g_Lara.torso_x_rot =
(g_Lara.right_arm.x_rot + g_Lara.left_arm.x_rot) / 4; (g_Lara.right_arm.x_rot + g_Lara.left_arm.x_rot) / 4;
g_Lara.torso_y_rot = g_Lara.torso_y_rot =

View file

@ -136,8 +136,10 @@ void Gun_Rifle_Control(LARA_GUN_TYPE weapon_type)
if (g_Lara.left_arm.lock) { if (g_Lara.left_arm.lock) {
g_Lara.torso_y_rot = g_Lara.left_arm.y_rot / 2; g_Lara.torso_y_rot = g_Lara.left_arm.y_rot / 2;
g_Lara.torso_x_rot = g_Lara.left_arm.x_rot / 2; g_Lara.torso_x_rot = g_Lara.left_arm.x_rot / 2;
g_Lara.head_x_rot = 0; if (g_Camera.type != CAM_LOOK) {
g_Lara.head_y_rot = 0; g_Lara.head_x_rot = 0;
g_Lara.head_y_rot = 0;
}
} }
Gun_Rifle_Animate(); Gun_Rifle_Animate();