feat(collision): primer impacte fereix, segon mata; mort diferida via timer (Fase 3)
- Defaults::Physics::Debris::ENEMY_VELOCITY_INHERITANCE (placeholder 1.0). - Enemy::herir(shooter_id) emmagatzema last_hit_by_ per a atribució posterior. - collision_system: helper anònim explodeNow(ctx, enemy, shooter_id) que llegeix velocity/dades ABANS de destruir() (corregeix bug latent: el codi anterior llegia getVelocityVector() després de destruir, que zera velocity → l'explosió mai heretava inèrcia). - detectBulletEnemy: primer impacte aplica impulse + herir(); segon impacte sobre enemy ferit dispara explodeNow immediata. - processWoundedDeaths: explota enemics amb wound timer expirat aquest frame. - detectAll: processWoundedDeaths abans de detectBulletEnemy (les expiracions maten primer; les bales del mateix frame ja no toquen el cos destruït). Puntos s'atribueixen a la mort real, no a l'impacte inicial. Build neta i smoke test xvfb OK. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,10 @@ namespace Defaults::Physics {
|
||||
// Velocity heredada de la nau a l'explosió (80% del feel original).
|
||||
constexpr float SHIP_VELOCITY_INHERITANCE = 0.8F;
|
||||
|
||||
// Velocity heredada de l'enemic a l'explosió (palanca per a tuneo).
|
||||
// 1.0 = inèrcia completa; >1.0 amplifica la deriva; <1.0 la atenua.
|
||||
constexpr float ENEMY_VELOCITY_INHERITANCE = 1.0F;
|
||||
|
||||
// Angular velocity sin for trajectory inheritance
|
||||
// Excess above this threshold is converted to tangential linear velocity
|
||||
// Prevents "vortex trap" problem with high-rotation enemies
|
||||
|
||||
Reference in New Issue
Block a user