| Commit message (Collapse) | Author | Age |
|
|
| |
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit deprecates the forward, backward, left, and right binary
inputs currently used for player movement in the PlayerControl struct.
In their place, it adds the movement_speed and movement_direction
values, which represents the player movement is a polar coordinate
system.
movement_speed is a scalar from 0.0 to 1.0. movement_direction is
an angle from 0 to +-Pi:
FWD
0
_
LFT / \ RGT
-Pi/2 | | +Pi/2
\_/
+-Pi
BCK
Boolean movement bits will still be set for server telegrams and
Lua script invocations to provide full backward compatibility.
When generating these values from an analog input, a direction is
considered active when it is 22.5 degrees away from either
orthogonal axis.
Co-authored-by: Markus Koch <markus@notsyncing.net>
Co-authored-by: sfan5 <sfan5@live.de>
|
|
|
|
| |
This was changed 291a6b70d674d9003f522b5875a60f7e2753e32b but should have never been done.
|
| |
|
|
|
| |
This reverts commit 787561b29afdbc78769f68c2f5c4f2cff1b32340.
|
| |
|
|
|
|
| |
Co-authored-by: Sam Caulfield <sam@samcaulfield.com>
|
|
|
| |
Remove duplicated variables and unify the startup data into a new (inherited) struct.
|
|
|
|
|
|
| |
* Make InputHandler own the key cache
* Add a helper function InputHandler::cancelPressed to avoid multiple similar calls in game.cpp
* Move RandomInputHandler::step definition into cpp file
|
| |
|
|
|
|
|
|
|
| |
standard input
Joystick input is a RealInputHandler only usage, make it intelligent and handle the joystick with keyboard direct.
This permits to remove many getters in game which should be owned by RealInputHandler
|
|
|
|
| |
* Move files around
|
|
|
|
| |
* Migrate cpp headers to pragma once
|
|
|
|
| |
* Cleanup various headers to reduce compilation times
|
|
|
|
|
|
|
|
| |
* Various code style fixes
* Use range based for loops
* Use empty instead of empty objects
* Use C++11 default keyword for trivial constructors and destructors
* Drop some useless casts
* Use emplace_back instead of push_back to improve performance of some vectors push
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add Device3D class which will contain IrrlichtDevice interface
move getSupportedVideoDrivers to Device3D
Add Device3D singleton & use it in various places
Rename Device3D to Rendering engine & add helper functions to various device pointers
More singleton work
RenderingEngine owns draw_load_screen
move draw functions to RenderingEngine
Reduce IrrlichtDevice exposure and guienvironment
RenderingEngine: Expose get_timer_time() to remove device from guiEngine
Make irrlichtdevice & scene manager less exposed
* Code style fixes
* Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine
Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly
* enum paralax => enum parallax
|
|
|
|
| |
* C++11 cleanup on constructors dir client
|
|
|
|
|
|
|
|
|
|
| |
* Move KeyList & InputHandler from game.h to client/inputhandler.h
We have a header for inputs, move inputhandler class & related keylist object to it
Also introduce a cpp file for MyEventReceiver::OnEvent function in inputhandler.h because a so huge function doesn't needs to be inlined
* Pass clang-format on inputhandler.{cpp,h} (compatible)
|
|
|
|
|
|
|
| |
Adds initial ingame gamepad support to minetest.
Full Formspec support is not implemented yet and
can be added by a later change.
|
|
|
|
|
|
|
|
|
| |
We can remove the function in MtNativeActivity now
as it serves precisely that purpose: to tell irrlicht
that we handled the esc key.
TODO for later:
* Perhaps try to find a more performant container than KeyList
|
|
|
|
|
|
|
|
|
| |
- Add warning log level
- Change debug_log_level setting to enumeration string
- Map Irrlicht log events to MT log events
- Encapsulate log_* functions and global variables into a class, Logger
- Unify dstream with standard logging mechanism
- Unify core.debug() with standard core.log() script API
|
| |
|
| |
|
|
ClientLauncher now owns print_video_modes and speed_tests functions (they are only called by him) * Move GameParams to shared/gameparams.h because it's shared between server and client and launcher need to know it * Move InputHandlers class to client/inputhandler.h * Cleanup includes
|