Commit Graph

10 Commits

Author SHA1 Message Date
TrickyLeifa
c9f52b7223 Ported to CMake, ...
* Ported the project to CMake
  * Android and Mac support dropped for the time
being.
  * Tests, BASS and Discord-RPC are now options
* Restructured and reformated the project.
  * Merged `include` and `src`
  * Renamed `resource` to `data`
  * Renamed various files
  * External libraries headers are no longer included in `src`
  * Replaced header guards with #pragma once
  * Multiple refactors (keywords, headers)
  * Added Qt6 compatibility
* Removed various unused functions and headers
* Reworked AOPacket
  * When content is passed to AOPacket, it should be ensured that the content is already decoded.
  * Encoding/decoding are now static methods.
* Fixed various memory leaks
* Removed animation code for AOImage
  * AOImage is always using static images
* Simplified ChatLogPiece
2024-05-15 00:04:16 +02:00
Crystalwarrior
7b88d4be95
Never send an unencoded packet to the server (#719)
* never send an unencoded packet to the server

* oops

* Improve packet validation to remove segfaults

* WARNING: commit breaks connecting to servers, need help
start fixing omniwhy caused by single fuckin string packets (AAAAAAAAAAAAAAAAA)

* Fix failed connections to servers (Thanks to @Iuvee for helping me figure this out!)

* Fix demoserver

* who the fuck still uses goto

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* ANOTHER GOTO????

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* braces

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* good bot Update src/packet_distribution.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix demoserver harder

* Improve demo logging

* Fix memory leakage by deleting the packet
Fix useless demoserver wait packet creation when none of that packet is used

Co-authored-by: stonedDiscord <Tukz@gmx.de>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Salanto <62221668+Salanto@users.noreply.github.com>
2022-07-30 18:42:22 +02:00
Skye Deving
5d9309b1b3
Handle packet decoding separately for SC packet (#433)
Should fix special (escaped) characters not being parsed correctly in character list.
2021-01-24 18:26:39 -06:00
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
Skye Deving
4d02cc8d68
Use QList::mid when constructing QStringList (#365)
The constructor with two iterators is too cutting edge from 5.14 to be
widely supported right now
2021-01-04 12:51:27 -06:00
Skye Deving
aabb256207 Refactor AOPacket 2021-01-04 06:38:31 -06:00
scatterflower
3f999455a9 remove remaining traces of fantacrypt 2020-08-21 15:36:31 -05:00
scatterflower
c0316ded85 remove fantacrypt 2020-08-21 15:30:54 -05:00
oldmud0
13942345c6 Run clang-format on entire project
Indentation fixed to 2 spaces per tab. Braces set to Stroustrup style.
Lines reflow at 80 characters. One-line method bodies are on the same
line as the signature. Space always after `//`. No indentation
on preprocessor macros. Includes are sorted lexicographically.

If you don't want to see this commit on blames, use the hidden
whitespace option on GitHub, or use `-w` in git-blame.
2020-04-17 21:57:16 -05:00
David Skoland
00cfd2750d moved headers into include and cpp files into src + logo into resource 2018-12-26 16:43:08 +01:00