Necto icon indicating copy to clipboard operation
Necto copied to clipboard

Boost timer inverse

Open abhimasand opened this issue 4 years ago • 1 comments

Inverting boost timer since value of state.boost_pads is 1 when boost is present and 0 when boost is picked up

abhimasand avatar Feb 27 '22 18:02 abhimasand

Reference code and logs used for debugging boost_timer_error.txt boost_timer_fixed_log.txt print (boost_pads, self.boost_timers,"boost timer debug 0") new_boost_grabs = (boost_pads == 1) & (self.boost_timers == 0) # New boost grabs since last frame print (new_boost_grabs, self.boost_timers[new_boost_grabs],"boost timer debug 1") self.boost_timers[new_boost_grabs] = 0.4 + 0.6 * (self._boost_locations[new_boost_grabs, 2] > 72) print (new_boost_grabs, self.boost_timers[new_boost_grabs],"boost timer debug 2") self.boost_timers *= boost_pads # Make sure we have zeros right qkv[0, n:n+len(self.boost_timers)] = self.boost_timers print (self.boost_timers, qkv[0, n:n+len(self.boost_timers)],"boost timer debug 3") self.boost_timers -= self.tick_skip / 1200 # Pre-normalized, 120 fps for 10 seconds self.boost_timers[self.boost_timers < 0] = 0 print (self.boost_timers,"boost timer debug 4")

abhimasand avatar Feb 27 '22 18:02 abhimasand