Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Restore pass-through of direction keys (#11924)
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
- Loading branch information
Showing
with
165 additions
and 98 deletions.
- +9 −7 src/client/client.cpp
- +2 −2 src/client/clientlauncher.cpp
- +4 −32 src/client/game.cpp
- +36 −14 src/client/inputhandler.h
- +1 −3 src/client/localplayer.cpp
- +1 −1 src/client/localplayer.h
- +1 −8 src/network/serverpackethandler.cpp
- +59 −0 src/player.cpp
- +21 −12 src/player.h
- +8 −6 src/script/lua_api/l_localplayer.cpp
- +23 −13 src/script/lua_api/l_object.cpp
There are no files selected for viewing
This file contains 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
This file contains 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
@@ -70,10 +70,10 @@ static void dump_start_data(const GameStartData &data) | ||
|
||
ClientLauncher::~ClientLauncher() | ||
{ | ||
delete input; | ||
|
||
delete receiver; | ||
|
||
delete g_fontengine; | ||
delete g_gamecallback; | ||
|
||
This file contains 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
This file contains 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
This file contains 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
This file contains 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
@@ -86,7 +86,7 @@ class LocalPlayer : public Player | ||
v3f last_speed; | ||
float last_pitch = 0.0f; | ||
float last_yaw = 0.0f; | ||
u32 last_keyPressed = 0; | ||
u8 last_camera_fov = 0; | ||
u8 last_wanted_range = 0; | ||
|
||
This file contains 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
This file contains 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
Oops, something went wrong.