-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intro cinematic sync #2043
base: master
Are you sure you want to change the base?
Intro cinematic sync #2043
Conversation
2a763e1
to
e0fa4ba
Compare
Syncing the cinematic and basic team-up/skip UI is done. Notes on the state of this pr:
|
Instead of locking the lifepods, have them fall out of the sky during the intro cutscene :) |
e0fa4ba
to
83f688a
Compare
83f688a
to
ea9c026
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code wise seems fine and working but did notice a side effect:
- On every join you get a "press to continue" screen which is different from master branch. I don't know if this was intended and if we want it. I personally prefer not to have the screen.
NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Encountered an issue for the second player who joined.
Also my two local players didn't start the cinematic at the exact same time. Maybe it could be made so that the packet sent from the server tells them to start at a precise timing like Time.now + 3 seconds (but it would change the packet structure).
Another issue to me is the fact that a player can't just skip waiting for a partner and start the cinematic without other people (let's say a group of 3 people want to play, 2 players will see the cinematic but the other one will be stuck).
NitroxPatcher/Patches/Dynamic/EscapePod_StopIntroCinematic_Patch.cs
Outdated
Show resolved
Hide resolved
NitroxClient/Communication/Packets/Processors/SetIntroCinematicModeProcessor.cs
Outdated
Show resolved
Hide resolved
NitroxClient/GameLogic/InitialSync/PlayerInitialSyncProcessor.cs
Outdated
Show resolved
Hide resolved
NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs
Outdated
Show resolved
Hide resolved
NitroxServer/Communication/Packets/Processors/SetIntroCinematicModeProcessor.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine IG
b5a92f4
to
72bd72a
Compare
4036467
to
700ab91
Compare
NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs
Outdated
Show resolved
Hide resolved
NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs
Outdated
Show resolved
Hide resolved
9edf7e9
to
742d7a8
Compare
742d7a8
to
fe3391f
Compare
fe3391f
to
de229fa
Compare
92c9201
to
ecb9e4d
Compare
# Conflicts: # NitroxModel/MultiplayerSession/PlayerContext.cs # NitroxServer/GameLogic/PlayerManager.cs
b817ed1
to
013bd5b
Compare
# Conflicts: # NitroxClient/GameLogic/PlayerLogic/PlayerCinematics.cs # NitroxModel/MultiplayerSession/PlayerContext.cs # NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs
# Conflicts: # NitroxClient/GameLogic/PlayerLogic/PlayerCinematics.cs # NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs
Also skip intro by default for creative # Conflicts: # NitroxClient/GameLogic/PlayerLogic/PlayerCinematics.cs
# Conflicts: # Nitrox.Test/Client/Communication/DeferredPacketReceiverTest.cs
# Conflicts: # NitroxClient/GameLogic/PlayerManager.cs
…ed states on client
013bd5b
to
afc771c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests revealed it was good apart from the critical issue below
|
||
private static void EndRemoteCinematic() | ||
{ | ||
if (partner != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"partner" is not null even when the partner disconnects to fix that we can either:
- replace:
partner != null
byIsPartnerValid()
in the two methods
private static bool IsPartnerValid()
{
return partner != null && Resolve<PlayerManager>().Find(partner.PlayerId).HasValue;
}
- have the patch listen to
PlayerManager.OnRemove
, which might be a bit too much pain to find the right time to register and then to unregister the callback
https://cdn.discordapp.com/attachments/1038497385208365177/1120414323932680282/2023-06-19_20-03-44.mp4