Open
Conversation
Collaborator
|
This seems like a hack, realistically we should just disable inputs when the player is sleeping |
Collaborator
|
This is close, but I feel like disabling the mouse affecting head rotation rather than completely disabling the mouse when sleeping would be safer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When the player sleep, he cannot control the camera anymore
Changes
avoiding being able to move camera while being asleep
Previous Behavior
Nothing was happening so the player was able to move his head and change the sky time. F5 view was also glitched
Root Cause
Moving the camera cause the sky to act strange (time passing faster). This is caused because there is no logic preventing that.
New Behavior
Now when the player go to sleep he cannot move the camera anymore
https://github.com/user-attachments/assets/53e68642-b8b6-4786-bf3b-e6345b209280
Fix Implementation
i added
SetActiveMouse(bool active)andIsActiveMouse()into KeyboardMouseInput.h/cpp. And utilize themin startSleepInBed i added:
g_KBMInput.SetActiveMouse(false);in stopSleepInBed i added:
g_KBMInput.SetActiveMouse(true);as well as for good measures stop pressing left and right click (a bug where i would autoclick when i leave bed is avoided)
g_KBMInput.OnMouseButtonUp(KeyboardMouseInput::MOUSE_LEFT);g_KBMInput.OnMouseButtonUp(KeyboardMouseInput::MOUSE_RIGHT);AI Use Disclosure
nop
Related Issues