1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: maybe fix vertical obsticle checks

+10 -9
+6 -5
physics_engine.vhd
··· 301 301 c_top := py - SIZE11; 302 302 c_bot := py + SIZE11; 303 303 304 - -- Swept overlap: edge-crossing checks (prev and new extents straddle the face) 304 + -- Swept overlap 305 305 if vx(9) = '0' then 306 - x_overlap := (c_right >= OBS_L(obs_i)) and (c_prev_right <= OBS_L(obs_i)); 306 + x_overlap := (c_right >= OBS_L(obs_i)) and (c_prev_left <= OBS_R(obs_i)); 307 307 else 308 - x_overlap := (c_left <= OBS_R(obs_i)) and (c_prev_left >= OBS_R(obs_i)); 308 + x_overlap := (c_prev_right >= OBS_L(obs_i)) and (c_left <= OBS_R(obs_i)); 309 309 end if; 310 310 311 + -- Strict y: exclude characters at/below bottom face (down) or at/above top face (up) 311 312 if vy(9) = '0' then 312 - y_overlap := (c_bot >= OBS_T(obs_i)) and (c_prev_bot <= OBS_T(obs_i)); 313 + y_overlap := (c_bot >= OBS_T(obs_i)) and (c_prev_top < OBS_B(obs_i)); 313 314 else 314 - y_overlap := (c_top <= OBS_B(obs_i)) and (c_prev_top >= OBS_B(obs_i)); 315 + y_overlap := (c_prev_bot > OBS_T(obs_i)) and (c_top <= OBS_B(obs_i)); 315 316 end if; 316 317 317 318 if x_overlap and y_overlap then
+4 -4
visualizer.py
··· 249 249 c_top = py - SIZE; c_bot = py + SIZE 250 250 251 251 if to_signed(vx) >= 0: 252 - x_overlap = c_right >= ol and prev_right <= ol 252 + x_overlap = c_right >= ol and prev_left <= orr 253 253 else: 254 - x_overlap = c_left <= orr and prev_left >= orr 254 + x_overlap = prev_right >= ol and c_left <= orr 255 255 if to_signed(vy) >= 0: 256 - y_overlap = c_bot >= ot and prev_bot <= ot 256 + y_overlap = c_bot >= ot and prev_top < ob 257 257 else: 258 - y_overlap = c_top <= ob and prev_top >= ob 258 + y_overlap = prev_bot > ot and c_top <= ob 259 259 260 260 if x_overlap and y_overlap: 261 261 if prev_bot <= ot: