Commit Graph
769 Commits
Author SHA1 Message Date
miniduikboot 99cf2243bd Add new option to full config example
Some people were confused by config-full.json, thinking that this file
should be edited too. This is not the case and the values in this file
don't apply as it was only meant as an example, so rename the file to
make that more clear.
2024-07-09 22:50:02 +02:00
miniduikboot 80c1d53337 Add compatibility option to allow host authority
There are various bugs in the current implementation of host-authoritive
multiplayer such that I can't recommend players to use it. Fixing these
issues on the server side is impossible, and I can't smell remotely if
clients have applied the necessary fixes. The currently known bugs
include at least:

- Unable to join more than 8 players in a room
- Unable for new players to join if host switched from host authoritive
  to server authoritive
- Host is unable to kill if it is in a host authoritive game while it
  thinks it is in server authoritive mode

If Innersloth fixes this mode in future game patches, this option may be
reconsidered.
2024-07-09 22:46:04 +02:00
miniduikboot 276f634074 Bump to released Dumpostor version 2024-07-09 21:13:30 +02:00
miniduikboot 609c30ffb4 Refactor SetColor/Name anticheat
Turns out they were broken when I disabled them as I wasn't tracking
playerinfo's properly, but this is now fixed, so the checks can be
re-enabled.

One issue with the ColorLimits checks is that it didn't account for mods
that add extra colors, this is fixed by checking if the route followed
is plausible instead of mimicking client logic and only accepting a
single answer that it expected. A false negative is possible where the
host decides to wrap back to the front but there are still custom colors
available at the end of the list. This is acceptable because Impostor
doesn't currently know the amount of colors available and this issue
isn't major enough to ask all mod authors to declare their custom color
amount to the server.

As extra colors should now be handled by this code, it makes sense to
change the category of the unknown colors check to ProtocolExtensions.
For these mods an exemption of the ColorLimits category is no longer
necessary.

Note that mods that allow duplicate colors that do not use a custom rpc
to set colors can only be supported by disabling the ColorLimits
category, this was already the case and I don't think it can be unified
with the existing check.
2024-07-07 23:44:35 +02:00
miniduikboot 5afb2ca810 Enumize RulesPresets and SpecialGameModes 2024-07-04 23:09:15 +02:00
miniduikboot 79a9f7d5dc Improve debug rpc log to log for all types 2024-07-03 23:05:46 +02:00
miniduikboot 97ed6cb83c Mark players as dead when they get a ghost role
Oversight
2024-07-03 23:04:21 +02:00
miniduikboot b3865a27e5 Let hosts handle exiles
Previously Impostor liked to kill exiled players server side to raise an
event, however as PlayerInfo is now networked, it also killed players
client side. This caused meetings to immediately conclude if the final
impostor was voted out, ruining the cutscene.

So wait for hosts to actually kill the player
2024-07-03 23:01:51 +02:00
miniduikboot d7744a2ec6 Stop hardcoding Spawn Ids 2024-07-03 21:32:11 +02:00
miniduikboot 6d1d1f4ad6 Remove too verbose log statements 2024-07-03 21:31:58 +02:00
miniduikboot a123690cdd Fix MessageWriter disposal 2024-07-03 07:10:42 +02:00
miniduikboot 8f6da3dc87 Add Message24EndGameHostMigration serialization
Looks like Innersloth added this but hasn't actually used this. Weird..

When sent it makes the new host perform a full rejoin, which gums up
Impostor's spawning logic. Fixing that causes the client to gum itself
up. Sigh.

After some testing it seems like host migration still works fine, so
this investigation wasn't needed. Comitting for posterity.
2024-06-30 23:33:29 +02:00
miniduikboot 91bc4d33fa Add extra log statements
I've been carrying these in a stash for a while. They only show up when
the Debug verbosity is shown, which is intended to prevent spamming
production logs
2024-06-30 23:29:01 +02:00
miniduikboot 7e8fc850ff Change GameDataTag to an enum
Not being an enum would be inconsistent with RpcCalls
2024-06-30 20:15:09 +02:00
miniduikboot 6fa8c965cf Refactor object (de)spawn/data fns on new base
This reduces the amount of boilerplate writer management needed
2024-06-30 14:28:46 +02:00
miniduikboot 7d8974b622 Refactor Start/FinishRpc to add GameData methods
Rpc's are a specific sort of GameData packets, so it makes sense to
split and extract a method for sending GameData packets from these functions.
2024-06-30 14:21:54 +02:00
miniduikboot 988e3f71f0 Merge pull request #601 from NikoCat233/Add-phantom-rpc-support
Add Phantom Rpcs support
2024-06-27 00:52:21 +02:00
miniduikboot 76c2e3df1f Clean up PR
- Added {} in switch/case to open a scope per item
- Reworded comments to be more in line with the other comments in this
file
2024-06-25 22:44:29 +02:00
Niko233 4f5cf7837c Make my pr's page looks nice 2024-06-24 18:07:58 +08:00
Niko233 eeab337c75 Add handler for phantom rpcs 2024-06-24 18:00:09 +08:00
Niko233 2860ef6d6f Add Phantom Rpcs support 2024-06-24 16:54:33 +08:00
miniduikboot fd94b0f732 Reset PlayerInfo on lobby return
Players get a fresh player control, so this is the perfect moment to
discharge them from their former duties
2024-06-23 00:34:56 +02:00
miniduikboot 94f30ef87d fixup! Spawn PlayerInfo's if host is not authoritive 2024-06-22 13:07:54 +02:00
miniduikboot 5cac18723d Handle SetRole properly 2024-06-22 12:53:02 +02:00
miniduikboot 19f4821c2a Sync over tasks 2024-06-21 23:05:07 +02:00
miniduikboot c48c6b3bde Sync dirty objects 2024-06-21 21:17:17 +02:00
miniduikboot cceecb0c36 Clean up owned playerinfo's when disconnecting 2024-06-20 22:26:16 +02:00
miniduikboot 01eb7bb375 Sync all server owned objects 2024-06-20 21:12:15 +02:00
miniduikboot 913b86df19 Fix compile warnings 2024-06-20 19:28:33 +02:00
miniduikboot 043549702f Set PlayerId correctly 2024-06-20 19:14:49 +02:00
miniduikboot a072d5234a Add NetId to SetName and SetColor 2024-06-20 18:37:10 +02:00
miniduikboot 264ed110a5 small cleanups 2024-06-20 18:15:24 +02:00
miniduikboot ae50126729 Spawn PlayerInfo's if host is not authoritive 2024-06-20 18:14:02 +02:00
miniduikbootandNiko233 19046daf24 Fix InnerPlayerInfo serialization
Co-Authored-By: Niko233 <139348239+NikoCat233@users.noreply.github.com>
2024-06-20 18:03:46 +02:00
miniduikboot beaf77fdbb Don't DC the client if they send an unknown flag 2024-06-19 22:45:47 +02:00
miniduikboot 0343235f0d Demote InnerGameData, promote InnerPlayerInfo
Creating a game is now possible for players that request client authority
2024-06-19 20:42:18 +02:00
miniduikboot 3856aeed03 Add sequence id's to playeroutfit 2024-06-19 20:33:53 +02:00
miniduikboot 96dbd88ef7 Implement GameOptions V8 2024-06-18 19:45:17 +02:00
miniduikboot 753f17586a Rerun Dumpostor
Will rerun later as this is a dev build. Even Dumpostor broke because of
this patch.
2024-06-18 18:07:02 +02:00
miniduikboot 520e9080f4 Prepare for 2024.6.18 update
Major changes are incoming, this doesn't yet work.
2024-06-18 17:30:44 +02:00
miniduikboot a61524842f Improve CompatMgr behaviour for unknown versions
Currently, Impostor will show an "Client is in an invalid state."
message if a player tries to join a match where the host or the joining
player is using a version unknown to Impostor.

This message confused a *lot* of people, so this PR changes the API such
that if the version is not registered, the version itself is put in a
compatibility group and compared, assuming no other game versions are
compatible with it. This works fine in most cases, as Among Us network
versions generally increase over time.

Failure on 2222.2.2 (which is ancient at this point, so likely no longer
used) and future cases where Innersloth messes up (which is unlikely) is
an acceptable consequence to me.
2024-06-14 21:49:12 +02:00
miniduikboot 468a71d01e Merge pull request #597 from Impostor/feature/2024.6.4
Add 2024.6.4 game version
v1.9.3
2024-06-05 19:43:03 +02:00
miniduikboot 6f05946689 Bump Impostor version 2024-06-05 19:16:59 +02:00
miniduikboot b2a9bab125 Add 2024.6.4 game version
Officials allow crossplay and after inspecting the Mono I don't see any
major changes, so I'm following officials here
2024-06-04 20:42:18 +02:00
miniduikboot 9f55fe205d Prepare release 1.9.2 v1.9.2 2024-06-01 16:12:10 +02:00
miniduikboot 734643c8c9 Merge pull request #596 from miniduikboot/fix/cleanup-disposed-clients
Clean up clients that refuse to quit properly
2024-05-30 21:47:31 +02:00
miniduikboot 661421da5a Clean up clients that refuse to quit properly
When a player is kicked or banned from a game, the client is expected to
disconnect in response. When they decide not to *or* the disconnect
packet is lost, Impostor just silently disposes of the connection.
This does not remove them from ClientManager, which is how I tracked
this bug down.

By sending them a proper disconnect message, clients should have
received *a* disconnection message before dropping their connection.

Future work should split this entire method in removing players from a
game and processing kick/bans because the latter feature is not relevant
for other callers of this method.
2024-05-26 22:05:21 +02:00
miniduikboot ff2e80d939 Merge pull request #594 from miniduikboot/feature/refine-modular-ac
Change some anticheat checks categories
2024-05-11 13:54:49 +02:00
miniduikboot ddd701320d Add similar AC check to HandleSetName 2024-04-28 20:55:50 +02:00
miniduikboot be39c9facf Move Name checks to NameLimits 2024-04-28 20:55:50 +02:00