aboutsummaryrefslogtreecommitdiff
path: root/src/demoserver.cpp
AgeCommit message (Collapse)Author
2022-03-19Fix demoserver max_wait skips happening even when they're not supposed to (#680)Crystalwarrior
* Fix demoserver max_wait logic being absolutely bonkers, causing random skips that make no sense actually comment this piece of code * Add /debug command to demos which allows you to see the remaining time for each packet, allowing you to visualize wait packets. Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-30Add and refine debug log messages (#625)oldmud0
Since these are going to be visible to the user now, at least let's properly format them and make them somewhat helpful.
2021-12-11Update slots/signals to Qt5 connection style and eliminate some clazy warningsSalanto
2021-04-23Move other duplicate reset calls to their own methodoldmud0
2021-04-23Merge branch 'master' into crystalwarrior/demo-reloadCrystalwarrior
2021-04-23Automatically fix desynced demo files with issues pre-#496 PR (#532)Crystalwarrior
* Implement a demo auto-fixing solution. If the client detects a pre-2.9.1 demo file, it will prompt the user if they wish to correct it, since otherwise the demo will be desynched from reality. The aforementioned issue was fixed in https://github.com/AttorneyOnline/AO2-Client/pull/496 however 2.9.0 still has incorrect demo recording. Fix potential memory leak by not flushing and closing the demo file after opening it for reading. * backup broken demo file before fixing it * comments ahoy Co-authored-by: in1tiate <radwoodward@vikings.grayson.edu>
2021-04-22move timer reset to its own methodin1tiate
2021-04-21Fix last line in the .demo file not being processedCrystalwarrior
Fix timings for OOC being really busted if max_wait is -1 (dunno at which point this bug was introduced)
2021-04-20Reset timers, evidence list and background whenever /load or /reload is usedCrystalwarrior
2021-04-19Add a /reload command that quickly reloads the current demoCrystalwarrior
2021-03-30Update src/demoserver.cppin1tiate
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-03-30add translation support to demo server messagesin1tiate
2021-03-28fix packets containing unencoded newlines being incorrectly split into ↵in1tiate
multiple entries
2021-03-20Add timer packets to demo playback (#494)Crystalwarrior
When the demo skips by some number of seconds, the timer will also skip forward by that duration. Co-authored-by: in1tiate <32779090+in1tiate@users.noreply.github.com> Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-03-20Deprecate demo playback /min_wait (#498)Crystalwarrior
2021-03-20Fix demo playback not using UTF-8 codec, making it impossible to use for ↵Crystalwarrior
Russian chars and other special chars like emoji etc. (cherry picked from commit f3e96ca6b38a5e069d98f2db4b17dfb7bb3f239b)
2021-01-18forgot to return after destroying the connection (#412)stonedDiscord
Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
2021-01-13[2.8.6] Demo Recording/Playback (#337)Crystalwarrior
* initial commit with horrible code dupcliation haha lol Set up elapsedtimer to generate wait# stuff between packets recorded * implement groundwork for internal demo server * add core playback functionality * make it work kinda by including SC packet in demo * Add a file dialog for loading a demo file instead of a hardcoded path * Change /play to > in OOC to begin playback or skip to next element Pop up file dialog box *before* establishing the connection, not after. TODO: * Fix having to load the same file *twice* to be able to connect to the demo server for some reason * Fix the segfault caused by calling the playback() function when there's no remaining data, it's almost like demo_data.isEmpty() is ignored for whatever reason??? * Clear demo data when loading a demo file to prevent stacking demos * Properly disconnect the client when sending the request for file browser fails to obtain a good demo file * Fix append_to_file newlining even if file didn't exist prior to calling this function * Add a very scuffed exception to not log or demo record anything that happens in the Demo playback local server * Reduce invalid file spam by checking for non-logging server better Use file_exists() to be more consistent in append_to_file * Fix the client crashing when receiving loading packets etc. at runtime such as SC, SM, CI etc. (TODO: parity???) Remove useless debug stuff * Preserve newlines for demo packets such as "CT", "MS" etc. * Implement /max_wait, /min_wait for adjusting the maximum and minimum wait in milliseconds between wait packets Add /pause or | shorthand to pause playback Re-add /play and keep > as a shorthand Remove clientside restrictions from sending empty OOC messages and sending OOC messages without a name - these should be serverside. * Empty music list Default the character to Spectator char no matter the selection in CSS * Allow -1 character ID or character ID that does not fit into the local Character Select Screen list to still be parsed corectly, using the character folder in the MS packet as reference. Allow servers with no selectable characters to still be properly loaded Bypass the Character Select Screen when joining a server with no character select screen and automatically become a spectator * Properly handle demo files without SC packet to dictate which chars exist Add a /load command letting you load a demo file without rejoining the demo server (the CS packet will not be properly handled but I cannot think of a single tangible problem this causes lol) Make sure all DEMO CT messages are colored properly * Fix logs bleeding into each other if you disabled logging or you joined a demo server after leaving another * Prevent logging even if log_filename is defined because a user might disable auto logging when running the game * Fix custom shownames not appearing in the IC logs * Set up new logic for max_wait, meaning that dead air being skipped is prioritized with MS (IC chat) packets being used as the anchor. * Better logic for min_wait to only affect important packets (IC Chat) * Fix encoding not being performed on packets that are saved to the .demo file, resulting in characters having something like "#1" in their message breaking that specific message * Fix a weird setup in courtroom.cpp that happened out of the merge and bugged the code Fix aopacket being busted up as well * add missing feature flags to the demoserver * use random port * move writing to the demo file to a function * only listen on localhost Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com> * remove copypasta * add a help to the demo server * fix empty demo disconnecting the server * tell the user how to begin Co-authored-by: scatterflower <marisaposs@gameboyprinter.moe> Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> Co-authored-by: stonedDiscord <stoned@derpymail.org> Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>