atrooney-online-2/include
Crystalwarrior 2f84055af9
[2.8.6] Demo Recording/Playback (#337)
* 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>
2021-01-13 22:25:24 +01:00
..
aoapplication.h [2.8.6] Demo Recording/Playback (#337) 2021-01-13 22:25:24 +01:00
aoblipplayer.h Lots of blip rate fixes: 2020-09-11 23:38:36 +03:00
aobutton.h Perform clang-format 2020-05-22 17:13:37 -05:00
aocaseannouncerdialog.h Perform clang-format 2020-05-22 17:13:37 -05:00
aocharbutton.h Perform clang-format 2020-05-22 17:13:37 -05:00
aocharmovie.h Perform clang-format 2020-05-22 17:13:37 -05:00
aoemotebutton.h Add darker button generator (#201) 2020-07-30 12:10:58 -05:00
aoevidencebutton.h Perform clang-format 2020-05-22 17:13:37 -05:00
aoevidencedisplay.h Perform clang-format 2020-05-22 17:13:37 -05:00
aoimage.h Perform clang-format 2020-05-22 17:13:37 -05:00
aolineedit.h Perform clang-format 2020-05-22 17:13:37 -05:00
aomovie.h Perform clang-format 2020-05-22 17:13:37 -05:00
aomusicplayer.h Reset BASS when switching devices; drop Qt Multimedia support (#262) 2020-08-19 16:40:37 -05:00
aooptionsdialog.h Desynchronize viewport from the IC chat log so that users have a smooth viewing experience as an option (#385) 2021-01-12 11:24:11 +03:00
aopacket.h [2.8.6] Demo Recording/Playback (#337) 2021-01-13 22:25:24 +01:00
aoscene.h Perform clang-format 2020-05-22 17:13:37 -05:00
aosfxplayer.h Enable support for up to 6 SFX channels (#355) 2020-12-28 00:54:08 -06:00
aotextarea.h Perform clang-format 2020-05-22 17:13:37 -05:00
aotextedit.h Perform clang-format 2020-05-22 17:13:37 -05:00
bass.h Perform clang-format 2020-05-22 17:13:37 -05:00
bassopus.h clang 2 electric boogaloo 2020-05-22 02:14:54 +03:00
chatlogpiece.h IC log rewrite (#259) 2020-08-19 11:16:41 -05:00
courtroom.h Desynchronize viewport from the IC chat log so that users have a smooth viewing experience as an option (#385) 2021-01-12 11:24:11 +03:00
datatypes.h Rename noninterrupting_preanim and all its associated bullshit with more cooler and nicer bro immediate 2021-01-09 18:43:24 +03:00
debug_functions.h Perform clang-format 2020-05-22 17:13:37 -05:00
demoserver.h [2.8.6] Demo Recording/Playback (#337) 2021-01-13 22:25:24 +01:00
discord_register.h Perform clang-format 2020-05-22 17:13:37 -05:00
discord_rich_presence.h Merge KFO source unconditionally into AO2 2020-05-22 19:17:55 -05:00
discord_rpc.h Perform clang-format 2020-05-22 17:13:37 -05:00
discord-rpc.h Perform clang-format 2020-05-22 17:13:37 -05:00
file_functions.h Perform clang-format 2020-05-22 17:13:37 -05:00
hardware_functions.h moved headers into include and cpp files into src + logo into resource 2018-12-26 16:43:08 +01:00
lobby.h fix doubleclick server being buggy 2020-10-04 01:41:23 -05:00
misc_functions.h Perform clang-format 2020-05-22 17:13:37 -05:00
networkmanager.h Perform clang-format 2020-05-22 17:13:37 -05:00
scrolltext.h clang 2 electric boogaloo 2020-05-22 02:14:54 +03:00
text_file_functions.h Perform clang-format 2020-05-22 17:13:37 -05:00