mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-17 16:00:26 +02:00
Keep the bullets' autoaim for the mouse
Only the view's magnetism is turned off for the mouse: the bullets still bend toward the target, as with a controller, so shots land as they did. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b9f222222b
commit
5ac71baf94
4 files changed
+7
-24
No files matched your search
@@ -157,7 +157,7 @@ the setting for one start of the game. It has priority over the file.
|
||||
| `audio.volume` | `1.0` | `HALO_VOLUME` | The master volume. |
|
||||
| `input.mouse_sensitivity` | `1.0` | `HALO_MOUSE_SENSITIVITY` | The multiplier for the mouse aim. |
|
||||
| `input.invert_mouse` | `false` | `HALO_MOUSE_INVERT=1` sets `true` | `true`: the vertical mouse aim is inverted. |
|
||||
| `input.mouse_aim_assist` | `false` | `HALO_MOUSE_AIM_ASSIST` | `true`: the aim assist of the controller (magnetism and autoaim) also operates for the mouse. `false`: when the mouse moved after the right stick, there is no magnetism, and no autoaim except in lockstep games. |
|
||||
| `input.mouse_aim_assist` | `false` | `HALO_MOUSE_AIM_ASSIST` | `true`: the magnetism of the controller also operates for the mouse. `false`: when the mouse moved after the right stick, the view is not slowed or dragged by a target. The autoaim of the bullets operates in both cases. |
|
||||
| `game.language` | `""` | `HALO_LANGUAGE` | The language of the menus: `ja`, `de`, `fr`, `es` or `it`. Empty: English. |
|
||||
| `paths.data` | `""` | `HALO_DATA_ROOT` | The data root. Refer to "Start the game". |
|
||||
| `paths.saves` | `""` | `HALO_SAVE_ROOT` | The save root. Refer to "Files and folders". |
|
||||
|
||||
@@ -93,11 +93,10 @@ static const struct config_setting config_settings[] =
|
||||
{ "input.invert_mouse", _config_boolean, "false", "HALO_MOUSE_INVERT", _environment_set_is_true, _platform_desktop,
|
||||
"Moving the mouse forward looks down." },
|
||||
{ "input.mouse_aim_assist", _config_boolean, "false", "HALO_MOUSE_AIM_ASSIST", _environment_value, _platform_desktop,
|
||||
"Aim assist while aiming with the mouse, as with a controller: the view\n"
|
||||
"slowed and dragged along by a target (magnetism) and bullets bent\n"
|
||||
"toward it (autoaim). The last of the mouse and the right stick to move\n"
|
||||
"decides. In lockstep games the bullets' autoaim stays, since every\n"
|
||||
"machine simulates every shot alike." },
|
||||
"Magnetism while aiming with the mouse, as with a controller: the view\n"
|
||||
"slowed and dragged along by a target. The last of the mouse and the\n"
|
||||
"right stick to move decides. The bullets' autoaim (bent toward the\n"
|
||||
"target) stays either way." },
|
||||
|
||||
{ "game.language", _config_string, "\"\"", "HALO_LANGUAGE", _environment_value, _platform_all,
|
||||
"The language the game asks the Xbox for: \"ja\", \"de\", \"fr\", \"es\" or \"it\";\n"
|
||||
|
||||
@@ -130,8 +130,8 @@ int halo_linux_mouse_look(short gamepad_index, float *yaw, float *pitch)
|
||||
}
|
||||
|
||||
/* whether the player on the gamepad aims with the mouse (it moved after the
|
||||
right stick last did) and input.mouse_aim_assist is off: then the game's aim
|
||||
assist leaves them be (player_control.c, aim_assist.c) */
|
||||
right stick last did) and input.mouse_aim_assist is off: then the view's
|
||||
magnetism leaves them be (player_control.c); the bullets' autoaim stays */
|
||||
int halo_linux_mouse_aiming(short gamepad_index)
|
||||
{
|
||||
static int aim_assist = -1;
|
||||
|
||||
@@ -601,22 +601,6 @@ long player_aim_projectile(
|
||||
target_object_index= target.object_index;
|
||||
}
|
||||
}
|
||||
#ifdef HALO_LINUX
|
||||
/* no autoaim for a local player aiming with the mouse
|
||||
(port/linux/src/xinput_sdl.c), but for lockstep games, in which every
|
||||
machine must fire every shot alike; the target is still homed onto */
|
||||
{
|
||||
extern int halo_linux_mouse_aiming(short gamepad_index);
|
||||
extern boolean network_game_distributed(void);
|
||||
|
||||
if (player->local_player_index!=NONE &&
|
||||
halo_linux_mouse_aiming(player->local_player_index) &&
|
||||
(game_connection()==_game_connection_local || network_game_distributed()))
|
||||
{
|
||||
autoaim_level= 0.f;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Trace from the camera at the aiming unit's distance along the camera direction. */
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user