Commit graph

154 commits

Author SHA1 Message Date
Tyler Reese 157cf37d28
Merge 12c229ff98 into d4ac3cd645 2026-04-21 20:03:58 -04:00
Sylvessa 7c1606837f
fix: worlds without worlds won't open (#1529)
Some checks failed
Nightly Release / build (Windows64) (push) Has been cancelled
Nightly Server Release / build (Windows64) (push) Has been cancelled
Nightly Server Release / release (push) Has been cancelled
Nightly Server Release / Build and Push Docker Image (push) Has been cancelled
Nightly Server Release / cleanup (push) Has been cancelled
Nightly Release / release (push) Has been cancelled
Nightly Release / cleanup (push) Has been cancelled
2026-04-18 19:14:42 -05:00
dtentiion 4a7b34f4c2
fix: Display save thumbnail in world detail view on Windows64 (#1519) 2026-04-18 17:49:43 -05:00
dtentiion 9167454767
fix: Nether portal trigger and travel sounds not playing (#1523) 2026-04-18 17:47:18 -05:00
DrPerkyLegit 1a552fbd0c
Fix broken Chat Formatting behavior (#1520)
Some checks failed
Nightly Server Release / build (Windows64) (push) Has been cancelled
Nightly Release / build (Windows64) (push) Has been cancelled
Nightly Server Release / release (push) Has been cancelled
Nightly Server Release / Build and Push Docker Image (push) Has been cancelled
Nightly Server Release / cleanup (push) Has been cancelled
Nightly Release / release (push) Has been cancelled
Nightly Release / cleanup (push) Has been cancelled
* fix formatting in chat

iggy doesnt like multiple shadow colors

* enforce html labels

* dont format before sending packet, client formats anyway

* move translateables to chat format, restore original empty message results

* fix crappy string cutoff

* forgot a line on last commit, reset color support

* restore function to strip styling from player messages
2026-04-16 22:41:50 -05:00
dtentiion cccfd860b9
fix: Skin pack names showing only first letter after 4JLibs update (#1518) 2026-04-16 22:35:14 -05:00
Revela d0094a6409
Add F2 screenshot functionality (#1262)
- Updated `EControllerActions` to include `MINECRAFT_ACTION_SCREENSHOT`.
- Added conditional compilation for `stb_image_write.h` in `Minecraft.cpp`.
- Modified `run_middle()` to handle screenshot key press.
- Updated `tick()` to capture and save screenshots as PNG files.
- Introduced `KEY_SCREENSHOT` in `KeyboardMouseInput.h` mapped to F2.
- Added `stb_image_write.h` for image writing capabilities.
2026-04-16 22:33:30 -05:00
Loki 2fba264c08
Revert "Prevent contextually wrong music from playing (#1138)"
Some checks are pending
Nightly Server Release / build (Windows64) (push) Waiting to run
Nightly Server Release / release (push) Blocked by required conditions
Nightly Server Release / Build and Push Docker Image (push) Blocked by required conditions
Nightly Server Release / cleanup (push) Blocked by required conditions
Nightly Release / build (Windows64) (push) Waiting to run
Nightly Release / release (push) Blocked by required conditions
Nightly Release / cleanup (push) Blocked by required conditions
This reverts commit 2d41711055.
2026-04-14 17:00:35 -05:00
Riley M. c0da06e4ee
major: Switch to forward slashes(+more) to fix compilation on Linux (#1403)
Notably also adds some metadata files for NixOS 

* add support for linux clang cross compiles

* add linux clang instructions

* un-capitalize Mob.horse.*

* update the description in flake.nix

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-04-14 16:47:37 -05:00
Tyler Reese 78afb091a4
fix: Implement missing critical hit sound (#1141)
* Fix

* Crit Sound Now Plays On Death

* Revert BuildVer.h

---------

Co-authored-by: Loki <lokio.casebstv@gmail.com>
2026-04-12 23:24:29 -05:00
Tyler Reese 2d41711055
fix: Prevent contextually wrong music from playing (#1138) 2026-04-12 23:22:14 -05:00
DrPerkyLegit 14f8d793dd
Add Chat Formatting Support For Servers (#1483)
* add chat support for html formatting

* html character serialization, normal color format support

* change for chat input handling on color

has a bug where the text after the cursor gets stripped of its color, need to make a function to backstep on a string and find the last used color codes, or get all color codes used before the string is split, and apply them to the start of the next string

* expose jukebox label as action bar like java

* prevent players from sending chat color

* restore non styled chat size check
2026-04-12 23:17:45 -05:00
Us3ful"-Dev e730033bcc
fix: Prevent end poem crash (#1489)
Removed player name check that always fails to work on non host instances
2026-04-12 22:53:39 -05:00
DrPerkyLegit c7014f6b18
feat: Scrollable chat (#1493)
* chat scrolling

* allow escape to close chat instead of opening pause
2026-04-12 22:50:16 -05:00
Loki Rautio d0786f956d Update more references to old smartcmd repo 2026-04-07 20:29:32 -05:00
blongm d3412aaae7
Fixed issue with world seeds not saving correctly (#1119)
Some checks failed
Nightly Server Release / build (Windows64) (push) Has been cancelled
Nightly Release / build (Windows64) (push) Has been cancelled
Nightly Server Release / release (push) Has been cancelled
Nightly Server Release / Build and Push Docker Image (push) Has been cancelled
Nightly Server Release / cleanup (push) Has been cancelled
Nightly Release / release (push) Has been cancelled
Nightly Release / cleanup (push) Has been cancelled
## Description
Fix issue where typing in a short seed on world creation doesn't save the seed correctly

## Changes

### Previous Behavior
Typing in a seed on the world creation menu that's less than 8 characters long will result in garbage data being saved as the seed. Happens with controller and KBM.
You can see this in-game - if you exit the world options menu and go back in, the seed will show up as boxes □□□.
Weirdly, if you type a seed again, it behaves as expected.

### Root Cause
For some reason, assigning `m_params->seed` to the seed text points it to garbage data, when it's 7 characters or less.

### New Behavior
Seed entry behaves as expected.

### Fix Implementation
- Added `static_cast<wstring>` before assignment to `m_params->seed`.
- Also replaced `(wchar_t *)` with `reinterpret_cast<wchar_t*>` in the functions.

### AI Use Disclosure
No AI was used
2026-03-30 06:05:32 -05:00
Sestain 7447fabe0d
Fix game crashing if DLC has XMLVERSION paramater (#1285)
* Fix game crashing if DLC has XMLVERSION paramater

* Better implementation of XMLVersion check

* Forgot to add type name to the list

* Removed extra newline
2026-03-27 15:11:27 -05:00
Sestain 3c1166c45e
Added support for Big-Endian DLCs (#1291)
* Added support for Big-Endian DLCs

* Remove unused variable

* Remove the things made for other PR
2026-03-27 15:59:35 -04:00
Sylvessa 1a50770647
Add asynchronous server joining (#1408) 2026-03-26 10:15:11 -04:00
Ayush Thoren ed9cbae3f7
Fix initial cursor position for in-game UI elements (#1120)
Signed-off-by: Ayush Thoren <ayushthoren@gmail.com>
2026-03-23 21:06:20 -05:00
Sylvessa 127465b0eb
add advanced tooltips, F3+H combo, and handle settings (#1389) 2026-03-23 17:54:46 -05:00
Lord Cambion 9a6d126ae1
Stained Glass Survival Integration & Crafting UI Fix (#1195)
* Added Stained Glass

i found out that stained glass  was not accessible in survival, then i  saw they disabled it in the code

* Grouping glass correctly in crafting table

I removed the #if/endif from the ClothDyeRecipes.cpp and added a different one in StructureRecipies.cpp
also changed the Tile definition giving it the same
setBaseItemTypeAndMaterial of stained glass to group it correctly inside the crafting table UI.
also aincremented the Vertical Slot for crafting table to include many more craftings in the same group
2026-03-22 21:15:02 -05:00
Revela 39e46751bf
Add clipboard paste support to UIControl_TextInput and UIScene_Keyboard (#1298)
Previously paste only worked in the chat screen. Wire Screen::getClipboard() into the two remaining text input paths so Ctrl+V works for sign editing, seed entry, server IP/port, and world name fields.
2026-03-22 21:09:10 -05:00
Sylvessa b6e25415ca
Remove redundant buffer in UIScene_SettingsGraphicsMenu.cpp (#1348) (#1380) 2026-03-22 18:37:59 -04:00
GabsPuNs 250accd40b
Fix Sign (#1369)
fix for the sign's interface.

SignEntryMenu720 was being replaced by an older version of SkinWinHD.

SignEntryMenu720 was is now replaced with it's original version.
2026-03-21 17:49:21 -04:00
Xenovyy a94ee1ca22
Fixed the ear bleeding sound when using a slider with mouse controls (#1296)
* Fixed the ear bleeding sound when using a slider with mouse controls

Now only ticks every 9 "ticks" unless the slider has less than 18 possible values..

* cured rtm516's ocd

title

* rtm516 reaches enlightenment

* rtm516 reaches total enlightenment
2026-03-17 22:44:12 +00:00
rtm516 02a5961f39
Move project to CMake (#781)
* Move to cmake

* Move sources to source_groups and ditch more old VS files

* Add BuildVer.h generation

* Break out cmake source lists to platforms

* Don't copy swf files

* Revert audio changes from merge

* Add platform defines

* Match MSBuild flags

* Move BuildVer.h to common include and fix rebuild issue

* Seperate projects properly

* Exclude more files and make sure GameHDD exists

* Missing line

* Remove remaining VS project files

* Update readme and actions

* Use incremental LTCG

* Update workflows

* Update build workflows and output folder

* Disable vcpkg checks

* Force MSVC

* Use precompiled headers

* Only use PCH for cpp

* Exclude compat_shims from PCH

* Handle per-platform source includes

* Copy only current platform media

* Define Iggy libs per platform

* Fix EnsureGameHDD check

* Only set WIN32_EXECUTABLE on Windows

* Correct Iggy libs path

* Remove include of terrain_MipmapLevel

* Correct path to xsb/xwb

* Implement copilot suggestions

* Add clang flags (untested)

* Fix robocopy error checking

* Update documentation

* Drop CMakePresets.json version as we dont use v6 features

* Always cleanup artifacts in nightly even if some builds fail

* Re-work compiler target options

* Move newer iggy dll into redist and cleanup

* Fix typos

* Remove 'Source Files' from all source groups

* Remove old ps1 build scripts
2026-03-17 16:39:22 -05:00
Loki Rautio 1a3fcb5b20 Remove Miles Sound System from credits
we don't use it anymore!
2026-03-17 16:22:49 -05:00
Loki Rautio a3ca23fdf6 Cleanup project credits and README 2026-03-17 16:15:26 -05:00
Alex 994a23f96b Fix save space indicator display
Include space indicator UI element in windows build, logic to handle getting save file sizes on windows
2026-03-17 07:44:52 -07:00
GabsPuNs 5a59f5d146
Update to more accurate logo (#1305)
Some checks failed
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Has been cancelled
Docker Nightly Dedicated Server / Build Dedicated Server Runtime (push) Has been cancelled
Nightly Releases / Build Windows64 (push) Has been cancelled
Docker Nightly Dedicated Server / Build and Push Docker Image (push) Has been cancelled
* Updated Logo

* Updated two old files.
2026-03-16 19:00:51 -05:00
Xenovyy 15ea3dc85c
Adjusted Exit Game title (#1277)
* Adjusted Exit Game title

Replaced "Return to Xbox Dashboard" with "Exit Minecraft" on the exit game screen.

* Fixed Blending on Intro Sequence

Fixed Blocky, Crappy blending on the ESRB and Mojang Logos in the Intro Sequence.
2026-03-15 18:12:53 -05:00
kuwa f483074cd2
Dedicated Server Software - Minecraft.Server.exe (#498)
* add: Dedicated Server implementation

- Introduced `ServerMain.cpp` for the dedicated server logic, handling command-line arguments, server initialization, and network management.
- Created `postbuild_server.ps1` script for post-build tasks, including copying necessary resources and DLLs for the dedicated server.
- Added `CopyServerAssets.cmake` to manage the copying of server assets during the build process, ensuring required files are available for the dedicated server.
- Defined project filters in `Minecraft.Server.vcxproj.filters` for better organization of server-related files.

* add: refactor world loader & add server properties

- Introduced ServerLogger for logging startup steps and world I/O operations.
- Implemented ServerProperties for loading and saving server configuration from `server.properties`.
- Added WorldManager to handle world loading and creation based on server properties.
- Updated ServerMain to integrate server properties loading and world management.
- Enhanced project files to include new source and header files for the server components.

* update: implement enhanced logging functionality with configurable log levels

* update: update keyboard and mouse input initialization 1dc8a005ed

* fix: change virtual screen resolution to 1920x1080(HD)

Since 31881af56936aeef38ff322b975fd0 , `skinHud.swf` for 720 is not included in `MediaWindows64.arc`,
the app crashes unless the virtual screen is set to HD.

* fix: dedicated server build settings for miniaudio migration and missing sources

- remove stale Windows64 Miles (mss64) link/copy references from server build
- add Common/Filesystem/Filesystem.cpp to Minecraft.Server.vcxproj
- add Windows64/PostProcesser.cpp to Minecraft.Server.vcxproj
- fix unresolved externals (PostProcesser::*, FileExists) in dedicated server build

* update: changed the virtual screen to 720p

Since the crash caused by the 720p `skinHud.swf` not being included in `MediaWindows64.arc` has been resolved, switching back to 720p to reduce resource usage.

* add: add Docker support for Dedicated Server

add with entrypoint and build scripts

* fix: add initial save for newly created worlds in dedicated server

on the server side, I fixed the behavior introduced after commit aadb511, where newly created worlds are intentionally not saved to disk immediately.

* update: add basically all configuration options that are implemented in the classes to `server.properties`

* update: add LAN advertising configuration for server.properties

LAN-Discovery, which isn’t needed in server mode and could potentially be a security risk, has also been disabled(only server mode).

* add: add implementing interactive command line using linenoise

- Integrated linenoise library for line editing and completion in the server console.
- Updated ServerLogger to handle external writes safely during logging.
- Modified ServerMain to initialize and manage the ServerCli for command input.
- The implementation is separate from everything else, so it doesn't affect anything else.
- The command input section and execution section are separated into threads.

* update: enhance command line completion with predictive hints

Like most command line tools, it highlights predictions in gray.

* add: implement `StringUtils` for string manipulation and refactor usages

Unified the scattered utility functions.

* fix: send DisconnectPacket on shutdown and fix Win64 recv-thread teardown race

Before this change, server/host shutdown closed sockets directly in
ServerConnection::stop(), which bypassed the normal disconnect flow.
As a result, clients could be dropped without receiving a proper
DisconnectPacket during stop/kill/world-close paths.

Also, WinsockNetLayer::Shutdown() could destroy synchronization objects
while host-side recv threads were still exiting, causing a crash in
RecvThreadProc (access violation on world close in host mode).

* fix: return client to menus when Win64 host connection drops

- Add client-side host disconnect handling in CPlatformNetworkManagerStub::DoWork() for _WINDOWS64.
- When in QNET_STATE_GAME_PLAY as a non-host and WinsockNetLayer::IsConnected() becomes false, trigger g_NetworkManager.HandleDisconnect(false) to enter the normal disconnect/UI flow.
- Use m_bLeaveGameOnTick as a one-shot guard to prevent repeated disconnect handling while the link remains down.
- Reset m_bLeaveGameOnTick on LeaveGame(), HostGame(), and JoinGame() to avoid stale state across sessions.

* update: converted Japanese comments to English

* add: create `Minecraft.Server` developer guide in English and Japanese

* update: add note about issue

* add: add `nlohmann/json` json lib

* add: add FileUtils

Moved file operations to `utils`.

* add: Dedicated Server BAN access manager with persistent player and IP bans

- add Access frontend that publishes thread-safe ban manager snapshots for dedicated server use
- add BanManager storage for banned-players.json and banned-ips.json with load/save/update flows
- add persistent player and IP ban checks during dedicated server connection handling
- add UTF-8 BOM-safe JSON parsing and shared file helpers backed by nlohmann/json
- add Unicode-safe ban file read/write and safer atomic replacement behavior on Windows
- add active-ban snapshot APIs and expiry-aware filtering for expires metadata
- add RAII-based dedicated access shutdown handling during server startup and teardown

* update: changed file read/write operations to use `FileUtils`.

- As a side effect, saving has become faster!

* fix: Re-added the source that had somehow disappeared.

* add: significantly improved the dedicated server logging system

- add ServerLogManager to Minecraft.Server as the single entry point for dedicated-server log output
- forward CMinecraftApp logger output to the server logger when running with g_Win64DedicatedServer
- add named network logs for incoming, accepted, rejected, and disconnected connections
- cache connection metadata by smallId so player name and remote IP remain available for disconnect logs
- keep Minecraft.Client changes minimal by using lightweight hook points and handling log orchestration on the server side

* fix: added the updated library source

* add: add `ban` and `pardon` commands for Player and IP

* fix: fix stop command shutdown process

add dedicated server shutdown request handling

* fix: fixed the save logic during server shutdown

Removed redundant repeated saves and eliminated the risks of async writes.

* update: added new sever files to Docker entrypoint

* fix: replace shutdown flag with atomic variable for thread safety

* update: update Dedicated Server developer guide

English is machine translated.
Please forgive me.

* update: check for the existence of `GameHDD` and create

* add: add Whitelist to Dedicated Server

* refactor: clean up and refactor the code

- unify duplicated implementations that were copied repeatedly
- update outdated patterns to more modern ones

* fix: include UI header (new update fix)

* fix: fix the detection range for excessive logging

`getHighestNonEmptyY()` returning `-1` occurs normally when the chunk is entirely air.
The caller (`Minecraft.World/LevelChunk.cpp:2400`) normalizes `-1` to `0`.

* update: add world size config to dedicated server properties

* update: update README add explanation of  `server.properties` & launch arguments

* update: add nightly release workflow for dedicated server and client builds to Actions

* fix: update name for workflow

* add random seed generation

* add: add Docker nightly workflow for Dedicated Server publish to GitHub Container Registry

* fix: ghost player when clients disconnect out of order

#4

* fix: fix 7zip option

* fix: fix Docker workflow for Dedicated Server artifact handling

* add: add no build Dedicated Server startup scripts and Docker Compose

* update: add README for Docker Dedicated Server setup with no local build

* refactor: refactor command path structure

As the number of commands has increased and become harder to navigate, each command has been organized into separate folders.

* update: support stream(file stdin) input mode for server CLI

Support for the stream (file stdin) required when attaching a tty to a Docker container on Linux.

* add: add new CLI Console Commands for Dedicated Server

Most of these commands are executed using the command dispatcher implemented on the `Minecraft.World` side. When registering them with the dispatcher, the sender uses a permission-enabled configuration that treats the CLI as a player.

- default game.
- enchant
- experience.
- give
- kill(currently, getting a permission error for some reason)
- time
- weather.
- update tp & gamemode command

* fix: change player map icon to random select

* update: increase the player limit

* add: restore the basic anti-cheat implementation and add spawn protection

Added the following anti-cheat measures and add spawn protection to `server.properties`.
- instant break
- speed
- reach

* fix: fix Docker image tag

---------

Co-authored-by: sylvessa <225480449+sylvessa@users.noreply.github.com>
2026-03-15 02:32:50 -05:00
arsenicviscera 12c229ff98 Copilot sucks
it replaced my bracket with a random line wth
2026-03-14 14:37:06 -07:00
arsenicviscera 36fd52dc50 Fix
Fixed tooltip changes
2026-03-14 14:06:48 -07:00
MrTheShy ad74d44300
Fix joining servers in split screen, splitscreen fixes (#1031)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
* Fix split-screen join failing when connecting to a remote host via UI

When a non-host client connected to a remote server through the in-game
UI (as opposed to the -ip/-port command line flags), the global variables
g_Win64MultiplayerIP and g_Win64MultiplayerPort were never updated from
their defaults ("127.0.0.1" and the default port). JoinSplitScreen()
relies on these globals to open a second TCP connection for the local
split-screen pad, so it would always attempt to connect to localhost,
failing immediately on any remote session.

Fix: update g_Win64MultiplayerIP and g_Win64MultiplayerPort inside
JoinGame() once the primary connection is established. This ensures
subsequent JoinSplitScreen() calls always reach the correct host
regardless of how the session was joined.

Additionally, guard PushFreeSmallId() against recycling smallIds in the
range [0, XUSER_MAX_COUNT), which are permanently reserved for the
host's local controller slots. Previously, if a host-side local pad
disconnected its smallId could re-enter the free pool and be handed
to an incoming remote client, causing that client's IQNetPlayer slot
to collide with a local pad slot on the non-host machine.

* Fix tutorial popup positioning in split-screen viewports

Replace the manual switch-case that computed viewport origin with the shared GetViewportRect/Fit16x9 helpers (from UISplitScreenHelpers.h). This ensures the tutorial popup is positioned and scaled consistently with the rest of the split-screen UI, fitting a 16:9 box inside each viewport and applying safezone offsets correctly.

Also adds missing default:break to safezone switch statements to silence compiler warnings.

Made-with: Cursor

* Prevent split-screen join when game window is not focused

Add g_KBMInput.IsWindowFocused() guard to the tryJoin condition so that gamepad input from background windows does not accidentally trigger a split-screen player join. This avoids phantom joins when the user is interacting with another application.

* Open debug overlay in fullscreen UI group during split-screen

Pass eUIGroup_Fullscreen to NavigateToScene when opening the debug overlay, so it spans the entire window instead of being confined to a single split-screen viewport. This makes the debug info readable regardless of the current split-screen layout.

* Fix non-host split-screen connections missing world updates

Previously, secondary (non-host) split-screen connections used isPrimaryConnection()
to gate nearly all world update packets, meaning the second local player would never
receive tile updates, entity movement, sounds, particles, explosions, etc.

The fix introduces per-connection tracking of which entities and chunks each
ClientConnection has loaded, and uses that information to decide whether a secondary
connection needs to process a given packet or if the primary connection already
handled it.

New members in ClientConnection:
- m_trackedEntityIds: set of entity IDs this connection has received AddEntity/AddMob/AddPlayer etc. for
- m_visibleChunks: set of chunk coordinates (packed into int64) this connection has marked visible
- Both sets are cleared on close(), respawn (dimension change), and destructor

New helpers:
- findPrimaryConnection(): walks the MultiPlayerLevel connection list to find the connection on the primary pad
- shouldProcessForEntity(id): secondary connection skips the packet only if the primary is already tracking that entity
- shouldProcessForPosition(x, z): secondary connection skips the packet only if the primary already has that chunk visible
- anyOtherConnectionHasChunk(x, z): used when a chunk becomes invisible to avoid hiding it from the level if another connection still needs it
- isTrackingEntity(id): public accessor used by shouldProcessForEntity on the primary connection

Packet handler changes:
- handleMoveEntity, handleMoveEntitySmall, handleSetEntityMotion, handleTakeItemEntity:
  replaced isPrimaryConnection() with shouldProcessForEntity() so secondary
  connections still process movement for entities they know about
- handleExplosion, handleLevelEvent:
  replaced isPrimaryConnection() with shouldProcessForPosition() so block
  destruction and level events fire for the correct connection based on chunks
- handleChunkTilesUpdate, handleBlockRegionUpdate, handleTileUpdate, handleSignUpdate,
  handleTileEntityData, handleTileEvent, handleTileDestruction, handleComplexItemData,
  handleSoundEvent, handleParticleEvent:
  removed the isPrimaryConnection() guard entirely -- these are world-state updates
  that all connections must process regardless of which pad is primary
- handleChunkVisibilityArea / handleChunkVisibility:
  now populate m_visibleChunks; on visibility=false, setChunkVisible(false) is
  only called on the level if no other connection still has that chunk loaded
- handleAddEntity, handleAddExperienceOrb, handleAddPainting, handleAddPlayer,
  handleAddMob: now insert into m_trackedEntityIds on arrival
- handleRemoveEntity: now erases from m_trackedEntityIds on removal
- handleLevelEvent: removed a duplicate levelEvent() call that was always firing
  regardless of the isPrimaryConnection() check above it (latent bug)

MultiPlayerLevel: added friend class ClientConnection to allow access to the
connections list without exposing it publicly.

* Fix fullscreen progress screen swallowing input before load completes

Two issues in UIScene_FullscreenProgress::handleInput:

1. The touchpad/button press that triggers movie skip or input forwarding
   had no guard on m_threadCompleted, so pressing a button during the loading
   phase would fire the skip/send logic before the background thread finished.
   Added the m_threadCompleted check so that path is only reachable once
   the load is actually done.

2. The `handled = true` assignment was missing from that branch, so input
   events were not being consumed and could fall through to other handlers.
   Added it unconditionally at the end of the block.

* Update player count decrement logic in PlatformNetworkManagerStub

Refactor the condition for decrementing the player count in CPlatformNetworkManagerStub::DoWork. The previous check was replaced with a while loop to ensure that the player count is only decremented when there are more than one player and the last player's custom data value is zero. This change improves the handling of player connections in the network manager.

* Refactor safe zone calculations in UI components for consistency

Updated the safe zone calculations across multiple UI components to ensure symmetry in split viewports. Removed unnecessary assignments and added comments for clarity. Modified the repositionHud function to include an additional parameter for better handling of HUD positioning in split-screen scenarios.

* Gui.cpp: fix F3 debug overlay in splitscreen + minor perf cleanup

The F3 debug screen was badly broken in splitscreen: it used the GUI
coordinate space which gets distorted by the splitscreen scaling, so
text appeared stretched, misaligned or completely off-screen depending
on the viewport layout.

Fixed by setting up a dedicated projection matrix using physical pixel
coordinates (g_rScreenWidth / g_rScreenHeight) each time the overlay is
drawn, completely decoupled from whatever transform the HUD is using.
The viewport dimensions are now computed per screen section so the ortho
projection matches the actual pixel area of each player's quadrant.
Version and branch strings are only shown for player 0 (iPad == 0) to
avoid repeating them across every splitscreen pane.

Also removed a few redundant calculations that were being done twice in
the same frame (atan for xRot, health halves, air supply scaled value).
These are minor and have negligible real-world impact; more substantial
per-frame caching work (safe zone calculations etc.) will follow in a
separate commit.
2026-03-13 01:32:18 -05:00
aria 714462b130
Fix background stretching in settings>graphics menu (#1092)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
2026-03-12 16:01:15 +00:00
Alezito2008 e140978daf
fix: logo rendering order after closing host options (#907) 2026-03-12 12:52:09 +00:00
Ayush Thoren bb8ffee0d3
Fix mouse being pulled to the bottom right (#1156)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
Signed-off-by: Ayush Thoren <ayushthoren@gmail.com>
2026-03-12 01:44:32 -05:00
ModMaker101 44fc8a4db2
Fix quiet in-game audio after engine update #897 (#1171) 2026-03-12 01:43:12 -05:00
Marvelco 1036b7368e
Fixed DLC map loading / saving, missing chunks (#1114)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
* fixed all DLC maps

* fixed old saves have overlapping chunks with the new system
2026-03-10 22:04:19 -05:00
la d7596aa28c
Fix issue where visually the HUD shows you have 0 hearts when you dont (#1089)
Some checks are pending
MSBuild Debug Test / Build Windows64 (DEBUG) (push) Waiting to run
Nightly Release / Build Windows64 (push) Waiting to run
* Fix for issue where player is able to stay alive with zero hearts in their healthbar.

* use static cast over c style cast
2026-03-09 22:30:01 -05:00
Alezito2008 5f777a7f45
Fix: Prevent clicking disabled checkboxes (#1075) 2026-03-09 22:03:39 -05:00
Marlian 3bcf588fbe
Fix crash when loading saved tutorial worlds (#1001)
writeRuleFile() was missing the schematic file count integer before the schematic entries. The reader in readRuleFile() expected this count, causing a stream misalignment that led to an assertion failure (Unrecognised schematic version) when reloading a saved tutorial world.

The fix writes the count on save and adds backward-compatible reading that detects old saves (without count) via a peek heuristic and falls back to count-less parsing.

Co-authored-by: MCbabel <MCbabel@users.noreply.github.com>
2026-03-09 22:02:39 -05:00
Loki Rautio 0c4f459904 Always show version overlay, add more info 2026-03-09 03:25:05 -05:00
MrTheShy e2adaa082c
Fix split-screen UI wrong positioning on window resize (#989)
* Fix split-screen UI wrong positioning on window resize

In vertical split at window heights below 1080, ComputeTileScale's min-scale clamp (>= 1.0) prevented the SWF from scaling down to fit, cropping the bottom and causing repositionHud to shift HUD elements downward. Chat and Tooltips additionally applied an offset from ComputeSplitContentOffset that only produced correct values at the 1920x1080 design resolution.

Override the scale for vertical split so the SWF fits the full window height when it is shorter than the movie. Remove the broken content offset from Chat and Tooltips -- the tile crop already positions the content correctly.

* Fix gamma post-process in split-screen

The gamma shader sampled the full backbuffer texture (UV 0..1) into each player's viewport, stretching the entire screen into every split region. Extended the shader constant buffer with per-viewport UV offset and scale so each pass samples only its own portion of the backbuffer.

ComputeViewportForPlayer was hardcoded to top/bottom for 2 players, ignoring the vertical split setting. Rewrote it to read each player's m_iScreenSection directly, which already accounts for the split orientation preference.

Secondary players have no Graphics menu and cannot change gamma. CachePlayerGammas now reads the primary player's setting and applies it uniformly to all viewports.
2026-03-08 22:16:58 -05:00
rtm516 91bf8d44fa
Use the correctly sized icons on 720p (#883)
* Use the correctly sized icons on 720p

* Improve check
2026-03-08 21:05:54 -05:00
MrTheShy af5d5a06d5
Revert the workaround of loading of hd textures (#999)
The previous crash fix forced HD skins at every resolution which made everything blurry at 720p and below because Iggy was downscaling 1080p assets.

The real problem was that 4J loaded the HD skin libraries (skinHD.swf, skinHDHud.swf etc) unconditionally on Win64 but the HD platform skin was only registered above 720p. At 720p or lower Iggy couldnt find platformskinHD.swf and crashed.

Now on Win64 we load both skin sets at startup, HD and non-HD, each with their own registered name so they dont conflict. loadMovie() picks 1080.swf or 720.swf based on actual screen height, and each scene SWF naturally imports the right skin chain. No crash, no blurriness.

4J already had the eLibraryFallback enum slots for this (including eLibraryFallback_Platform) but it was behind a debug-only guard and the platform skin slot was never actually loaded. Removed the guard and added the missing load.
2026-03-08 21:02:48 -05:00
MrTheShy 3c52436c08
Fix crash when launching at 720p or lower resolutions (#981)
The HD skin libraries (skinHD.swf, skinHDHud.swf, etc.) are loaded
unconditionally on Win64/Durango/Orbis, and they import the Iggy
library "platformskinHD.swf" by name. However, the platform skin
path and registration name were gated behind a runtime resolution
check (m_fScreenHeight > 720.0f), so at exactly 720p the skin was
registered as "platformskin.swf" instead, and below 720p the non-HD
.swf file was loaded entirely. This caused Iggy to fail resolving
the import, which cascaded into a failed scene load and hit a
__debugbreak().

Always use the HD platform skin on these platforms since the HD
libraries that depend on it are always loaded regardless of
resolution. PS3/PSVita are unaffected as they have their own
non-HD skin loading path.
2026-03-08 18:36:56 -05:00
ModMaker101 28614b922f
Modernize project codebase (#906)
* Fixed boats falling and a TP glitch #266

* Replaced every C-style cast with C++ ones

* Replaced every C-style cast with C++ ones

* Fixed boats falling and a TP glitch #266

* Updated NULL to nullptr and fixing some type issues

* Modernized and fixed a few bugs

- Replaced most instances of `NULL` with `nullptr`.
- Replaced most `shared_ptr(new ...)` with `make_shared`.
- Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.

* Fixing more conflicts

* Replace int loops with size_t and start work on overrides

* Add safety checks and fix a issue with vector going OOR
2026-03-08 18:08:36 -05:00