-
Notifications
You must be signed in to change notification settings - Fork 0
/
playerstandard.lua
77 lines (63 loc) · 2.62 KB
/
playerstandard.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
local _update_check_actions = PlayerStandard._update_check_actions
function PlayerStandard:_update_check_actions(t, dt, paused)
local input = self:_get_input(t, dt, paused)
self:_determine_move_direction()
self:_update_interaction_timers(t)
self:_update_throw_projectile_timers(t, input)
self:_update_reload_timers(t, dt, input)
self:_update_melee_timers(t, input)
self:_update_charging_weapon_timers(t, input)
self:_update_use_item_timers(t, input)
self:_update_equip_weapon_timers(t, input)
self:_update_running_timers(t)
self:_update_zipline_timers(t, dt)
if self._change_item_expire_t and self._change_item_expire_t <= t then
self._change_item_expire_t = nil
end
if self._change_weapon_pressed_expire_t and self._change_weapon_pressed_expire_t <= t then
self._change_weapon_pressed_expire_t = nil
end
self:_update_steelsight_timers(t, dt)
if input.btn_stats_screen_press then
self._unit:base():set_stats_screen_visible(true)
elseif input.btn_stats_screen_release then
self._unit:base():set_stats_screen_visible(false)
end
self:_update_foley(t, input)
local new_action = nil
local anim_data = self._ext_anim
new_action = new_action or self:_check_action_weapon_gadget(t, input)
if _G.IS_VR then
new_action = new_action or self:_check_action_deploy_underbarrel(t, input)
end
new_action = new_action or self:_check_action_weapon_firemode(t, input)
new_action = new_action or self:_check_action_melee(t, input)
new_action = new_action or self:_check_action_reload(t, input)
new_action = new_action or self:_check_change_weapon(t, input)
new_action = new_action or self:_check_action_deploy_bipod(t, input)
if not new_action then
new_action = self:_check_action_primary_attack(t, input)
if not _G.IS_VR and not new_action then
self:_check_stop_shooting()
end
end
new_action = new_action or self:_check_action_equip(t, input)
new_action = new_action or self:_check_use_item(t, input)
new_action = new_action or self:_check_action_throw_projectile(t, input)
new_action = new_action or self:_check_action_interact(t, input)
self:_check_action_jump(t, input)
self:_check_action_run(t, input)
self:_check_action_ladder(t, input)
self:_check_action_zipline(t, input)
self:_check_action_cash_inspect(t, input)
if not new_action then
-- new_action = self:_check_action_deploy_bipod(t, input)
new_action = new_action or self:_check_action_deploy_underbarrel(t, input)
end
self:_check_action_change_equipment(t, input)
self:_check_action_duck(t, input)
self:_check_action_steelsight(t, input)
self:_check_action_night_vision(t, input)
self:_find_pickups(t)
-- _update_check_actions(self, t, dt, paused)
end