Commit Graph

277 Commits

Author SHA1 Message Date
SmallJoker 0c533dc436 Game: Fix double BS multiplication 2019-08-07 21:23:01 +02:00
ANAND e788ee283f Client::Interact: Use InteractAction enum instead of numeric constants
This replaces the magic numbers used as interaction modes both client-side and server-side, primarily for the sake of ease-of-readability.
2019-08-07 19:21:14 +02:00
SmallJoker e462a9a5ef
Unify wield item handling (#8677)
This moves the wield item functions to Player and the tool utils for range calculation
Also 'local_inventory' was removed due to redundancy in Client
2019-08-07 19:16:31 +02:00
ANAND fa6bc699bc Hide chat when console is open (#8656) 2019-08-07 19:15:33 +02:00
DS 1cef09ff10 Fix inventory_overlay for nodes without inventory_image (#8433) 2019-08-07 12:07:30 +02:00
sfan5 19426387d4 Optimize usage of TOSERVER_GOTBLOCKS packet 2019-08-07 11:32:16 +02:00
SmallJoker 233cb86e86
Clean up and fix freetype=false crashes (#8641)
A IGUIFont of type bitmap/vector cannot be converted to CGUITTFont
Fixes various segfaults in gameplay
Shorter font cache code, cleaned up (?)
2019-08-06 21:33:13 +02:00
sfan5 6c2ded4cac Unify GLES support in gui scaling filter 2019-08-04 16:12:52 +02:00
sfan5 ca363d3ef8 Unify OpenGL ES support 2019-08-04 16:12:52 +02:00
rubenwardy 9541165752 Add styles to most elements 2019-08-03 19:36:30 +01:00
rubenwardy d1a1c5cbf0 Add custom colorable GUIButton implementation 2019-08-03 19:36:30 +01:00
SmallJoker 3ceef8e6a0 Mainmenu: Use textarea in error formspecs 2019-08-01 15:56:28 +02:00
Methacrylon cdc7eb2d4c Sky: Refactor of moon and sun drawing (#8683)
Split sun and moon render parts from the main render function.
2019-07-30 20:25:47 +02:00
SmallJoker 4aa9a669cb
ContentCAO: Fix broken attachments on join (#8701)
What happened:
1) Object data is received. Client begins to read the data
2) Client initializes all its children (gob_cmd_update_infant)
3) Children try to attach to parent (yet not added)
4) Parent initializes, is added to the environment

And somewhere in between, Irrlicht wrecks up the attachments due to the missing matrix node.

The solution here is to:
1) Use the same structure as ServerActiveObject
2) Attach all children after the parent is really initialized
2019-07-29 19:14:07 +02:00
Pierre-Yves Rollo c3daf2a8be Fix missing item images clipping in formspecs (#8652)
* Fix clipping of itemimage

* Code style

* More code styling
2019-07-26 19:44:29 +02:00
Lars Hofhansl 9fe3246154 Optimize getting active objects a bit. #8674 2019-07-16 15:55:17 -07:00
DS-Minetest 140aeabd87 Do predict when sneak-place to node with on_rightclick 2019-07-08 14:21:27 +02:00
Vitaliy 93f7e10e0d Optimize and unify mesh processing (#7851) 2019-06-28 03:22:16 +01:00
rubenwardy 429a989648 Add support for 9-sliced backgrounds (#8600)
9-slice textures are commonly used in GUIs to allow scaling them to match any resolution without distortion.

https://en.wikipedia.org/wiki/9-slice_scaling
2019-06-22 16:03:54 +02:00
SmallJoker 4e3c1916f7 Fix segfault on quitting with open node formspec (#8608) 2019-06-21 21:00:30 +02:00
SmallJoker e2f8f4da83
Formspecs: Close on metadata removal (#8348)
Formspecs will now close as soon the formspec string in the node metadata turns invalid.
2019-06-10 13:01:07 +02:00
SmallJoker e40be619f2
Add disable_jump to liquids and ladders (#7688)
Remove second nodedef check by improving the colliding node detection
Also remove the 2nd check in old_move, correct standing node a bit
2019-06-10 13:00:35 +02:00
SmallJoker a1459a9eac Fix persistent ^[brighten after damage again (#5739)
The old texture modifier is restored by passing `m_previous_texture_modifier`.
Either copy it manually or let the function parameter do that.

Victims so far:
8e0b80a Apr 2018
eb2bda7 May 2019
2019-05-26 09:54:26 +02:00
DS 9d09c87f13 Make autoforward simulate the 'up' key (#8249) 2019-05-21 19:50:00 +01:00
Jozef Behran eb2bda7d0b Optimize string (mis)handling (#8128)
* Optimize statbar drawing

The texture name of the statbar is a string passed by value.
That slows down the client and creates litter in the heap
as the content of the string is allocated there. Convert the
offending parameter to a const reference to avoid the
performance hit.

* Optimize texture cache

There is an unnecessary temporary created when the texture
path is being generated. This slows down the cache each time
a new texture is encountered and it needs to be loaded into
the cache. Additionally, the heap litter created by this
unnecessary temporary is particularly troublesome here as
the following code then piles another string (the resulting
full path of the texture) on top of it, followed by the
texture itself, which both are quite long term objects as
they are subsequently inserted into the cache where they can
remain for quite a while (especially if the texture turns
out to be a common one like dirt, grass or stone).

Use std::string.append to get rid of the temporary which
solves both issues (speed and heap fragmentation).

* Optimize animations in client

Each time an animated node is updated, an unnecessary copy of
the texture name is created, littering the heap with lots of
fragments. This can be specifically troublesome when looking
at oceans or large lava lakes as both of these nodes are
usually animated (the lava animation is pretty visible).
Convert the parameter of GenericCAO::updateTextures to a
const reference to get rid of the unnecessary copy.

There is a comment stating "std::string copy is mandatory as
mod can be a class member and there is a swap on those class
members ... do NOT pass by reference", reinforcing the
belief that the unnecessary copy is in fact necessary.
However one of the first things the code of the method does
is to assign the parameter to its class member, creating
another copy. By rearranging the code a little bit this
"another copy" can then be used by the subsequent code,
getting rid of the need to pass the parameter by value and
thus saving that copying effort.

* Optimize chat console history handling

The GUIChatConsole::replaceAndAddToHistory was getting the
line to work on by value which turns out to be unnecessary.
Get rid of that unnecessary copy by converting the parameter
to a const reference.

* Optimize gui texture setting

The code used to set the texture for GUI components was
getting the name of the texture by value, creating
unnecessary performance bottleneck for mods/games with
heavily textured GUIs. Get rid of the bottleneck by passing
the texture name as a const reference.

* Optimize sound playing code in GUIEngine

The GUIEngine's code receives the specification of the sound
to be played by value, which turns out to be most likely a
mistake as the underlying sound manager interface receives
the same thing by reference. Convert the offending parameter
to a const reference to get rid of the rather bulky copying
effort and the associated performance hit.

* Silence CLANG TIDY warnings for unit tests

Change "std::string" to "const std::string &" to avoid an
unnecessary local value copy, silencing the CLANG TIDY
process.

* Optimize formspec handling

The "formspec prepend" parameter was passed to the formspec
handling code by value, creating unnecessary copy of
std::string and slowing down the game if mods add things like
textured backgrounds for the player inventory and/or other
forms. Get rid of that performance bottleneck by converting
the parameter to a const reference.

* Optimize hotbar image handling

The code that sets the background images for the hotbar is
getting the name of the image by value, creating an
unnecessary std::string copying effort. Fix that by
converting the relevant parameters to const references.

* Optimize inventory deserialization

The inventory manager deserialization code gets the
serialized version of the inventory by value, slowing the
server and the client down when there are inventory updates.
This can get particularly troublesome with pipeworks which
adds nodes that can mess around with inventories
automatically or with mods that have mobs with inventories
that actively use them.

* Optimize texture scaling cache

There is an io::path parameter passed by value in the
procedure used to add images converted from textures,
leading to slowdown when the image is not yet created and
the conversion is thus needed. The performance hit is
quite significant as io::path is similar to std::string
so convert the parameter to a const reference to get rid of
it.

* Optimize translation file loader

Use "std::string::append" when calculating the final index
for the translation table to avoid unnecessary temporary
strings. This speeds the translation file loader up
significantly as std::string uses heap allocation which
tends to be rather slow. Additionally, the heap is no
longer being littered by these unnecessary string
temporaries, increasing performance of code that gets
executed after the translation file loader finishes.

* Optimize server map saving

When the directory structure for the world data is created
during server map saving, an unnecessary value passing of
the directory name slows things down. Remove that overhead
by converting the offending parameter to a const reference.
2019-05-18 17:19:13 +02:00
Paramat ad8d68c06a
Remove unnecessary CSM warning (#8485) 2019-04-28 00:44:26 +01:00
ANAND d71e1e0949 Improve readability of debug menu by using '|' (#8488)
* Improve readability of debug menu by using '|'

* Restore whitespace to separate yaw and cardinal direction

Co-Authored-By: ClobberXD <ClobberXD@gmail.com>
2019-04-27 12:45:44 +02:00
Muhammad Rifqi Priyo Susanto 695d9edcd4 Use player as starting point instead of camera when pointing node (#8261)
Same pointing area on both camera modes.
This fix is inapplicable for non-crosshair input.
2019-04-27 12:44:56 +02:00
stujones11 cff1e9ca27 Android: Clear chat open flag on cancel or completion (#8478) 2019-04-19 12:06:47 +02:00
paramat 38b94f248a Attend to review, re-arrange blank lines, update lua_api.txt 2019-04-14 22:21:51 +01:00
Pedro Gimeno 12a63021d0 Fix regression in automatic_face_movement_max_rotation_per_sec
Values <= 0 should make the yaw change instant. This worked in 0.4.16 but was broken in 089f594582.

Per bug report by oil_boi_minetest on IRC.
2019-04-14 22:21:51 +01:00
ANAND d111865890 Change sign of pitch angle in debug menu (#8438)
Co-Authored-By: ClobberXD <ClobberXD@gmail.com>
2019-04-04 22:42:18 +01:00
Paramat 42e1a12714
Require 'waving = 3' in a nodedef to apply the liquid waving shader (#8418)
Makes the liquid waving shader per-nodedef like waving leaves/plants,
instead of being applied to all liquids.
Like the waving leaves/plants shaders, the liquid waving shader can
also be applied to meshes and nodeboxes.

Derived from a PR by t0ny2.
2019-03-27 00:18:43 +00:00
sfan5 5b99abb847 Fix texture rotation for wallmounted nodeboxes
fixes #8358
2019-03-19 22:36:51 +01:00
Loïc Blot e22a69d61a Drop GUIConfirmRegistration::m_address unused field 2019-03-12 16:53:21 +01:00
Ragulan R c8914664a3 Display pitch angle in debug menu (#8321) 2019-03-10 11:16:27 +01:00
rubenwardy c735497a65 Fix clang tidy error due to incorrect use of quotes for character 2019-03-06 14:41:37 +00:00
sofar b5defcffba Add referer to remote media requests. (#8135)
This sends the following header to a remote media server:

    Referer: minetest://<server_name>:port

This was verified with CTF and the Minetest Public Remove Media
server. If the servername was a plain IPv6 address it will
contain `:` characters and will be encapsulated in `[]` to
be a valid URI.
2019-03-05 08:12:02 +01:00
Loïc Blot 170dd409cb
Fix particle spawners not visible since CSM spawner implementation (#8289)
* Drop the ID mapper, use a big u64 instead. This will permit to resync server ids properly with the manager code
* Modernize some code parts (std::unordered_map, auto)
* generate id on client part on U32_MAX + 1 ids, lower are for server ids
2019-03-01 20:16:11 +01:00
Loïc Blot 111f1dc9c5 Revert "Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)"
This reverts commit 01cd63bd3b.
2019-02-26 08:53:53 +01:00
Paramat 01cd63bd3b
Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)
Reverts 5dab742645
"[CSM] Add functions to create particles and particlespawners."
2019-02-26 04:26:25 +00:00
ANAND 242c9bc36e Remove 's' from 'automatic forwards' (#8272) 2019-02-23 01:12:33 +00:00
ANAND 7a0e52acd6 Revert RTT fixes (#8187)
The reverted commit 968ce9af59
is suspected (through the use of bisection) of causing network slowdowns.
Revert for now as we are close to release.
2019-02-15 23:39:22 +00:00
SmallJoker ffb17f1c9a Consistent HP and damage types (#8167)
Remove deprecated HUDs and chat message handling.
Remove unused m_damage variable (compat break).
HP: s32 for setter/calculations, u16 for getter.
2019-02-10 23:03:26 +00:00
SmallJoker ba5a9f2b36
Slippery: Do not apply when swimming (#8198) 2019-02-10 17:04:04 +01:00
SmallJoker 6d6a813614
Autojump: Disable in fly mode, support continuous forward (#8200)
Correctly disable in fly mode (issue #8199)
Also autojump in continuous forward mode (issue #8201)
2019-02-09 21:44:04 +01:00
Paul Ouellette d5456da69d Use true pitch/yaw/roll rotations without loss of precision by pgimeno (#8019)
Store the rotation in the node as a 4x4 transformation matrix internally (through IDummyTransformationSceneNode), which allows more manipulations without losing precision or having gimbal lock issues.

Network rotation is still transmitted as Eulers, though, not as matrix. But it will stay this way in 5.0.
2019-02-07 21:26:06 +00:00
random-geek fc566e2e10 Fix cloud color in loading screen and main menu (#8174) 2019-02-04 19:11:02 +00:00
Loic Blot f4099192e3
Import strstr function from FreeBSD 11 libc 2019-01-10 00:17:08 +01:00
Loïc Blot 0acdf93683 Android build fixes
This fixes #8079
2019-01-09 14:39:43 +01:00
Loïc Blot 95d4ff6d1b
Fix a crash on Android with Align2Npot2 (#8070)
* Fix a crash on Android with Align2Npot2

glGetString can be NULL. If stored in a string it triggers a SIGSEGV.
Instead do a basic strstr and verify the pointer
* Better Align2Npot2 check (+ performance)
2019-01-07 17:05:18 +01:00
sofar cf224c9d6b Remove remote media compatibility mode. (#8044)
The fallback code shouldn't be needed and is a remnant of the GET
method that old media servers use. Clients using it are likely
to just waste bandwidth and having to download the media again
through the normal transfer from server method. The most reliable
method is to get all missing textures therefore from the server
directly and not spam the remote media server with 404s.
2019-01-04 00:26:08 +01:00
SmallJoker bba4563d89 Proselytize the network. Use IEEE F32 (#8030)
* Proselytize the network. Use IEEE F32
* Remove unused V2F1000 functions
2019-01-03 17:04:26 +01:00
Paramat ceacff13a6 CSM restrictions: Make 'LOAD_CLIENT_MODS' disable loading of 'builtin' (#8000)
Previously, when the CSM restriction 'LOAD_CLIENT_MODS' was used a
client was still able to add CSM code to 'builtin' to bypass that
restriction, because 'builtin' is not yet verified.

Until server-sent CSM and verifying of 'builtin' are complete, make
'LOAD_CLIENT_MODS' disable the loading of builtin.

Clarify code comments and messages to distinguish between client-side
modding and client-side scripting. 'Scripting' includes 'builtin',
'modding' does not.
2019-01-03 12:10:07 +01:00
random-geek aa5ec2ec02 Extend pitch fly mode to swimming (#7943) 2018-12-31 00:07:30 +00:00
stujones11 d994f7ca5f Fix more transparency issues with ogles2 driver (#8005) 2018-12-20 23:40:17 +01:00
Kevin Abrams b7eb81fed9 Add command line option to load password from file (#7832) 2018-12-18 20:15:14 +01:00
Loïc Blot eda35100b6
Add an activeobject manager to hold active objects (#7939)
* Add an activeobject manager to hold active objects
* Add unittests
2018-12-13 20:18:54 +01:00
SmallJoker 839e935ba0 Network: Send IEEE floats (#7768) 2018-12-13 11:20:57 +01:00
Wuzzy 8471d027b9 Make showOverlayMessage strings translatable (#7964) 2018-12-13 11:05:38 +01:00
Alex a833bee9ed Add object visual type 'item' (#7870) 2018-12-11 02:57:04 +00:00
Martin Renold b02effdab9 Fix crash if display resolution is not set (#7950)
On my wayland / gnome3 setup DisplayHeightMM() returns 0. This resulted in a
misleading startup error suggesting to fix my font paths.
2018-12-08 16:26:04 +01:00
Paramat 08884d258b
Draw all horizons and sky base, in front of stars (#7932)
Move star draw to before sun glow texture draw and before sun draw,
not currently essential but the logical order. Will be necessary if
a 'no far ground' option is added, to draw stars behind the sun.
2018-12-06 03:56:35 +00:00
SmallJoker 3d66622772
Send only changed node metadata to clients instead of whole mapblock (#5268)
Includes newer style changes and fixes by est31

Improve the block position de-serialization
Add type NodeMetadataMap
2018-12-04 20:37:48 +01:00
Vanessa Dannenberg 1b0fd195c6 Raise hotbar limit to 32 slots, add associated keybinding options (#7916)
add associated keybinding options
update docs and settingtypes
2018-12-02 23:34:29 +01:00
Paramat ff12630bc9
Draw stars behind the moon (#7928)
This time correctly, by resetting the 'material' to '1' after moon draw.
2018-12-02 07:25:43 +00:00
Paramat 5dd542401a
Slightly alter star appearence time and full brightness time (#7921)
At sunset:
Stars first appear slightly later, at the time the sun disappears over the horizon,
this fixes seeing dark stars in front of the sun horizon glow texture.
Stars reach full brightness slightly earlier at time 20000, not so excessively long
after sunset.

The above behaviour is also applied at sunrise, but of course, time-inverted.
2018-12-02 04:17:05 +00:00
Gaël C 327bad2eaf Added pitch fly mode (#7817)
In pitch fly mode, you fly to the exact direction you are pointing at, using the forward key. Other move directions are also pitched accordingly.
It allows smoother and more complex movements.
Can be enabled/disabled by L key by default (set keymap_pitchfly in minetest.conf)
2018-12-01 10:01:32 +01:00
Paramat dcf58a3ad0
Fix sky bugs when using sun or moon textures (#7918)
Reverts the render order change of commit
ce2d33eb97
2018-12-01 05:04:13 +00:00
Quentin Bazin 5f1cd555cd Move client-specific files to 'src/client' (#7902)
Update Android.mk
Remove 'src/client' from include_directories
2018-11-28 20:01:49 +01:00
stujones11 3b11288989 Android: Improve UI scaling on smaller high-density displays (#7834)
* Android: Improve UI scaling on smaller high-density displays
2018-11-18 11:31:19 +01:00
number Zero 4f9c33de64 Disable HW stereo for IrrLicht 1.9 (not supported anymore) 2018-11-11 18:08:15 +01:00
Paramat b982e45456
F5 debug info: Use full words for NSEW directions for readability (#7461) 2018-10-06 00:53:50 +01:00
Vitaliy 18a8fbf465 Software inventorycube (#7651)
Fixes missing/upside-down images on Android.
2018-09-29 19:40:17 +01:00
Paramat 766fb7b46e
Particles: Make collision with objects optional (#7682)
Also set it to false for node dig particles, as they are often created
and high in number.

Improve particle documentation.
2018-09-08 00:38:35 +01:00
lhofhansl 3a95d760e9 Some minor Fastface optimizations. (#7628) 2018-08-08 15:53:06 +02:00
thoughtjigs 3d516079eb Provide Xorg/net wm process ID (#7445)
Adding support for _NET_WM_PID as defined in Extended Window Manager Hints
Move verbose messaging to setupXorgTopLevelWindow method as Xorg messages should only occur when running in Xorg env.
Irrlicht returns the XDisplay as a void* and XWindow as an unsigned long so reinterpret those as the appropriate type. Also fixed a spaces for tab formating issue
2018-06-17 10:41:07 +02:00
otdav33 3f0720e721 Add crossview support (#7361) 2018-05-29 18:38:58 +02:00
Loic Blot 75aa41c6de
Fix GameUI flag value regression introduced by a78659ed05
Added more strong unittests on that part to prevent future regression
2018-05-29 08:34:09 +02:00
Loïc Blot a78659ed05 Fix more GCC 8.1 warnings   1   master
Fix 3 warnings reported by GCC 8.1 of the following type

```src/client/gameui.cpp:191:43: warning: « void* memset(void*, int, size_t) » effacement d'un objet du type non trivial « struct GameUI::Flags »; use assignment or value-initialization instead [-Wclass-memaccess]
  memset(&m_flags, 0, sizeof(GameUI::Flags));
```
2018-05-28 15:39:04 +02:00
Loic Blot 05fe3b06c8
Fix last clang-tidy reported problems for performance-type-promotion-in-math-fn
Based on https://travis-ci.org/minetest/minetest/jobs/361810382 output

Also fix 2 missing copyright notices
2018-04-03 23:05:22 +02:00
Loïc Blot ce873108aa
Client eventmanager refactor (#7179)
* Drop EventManager from GameDef & do some client cleanups

* EventManager is only used by Client. Don't expose it on Server & GameDef for nothing
* Drop Client::event() in favor of direct calls to getEventManager
* Cleanup some event put from new + put to put(new)
* MtEvent: add Type(u8) enum
* This will enhance event performance & ensure stricter type
* Drop MtEvent::checkIs (unused)

* clang-tidy reported fixes

* Code style

* Move event_manager.h to the client directory as it's only used by client

Add EventManager unittests + switch to unordered_map as order is not important here

Drop a unused function
2018-03-30 18:32:52 +02:00
nOOb3167 376ed5cd3c Sound: fix static initialization order dependency by not having one (#7168)
Ensure singleton is reset
2018-03-29 21:43:57 +02:00
nOOb3167 43f98eb47c Make sounds stop playing when entering game or mainmenu 2018-03-24 16:05:26 +01:00
Loïc Blot 4fd9715876
Cleanup sound manager class (#7158)
* Cleanup sound manager client

* Use some const refs
* Use auto on iterators
* Drop unused parameters
* Move sound_openal.* to client folder
* Move sound.cpp + OnDemandSoundFetcher to client/ folder + reorganize includes properly
2018-03-24 15:45:25 +01:00
Loic Blot eab652fd52
Fix some gcc 7.3 reported warnings
```
src/client/joystick_controller.h:85:2: warning: duplicate 'virtual' declaration specifier [-Wduplicate-decl-specifier]
        virtual bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const;
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/ext/new_allocator.h:140:22: warning: destructor called on non-final 'JoystickAxisCmb' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
                destroy(_Up* __p) { __p->~_Up(); }
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/ext/new_allocator.h:140:22: warning: destructor called on non-final 'JoystickButtonCmb' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
        destroy(_Up* __p) { __p->~_Up(); }
```
2018-03-23 22:12:48 +01:00
nOOb3167 9293d8e271 Global initialization of sound using SoundManagerGlobal (#7063)
* Global initialization of sound using SoundManagerGlobal
2018-03-23 15:31:43 +01:00
Vitaliy 9fcc0c1217 Update mesh collector and move it to a separate file (#6904)
* Update MeshCollector

* Simplify MeshCollector
2018-03-22 20:59:49 +01:00
stujones11 22a891a925
Android build fixes for c++11 2018-03-11 16:56:27 +01:00
Vitaliy cf8d579abc Drop texture file list cache (#6660) 2018-03-10 19:33:37 +01:00
Vitaliy 11928b7af1 Render copyright notice: Fix name spelling (#7042) 2018-02-15 21:19:34 +01:00
Dániel Juhász 3face01a20 Node definition manager refactor (#7016)
* Rename IWritableNodeDefManager to NodeDefManager
* Make INodeDefManager functions const
* Use "const *NodeDefManager" instead of "*INodeDefManager"
* Remove unused INodeDefManager class
* Merge NodeDefManager and CNodeDefManager
* Document NodeDefManager
2018-02-10 21:04:16 +01:00
ThomasMonroe314 501f936b37 Switch F3 to use 'enable_fog' setting 2018-02-08 15:40:16 +01:00
stujones11 e87b410a33 Include alpha channel reference in MaterialTypeParam 2018-02-08 15:38:49 +01:00
red-001 4f688d5616 Fix issues with earlier CSM HUD commit (#6940)
The CSM HUD PR caused some strange behavior including aborts due to parts of it using some slightly hacky code, the event refactor changing how events are processed and a minor oversight.
2018-01-26 16:05:47 +01:00
Loic Blot 99c9e7a986 Game refactor [4/X]: keycache is now owned by InputHandler
* 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
2018-01-20 16:38:38 +01:00
Loic Blot f5a006dce7 Game refactor [3/X]: Move keycache to inputhandler 2018-01-20 16:38:38 +01:00
Loic Blot 362323cdc2 Game/Input refactor [1/X]: make RealInputHandler handle joystick inputs with 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
2018-01-20 16:38:38 +01:00
red-001 9649e47214 [CSM] Add basic HUD manipulation. (#6067)
* [CSM] Add basic HUD manipulation.

Workaround for on_connect not working right now.
2018-01-20 14:09:58 +01:00
Muhammad Rifqi Priyo Susanto 792752997c Add confirmation on new player registration (#6849)
* Attempt to add registration confirmation

Using SRP auth mechanism, if server sent AUTH_MECHANISM_FIRST_SRP that means the player isn't exist.
Also tell player about the server and chosen username.
Local game has localhost as IP address of the server.
Add RenderingEngine::draw_menu_scene() to draw GUI and clouds background.
aborted -> connection_aborted

* Rewrite information message text

Client::promptConfirmRegister() -> Client::promptConfirmRegistration()
2018-01-13 12:07:16 +01:00