M3: Eliminations, spectating and results

The simulation now names what ended each player: weapon, fall, drown or tide, from
the cause of the blow that took the last health. Hits carry the weapon's item code.

Match keeps a kill feed (eliminator, cause, weapon, tick), per-player stats (damage
dealt and taken between opponents, eliminations, never teammates), and a summary()
with place, eliminations, damage and survival time. Players who fall on the same
tick share the better place and are marked tied. When the last players fall
together, the tie-break raises one team to first and the rest share the next place.

Eliminated players spectate: first whoever knocked them out, then a living
teammate, then the next living player in join order. When a target falls or
leaves, the view follows its eliminator or moves on, on the same step. Spectators
can cycle forwards and back. In results everyone watches the winner.

The headless server logs every placement and the match summary.

Closes #26

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 23:13:15 -05:00
co-authored by Claude Opus 5.5
parent 802674687c
commit 6e1c87fe32
9 changed files with 542 additions and 26 deletions
+4 -1
View File
@@ -189,7 +189,10 @@ static func _land(player: SimEntity, impact_speed: float) -> void:
var drop: float = impact_speed * impact_speed / (2.0 * Tuning.GRAVITY)
var excess: float = drop - Tuning.FALL_DAMAGE_SAFE_METRES
if excess > 0.0:
player.health = maxi(player.health - roundi(excess * Tuning.FALL_DAMAGE_PER_METRE), 0)
var amount: int = roundi(excess * Tuning.FALL_DAMAGE_PER_METRE)
if amount > 0:
player.health = maxi(player.health - amount, 0)
player.last_cause = SimEntity.CAUSE_FALL
static func _enter_water(player: SimEntity) -> void: