Skip to content

Feat/fix bug oso and enemies lvl2#404

Merged
TheUnrealZaka merged 11 commits into
mainfrom
feat/fix-bug-oso-and-enemies-lvl2
Jun 12, 2026
Merged

Feat/fix bug oso and enemies lvl2#404
TheUnrealZaka merged 11 commits into
mainfrom
feat/fix-bug-oso-and-enemies-lvl2

Conversation

@bruno0135

Copy link
Copy Markdown
Contributor

Canvis

El enemigo wind up se le ha cambiado la hitbox ya que no concuerda con su forma.
Despues de que haga un ataque al player se marcha en dirección contraria ya que el enenmigo se quedaba enganchado con el player, ya no es inmortal tanto el raton y el yo yo. El yo yo ya hace daño cuando te atrapa pero si tardas menos de 3 segundos no te hace daño. Y el oso ya no se puede esconder en la piedra.

Issues relacionades

#393

Tipus de canvi

  • feat: Nova funcionalitat
  • fix: Correcció de bug
  • art: Asset gràfic
  • docs: Documentació
  • refactor: Refactorització de codi
  • build: Canvis al sistema de build

Checklist

  • El codi compila sense errors
  • He provat els canvis localment
  • He seguit les naming conventions (PascalCase classes, camelCase mètodes, m_ membres)
  • He usat Conventional Commits al títol del PR
  • He enllaçat la Issue corresponent

bruno0135 and others added 11 commits June 11, 2026 19:38
Add Player::IsBearModeActive() to consolidate bear-related state checks (isBearMode_, isBearTransforming_, isThrowingBear_, isKidSleeping_). Use this helper in HidingRock::Update and HidingRock::PostUpdate to block interaction and prompt rendering when the player is in bear mode or in related transition/animation states, preventing unintended hiding behavior.
Add AnimationSet::SetFinished API and expose it in the header. Improve EnemyStitchling and EnemyWindUpScurry behavior and robustness:

- EnemyStitchling: add REVERSING state, handle DEATH state/animation properly (play die, mark pendingToDelete), implement TakeDamage (remove physics bodies, play fx), avoid processing collisions when dead, process player attack collisions and trap sensor logic, reset die animation on death entry, and tweak drawing logic.
- EnemyWindUpScurry: increase health from 1 to 3, add an attack cooldown (attackCooldown_ + ATTACK_COOLDOWN) to prevent repeated damage/audio every physics frame, fix state transitions to use durations, adjust collision damage logic to respect cooldown, minor formatting and texture load/unload cleanups, and small refactors (playerRef assignment, spacing). But it still crashing all time dying
Stitchling: clean up formatting and refactor FSM/draw helpers; add escapeTimer and ESCAPE_TIME_LIMIT to the trap mechanic so trapped players take damage after a timeout, track mash escapes, reset timers on state enter, and ensure player slowdown is applied/removed correctly. Improve Draw/Update/Collision helpers and tidy texture unload spacing.

WindUpScurry: add BITE and BITE_RETREAT states (with placeholder animations/textures), introduce bite damage+retreat logic and timers, store retreat direction, and make chase->bite transitions when in range. Replace capsule collider with a rectangle, consolidate animation updates into a compact switch, avoid double-unloading aliased textures, simplify patrol/detection/chase logic, and add numerous clarifying comments and small logging tweaks. Overall changes add new combat interactions, fix resource/unload issues, and improve readability/maintainability.
@bruno0135 bruno0135 requested review from a team and TheUnrealZaka as code owners June 12, 2026 09:12
@bruno0135 bruno0135 linked an issue Jun 12, 2026 that may be closed by this pull request
@TheUnrealZaka TheUnrealZaka merged commit 04eaa7d into main Jun 12, 2026
3 checks passed
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.

feat: fix bug oso and enemies lvl2

2 participants