You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add event_index to InputEventAction
This commit is contained in:
@@ -1244,7 +1244,7 @@ void Input::_update_action_cache(const StringName &p_action_name, ActionState &r
|
||||
r_action_state.cache.strength = 0.0;
|
||||
r_action_state.cache.raw_strength = 0.0;
|
||||
|
||||
int max_event = InputMap::get_singleton()->action_get_events(p_action_name)->size();
|
||||
int max_event = InputMap::get_singleton()->action_get_events(p_action_name)->size() + 1; // +1 comes from InputEventAction.
|
||||
for (const KeyValue<int, ActionState::DeviceState> &kv : r_action_state.device_states) {
|
||||
const ActionState::DeviceState &device_state = kv.value;
|
||||
for (int i = 0; i < max_event; i++) {
|
||||
|
||||
Reference in New Issue
Block a user