Skip to content

Boost timer inverse#7

Open
abhimasand wants to merge 1 commit intoRolv-Arild:masterfrom
abhimasand:master
Open

Boost timer inverse#7
abhimasand wants to merge 1 commit intoRolv-Arild:masterfrom
abhimasand:master

Conversation

@abhimasand
Copy link
Copy Markdown

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

Inverting boost timer since value of state.boost_pads is 1 when boost is present and 0 when boost is picked up
@abhimasand
Copy link
Copy Markdown
Author

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant