Conversation
|
Wdym by "somewhat" here
|
I changed the way I implemented a few things, and my formatting. The footnote for the video also describes a change from the original code, which was the height the player sits at in the boat. It was given an offset of -0.4 instead of -0.5. This change was to stop the player from colliding with the block underneath the boat. If you look at the video the player model is slightly darkened while on land, this is the reason that value was changed. When I say I changed the way I implemented things I mostly mean how I set the initial height for the boat. Instead of setting it in the boat constructor I set it in the _init() function. There are probably differences in formatting, I didn't just copy and paste the old code in since I wanted to redo it. But the outcome should be the same. |
…ain compile error Merges 19 commits from smartcmd/MinecraftConsoles (upstream/main) into the dedicated-server branch and resolves the resulting networking conflicts while preserving all dedicated-server-specific behaviour. --- Upstream commits included in this merge: - Port over RCE Patches from LCEMP (smartcmd#1023) Hardened packet parsing across ByteArrayInputStream/OutputStream, Tag, Socket, Connection, and a dozen packet types; bounds-checked reads, length limits, and safe decompression paths to close known RCE vectors. - Revert accidentally pushed "LCEMP RCE fixes" / LCEMP RCE fixes Intermediate clean-up of the above work. - Reject duplicate UIDs on login and remove noisy gdraw debug log (smartcmd#1013) Incoming players whose UID is already active are now disconnected instead of force-kicking the existing player. Removes a per-frame debug printf left in gdraw_SetViewSizeAndWorldScale. - Always show version overlay, add more info Version string is now always visible at runtime. - Fix split-screen UI wrong positioning on window resize (smartcmd#989) - Reimplement boat gravity again (smartcmd#988) - Use correctly sized icons on 720p (smartcmd#883) - Revert workaround for loading HD textures (smartcmd#999) - Fix crash when launching at 720p or lower resolutions (smartcmd#981) - Modernize project codebase (smartcmd#906): NULL → nullptr, C-style cast → C++ cast, shared_ptr(new …) → make_shared, misc type fixes. - Split screen, widescreen support, font rendering and UI scaling fixes (smartcmd#767) - Flame not working with one-shot arrow (smartcmd#856) - Fix focus sound playing repeatedly on mouse hover (smartcmd#890) - Fix stale held item appearing when switching worlds (smartcmd#910) - Fix F3 debug crash when throwing ender pearl long distance (smartcmd#934) - Allow closing some menus with inventory/crafting keys (smartcmd#868) - Fix second-person nametag pitch (smartcmd#963) --- Conflict resolutions (4 files): Minecraft.Client/Common/Network/GameNetworkManager.cpp Conflict 1 — variable declarations in StartNetworkGame: Kept HEAD. The dedicated-server branch declares `dedicatedNoLocalHostPlayer` here and reads it from NetworkGameInitData. Upstream had dropped that variable while modernising the NULL → nullptr style; keeping it is required for the dedicated-server startup path. Conflict 2 — primary-player connection block: Kept HEAD. When `dedicatedNoLocalHostPlayer` is true the branch intentionally skips creating a local-host ClientConnection and goes straight to setting the game mode. Upstream's refactor created a ClientConnection with a null socket even for the dedicated path and ran the full tick loop; that approach is incompatible with headless operation. Minecraft.Client/PendingConnection.cpp Kept HEAD. The branch wraps the duplicate-XUID rejection path with a #if MINECRAFT_SERVER_BUILD guard that calls ServerLogManager::OnRejectedPlayerLogin. Upstream's version removed that call and rewrote only the comment. Preserving the guard keeps the server-build audit log intact. Minecraft.Client/ServerConnection.cpp Kept HEAD comment. Both sides changed only a single-line comment above the playerSnapshot vector. HEAD's comment ("Disconnect through PlayerConnection so clients receive a proper DisconnectPacket before socket close") describes the functional intent; it was kept as the more meaningful description for this branch. Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp Conflicts 1 & 2 — shutdown thread teardown: Hybrid: adopted upstream's nullptr style (consistent with the rest of the file after the modernisation PR) while keeping HEAD's more precise comment ("Ensure all host-side receive threads have exited before destroying locks"). Conflict 3 — AcceptThreadProc accept() call: Kept HEAD. HEAD passes sockaddr_in remoteAddress to accept() so that TryGetNumericRemoteIp can extract the client IP for connection logging and the IP-ban check (ServerRuntime::Access::IsIpBanned). Upstream had simplified the call to accept(…, nullptr, nullptr), which would have silently broken IP-based access control in the server build. --- fix: declare extern ConsoleUIController ui in ServerMain.cpp Windows64_UIController.h (included by ServerMain.cpp) defines the class but does not forward-declare the global `ui` instance. The `extern ConsoleUIController ui` declaration lives only in Common/UI/UI.h, which is not in ServerMain.cpp's include chain. The object is defined in Windows64_UIController.cpp, which IS compiled as part of Minecraft.Server.vcxproj, so the linker already sees it; the missing declaration caused a C2065 compile error only in the server translation unit. Added the extern declaration alongside the other extern globals at the top of ServerMain.cpp.
Description
This commit reimplements boat gravity. Which was removed in #615, readded by #651, then removed in #906 (??)
Changes
(Somewhat) reimplement changes made in my previous pull request, #651.
Previous Behavior
Boats may glitch into ground on ride.
Boats would create splash particles in any environment, depending on speed.
Rider floats above the boat
Root Cause
PR #651 was reverted.
New Behavior
Related Issues
Video of what gravity should now look like:
https://github.com/user-attachments/assets/10162dc1-9fcb-4bd4-b846-37ee2fbccb6d
*This video was filmed for #651, if it was filmed in this commit the player would sit 0.1 above where they were in the video. Everything else should be the same.
Hey, its 100% okay that #651 was reverted, but I didn't see any comment about it being reverted. I assume it was a mistake. If it wasn't a mistake, then just reject this pr.