EverestAPI / CelesteTAS-EverestInterop

Everest interop for DevilSquirrel's CelesteTAS
https://github.com/EuniverseCat/CelesteTAS
MIT License
67 stars 28 forks source link

Optimize puffer hitbox render #35

Closed LozenChen closed 1 year ago

LozenChen commented 1 year ago

(1).Add a more accurate hitbox indicator on puffer's PlayerCollider where player can launch/bounce (2).Make the height check line more accurate

About (1): puffer's Explode() is also called in OnPlayer(..), and the condition is player.Bottom > lastSpeedPosition.Y + 3f different from that in puffer's ProximityExplodeCheck(). https://discord.com/channels/403698615446536203/519281383164739594/1108956272734240820

About (2): puffer's Position.Y is not integer, so the previous "when ducking, bottomCenter -= Vector2.UnitY * 3" (which should be 2.5 instead of 3) has bug (I've found such example). Moreover, starflyHit/Hurtbox are not considered in previous implementation.

This PR addresses above issues.

LozenChen commented 1 year ago

I didn't realize that ActualEntityCollideHitbox only works for Hitbox/Circle/ColliderList.Render(...), so it's meaningless to render the launch/bounce height indicator in PlayerCollider's render. Instead we can just move OptimizePufferPlayerCollider(...) into DrawPufferHitbox(...)