|
3 | 3 | function MP.UI.cam_timer_opponent() |
4 | 4 | if not MP.LOBBY.config.timer then return false end |
5 | 5 | if MP.GAME.pvp_countdown_in_progress then return false end |
| 6 | + if MP.GAME.timer <= 0 then return false end |
6 | 7 | if MP.is_pvp_boss() and MP.is_layer_active("pvp_timer") then |
7 | 8 | if G.STATE == G.STATES.ROUND_EVAL or G.STATE == G.STATES.NEW_ROUND then return false end |
8 | 9 | if MP.INSANE_INT.greater_than(MP.GAME.score, MP.GAME.enemy.score) then return true end |
@@ -194,7 +195,7 @@ SMODS.Gradient({ |
194 | 195 |
|
195 | 196 | -- When you "timering" opponent, timer stops and you cannot see is button pressed |
196 | 197 | -- So we need switch to real timer to make it flush |
197 | | - local time_value = (MP.GAME.timer_started and G.TIMERS.REAL or -(MP.GAME.timer or 0)) |
| 198 | + local time_value = MP.GAME.timer_started and G.TIMERS.REAL or -(MP.GAME.timer or 0) |
198 | 199 | local timer = (time_value / speedup) % self.cycle |
199 | 200 | local start_index = math.ceil(timer * #self.colours / self.cycle) |
200 | 201 | if start_index == 0 then start_index = 1 end |
@@ -225,7 +226,8 @@ SMODS.Gradient({ |
225 | 226 | if #self.colours < 2 or not MP.speedlatro_timer then return end |
226 | 227 | local speedup = MP.current_ruleset().timer_speedup_multiplier or 1 |
227 | 228 |
|
228 | | - local timer = MP.GAME.ready_blind and 0 or ((-(MP.speedlatro_timer.real or 0) / speedup) % self.cycle) + 0.5 |
| 229 | + local timer_value = MP.GAME.ready_blind and 0 or -(MP.speedlatro_timer.real or 0) |
| 230 | + local timer = (timer_value / speedup) % self.cycle |
229 | 231 | local start_index = math.ceil(timer * #self.colours / self.cycle) |
230 | 232 | if start_index == 0 then start_index = 1 end |
231 | 233 | local end_index = start_index == #self.colours and 1 or start_index + 1 |
@@ -363,17 +365,20 @@ function Game:update(dt) |
363 | 365 |
|
364 | 366 | if MP.GAME.timer == 0 then |
365 | 367 | MP.GAME.timer_consumed = true |
366 | | - if is_pvp_timer then |
367 | | - -- PvP timer: end PvP immediately as a loss |
368 | | - MP.ACTIONS.fail_pvp_timer() |
369 | | - else |
370 | | - -- Old, No-animations, Pressure timers: lose a live |
371 | | - if MP.GAME.timers_forgiven < MP.LOBBY.config.timer_forgiveness then |
372 | | - MP.GAME.timers_forgiven = MP.GAME.timers_forgiven + 1 |
373 | | - else |
374 | | - MP.ACTIONS.fail_timer() |
375 | | - end |
376 | | - end |
| 368 | + -- PvP timer: end PvP immediately as a loss (only when timered by opponent) |
| 369 | + if is_pvp_timer then |
| 370 | + if MP.GAME.nemesis_timer_started then |
| 371 | + MP.ACTIONS.fail_pvp_timer() |
| 372 | + end |
| 373 | + -- Old, No-animations: lose a live when timered by opponent |
| 374 | + -- Pressure timers: lose a live regardless |
| 375 | + elseif (is_pressure_timer or MP.GAME.nemesis_timer_started) then |
| 376 | + if MP.GAME.timers_forgiven < MP.LOBBY.config.timer_forgiveness then |
| 377 | + MP.GAME.timers_forgiven = MP.GAME.timers_forgiven + 1 |
| 378 | + else |
| 379 | + MP.ACTIONS.fail_timer() |
| 380 | + end |
| 381 | + end |
377 | 382 | end |
378 | 383 | end |
379 | 384 |
|
|
0 commit comments