https://gitlab.synchro.net/main/sbbs/-/commit/485414c789c5c98119c7c297
Modified Files:
src/doors/syncduke/syncduke_events.c
Log Message:
syncduke: fix misreported "cleared" events in the activity feed
The lobby feed showed "cleared E1L8 in 0:00" for a user map that was
never cleared. Three defects in syncduke_events_tick():
- The level-number-change fallback edge logged a "level" (cleared)
event when the player ABANDONED a level from the in-game menu (new
game / load / warp) -- with a garbage elapsed time, since ev_secs()'s
totalclock base is reset by newgame(). Real clears always pass
through the MODE_EOL edge, so the change edge now only re-captures
the level identity and logs nothing.
- The MODE_EOL edge named the WRONG map: every EOL setter (exit switch,
nuke button -- sector.c, player.c) advances or wraps ud.level_number
in the same tic it sets MODE_EOL, so reading it at the edge named the
NEXT level ("cleared E1L2" after finishing E1L1; a cleared user map
wrapped to "E1L1"). The level's display name is now captured at level
entry and the EOL edge logs the captured name.
- "start" re-fired on every death/respawn and level transition (in_game
bounces because gm loses MODE_GAME until the next enterlevel),
flooding events.jsonl; it now fires once per door session.
Also name user maps by their file's basename with the ".map" extension
stripped ("Roch") in level/death/frag events -- their level slot is
always 7, so "E1L8" was meaningless -- and JSON-escape the map string
now that it can come from a filename. No lobby.js change needed: the
feed treats "map" as a free string.
Co-Authored-By: Claude Fable 5 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net