• src/doors/syncduke/syncduke_events.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Jul 4 00:42:13 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/e3cfaa9eeed88c864982fa85
    Modified Files:
    src/doors/syncduke/syncduke_events.c
    Log Message:
    syncduke: log level completions reliably (detect the MODE_EOL edge)

    Clearing a level wasn't logged to events.jsonl, so it never showed in the
    lobby feed. The old detector watched for the level NUMBER changing while in_game, but finishing a level sets gm=MODE_EOL (the bonus screen), which
    makes ev_real_game() false -> in_game drops before the next level loads, and the whole clear->bonus->next transition read as a fresh "start". Detect the clear at the MODE_EOL edge instead -- the reliable "level finished" signal (same idea as SyncDOOM's GS_LEVEL->intermission edge) -- and log it with the real elapsed time (the few that used to slip through logged secs=0, timed at level entry).

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Jul 4 14:32:37 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/3c678a3299e53cb51aceecf2
    Modified Files:
    src/doors/syncduke/syncduke_events.c
    Log Message:
    syncduke: log the engine's real level time, not the door's wall clock

    The level-completion event timed levels with ev_secs() -- a door-side
    wall clock started at the door's level entry -- so loading a savegame
    mid-level over-reported the time (the door timer kept running from a
    level entry the reload didn't reset). Report the engine's own per-level
    play time instead: ps[myconnectindex].player_par / 26, the "Your Time"
    value from the bonus screen. It counts game tics and lives in the
    player struct, which saveplayer/loadplayer block-serialize, so it is
    written into savegames and resumes on load. Read it at the MODE_EOL
    edge, before the next level's resetplayerstats() zeroes it.

    SyncDOOM already reported leveltime/35 (its analogous engine counter),
    so this brings the two doors into agreement.

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Jul 5 03:53:27 2026
    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