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:
@@ -82,6 +82,10 @@ func _tick() -> void:
|
||||
for event: Dictionary in loop.match_flow.events:
|
||||
if event["type"] in ["phase", "match_started", "match_ended"]:
|
||||
_log("match", event)
|
||||
elif event["type"] == "placed":
|
||||
_log("eliminated", event)
|
||||
if event["type"] == "match_ended":
|
||||
_log("results", {"match": event["match"], "summary": loop.match_flow.summary()})
|
||||
if config.log_every > 0 and loop.ticks % config.log_every == 0:
|
||||
var stats: Dictionary = loop.timing_stats()
|
||||
_log("progress", {"tick": loop.ticks, "p95_us": stats["p95_us"], "max_us": stats["max_us"]})
|
||||
|
||||
Reference in New Issue
Block a user