-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
ReplayMod Compat #317
ReplayMod Compat #317
Conversation
Hello! |
} | ||
} catch (Exception e){ | ||
e.printStackTrace(); | ||
} |
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.
As far as I understand, the changes in this file are the ones to truly fix the problem. Specifically Line 68-75.
Would it be possible to put this into an mod install check, and still have it work in every scenario?
Like
if(Platform.isModInstalled("replay-mod-id") {
...
}
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.
No. the way Replay mod works is by rolling back the packets send to the client by the server.
Checking if Replay Mod is installed on the server is kinda pointless, it would only fix the issue in singleplayer.
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.
Okay.
What I am worried about is: network delay ping pong causing the attacking player's attack animation to played twice, with ping pong delay, resulting in visual glitch.
I understand that this packet sending cannot be conditional.
Can we make the client side interpretation of this packet conditional (based on ReplayMod installed)?
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.
we could, but i see no real purpose.
I changed the logic from the server refuses to send the client the packet about the animations
to the client ignoring the packet that regard themselfs so the animation is not played twice
line 19-21 in ClientNetwork
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.
That seems like a good change, is the compatibility still satisfied with this code?
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.
it is, sorry for the late response, i didnt change anyhting, that was in the PR from the start
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.
i should also mention #323 does pretty much exactly the same thing, this PR just has a comment and surrounds the netcode with a try/catch block since BC does that aswell in the loop
Thank you for the contribution! |
Changed Logic so Animation Paket is also send to the client it originated from. Clients now disregard Pakets about themselfs. This makes replaymod compatible since it simply records all Pakets the Client recieved.