Commit Graph

401 Commits

Author SHA1 Message Date
Lars Müller
f4a53f7ee6
No damage effects on hp_max change (#11846) 2022-06-11 20:00:40 +02:00
rubenwardy
03d86ea0b4
Add register dialog to separate login/register (#12185)
New users find Minetest's account system confusing.
This change moves username/password to a new dialog,
with login and register buttons added to the Join Game tab.

The old registration confirmation dialog is removed in
favour of the new dialog.

Fixes #8138
2022-06-05 17:47:38 +02:00
paradust7
0704ca0550
Make logging cost free when there is no output target (#12247)
The logging streams now do almost no work when there is no output target for them.

For example, if LL_VERBOSE has no output targets, then `verbosestream << x` will return a StreamProxy with a null target. Any further `<<` operations applied to it will do nothing.
2022-05-04 20:55:01 +02:00
sfan5
a89afe1229 Deal with compiler warnings 2022-04-30 16:49:41 +02:00
sfan5
a65f6f07f3 Clean up some auth packet handling related code 2022-04-28 20:05:26 +02:00
sfan5
00f71c3b9d Fix password changing getting stuck if wrong password is entered once 2022-04-28 19:55:36 +02:00
sfan5
3d2bf8fb02 Apply disallow_empty_password to password changes too 2022-04-28 19:55:36 +02:00
sfan5
391eec9ee7 Fix race condition in registration leading to duplicate create_auth calls 2022-04-28 19:55:36 +02:00
ShadowNinja
7993909fab Spacing fixes 2022-04-08 14:55:21 +01:00
x2048
0f25fa7af6
Add API to control shadow intensity from the game/mod (#11944)
* Also Disable shadows when sun/moon is hidden. Fixes #11972.
2022-03-26 16:58:26 +01:00
sfan5
c31b301722 Clean up ClientReady packet handling
fixes #12073
2022-02-17 23:20:33 +01:00
Jude Melton-Houghton
1c73902005 Clean up ClientInterface locking 2022-02-03 11:43:51 +01:00
sfan5
5da204f5bc
Get rid of basic_debug last minute
This isn't a revert but rather just disables the codepaths. also see #12011
2022-01-30 21:32:49 +01:00
Vincent Robinson
95a775cd3a
Bump formspec version (#11980) 2022-01-23 00:55:43 +01:00
sfan5
f8cef52ea0 Fix consistency of sky sun/moon texture behaviour
Also cleans up related code somewhat.
2022-01-22 11:18:34 -05:00
sfan5
f66ed2c27f Fix local animation not instantly updating after being set 2022-01-19 23:30:18 +01:00
savilli
72b14bd994
Don't call on_dieplayer callback two times (#11874) 2022-01-15 17:44:55 +01:00
sfan5
5eb45e1ea0
Restore pass-through of direction keys (#11924)
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
2022-01-09 18:46:36 +01:00
sfan5
0ea8df4d64
Socket-related cleanups
Improve error handling on Windows and reduce the size of the `Address` class
2021-12-29 23:01:26 +01:00
savilli
0fa54531d4
Fix check that denies new clients from a singleplayer session 2021-12-28 14:08:21 +01:00
JosiahWI
7f6306ca96
Restore GCC 5 compatibility (#11778) 2021-12-28 14:05:49 +01:00
SmallJoker
57a59ae92d
Network: Delete copy constructor and use std::move instead (#11642)
This is a follow-up change which disables class copies where possible to avoid unnecessary memory movements.
2021-12-01 20:22:33 +01:00
Wuzzy
6910c8d920
Fix number of tool uses being off by 1..32767 (#11110) 2021-10-31 22:33:33 +00:00
sfan5
660e63dbae
Fix item duplication if player dies during interact callback (alternative) (#11662) 2021-10-25 20:30:27 +02:00
sfan5
fe5cb2cdfb Remove broken timeout behaviour
Code that relies on `resend_count` was added in 7ea4a03 and 247a1eb, but never worked.
This was fixed in #11607 which caused the problem to surface.
Hence undo the first commit entirely and change the logic of the second.
2021-10-12 20:13:09 +02:00
savilli
6ea558f8ac
Fix player HP desync between client and server 2021-10-12 20:12:49 +02:00
SmallJoker
d51d0f3a5a
Various code improvements
* Camera: Fix division by 0 after view bobbing
* Remove ignored constness
* Connection: Improve window size range limits
2021-09-27 17:45:44 +02:00
sfan5
e0529da5c8 Fix trivial typos 2021-09-19 13:54:20 +02:00
sfan5
fd8a8501bc
Shave off buffer copies in networking code (#11607) 2021-09-17 18:14:25 +02:00
sfan5
b480a3e9fd Fix broken handling of NodemetaChanged packets
fixes #11610
2021-09-12 14:42:01 +02:00
sfan5
75bf9b75ca
Make sure relevant std::stringstreams are set to binary 2021-09-11 21:06:57 +02:00
sfan5
bbfae0cc67
Dynamic_Add_Media v2 (#11550) 2021-09-09 16:51:35 +02:00
savilli
3f1adb49ae
Remove redundant on_dieplayer calls 2021-08-28 12:14:16 +02:00
NeroBurner
1d69a23ba4
Joystick sensitivity for player movement (#11262)
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>
2021-08-27 20:24:24 +02:00
SmallJoker
0c1e9603db
HUD: Reject and warn on invalid stat types (#11548)
This comes into play on older servers which do not know the "stat" type.
Warnings are only logged once to avoid spam within globalstep callbacks
2021-08-21 20:04:04 +02:00
sfan5
6e8aebf432
Add bold, italic and monospace font styling for HUD text elements (#11478)
Co-authored-by: Elias Fleckenstein <eliasfleckenstein@web.de>
2021-07-27 19:11:46 +02:00
Wuzzy
63fc728a84
Require 'basic_debug' priv to view gameplay-relevant debug info, require 'debug' priv to view wireframe (#9315)
Fixes #7245.
2021-06-24 21:21:19 +03:00
Lars Müller
88d1fcfe23
Block & report player self-interaction (#11137) 2021-03-30 21:49:50 +02:00
Elias Fleckenstein
492110a640
Check for duplicate login in TOSERVER_INIT handler (#11017)
i.e. checks for duplicate logins before sending all media data to the client.
2021-03-19 21:45:29 +01:00
SmallJoker
176f5866cb Protect dropping from far node inventories
Also changes if/if to switch/case
2021-03-07 17:18:02 +01:00
SmallJoker
fc864029b9 Protect per-player detached inventory actions 2021-03-07 17:18:02 +01:00
sfan5
593d5f4465 Clean up ClientEvent hudadd/hudchange internals 2021-03-06 23:02:10 +01:00
savilli
3edb1ddb81
Fix hud_change and hud_remove after hud_add (#10997) 2021-02-26 21:21:20 +01:00
SmallJoker
7832b6843e
Server-side authority for attached players (#10952)
The server must have authority about attachments. This commit ignores any player movement packets as long they're attached.
2021-02-15 20:41:19 +01:00
sfan5
674d67f312 Encode high codepoints as surrogates to safely transport wchar_t over network
fixes #7643
2021-02-02 20:46:08 +01:00
sfan5
c834d2ab25 Drop wide/narrow conversion functions
The only valid usecase for these is interfacing with OS APIs
that want a locale/OS-specific multibyte encoding.
But they weren't used for that anywhere, instead UTF-8 is pretty
much assumed when it comes to that.
Since these are only a potential source of bugs and do not fulfil
their purpose at all, drop them entirely.
2021-02-02 20:46:08 +01:00
SmallJoker
7ebd5da9cd Server GotBlocks(): Lock clients to avoid multithreading issues 2021-02-02 19:10:35 +01:00
sfan5
112a6adb10
Cache client IP in RemoteClient so it can always be retrieved (#10887)
specifically: after the peer has already disappeared
2021-01-31 20:36:47 +01:00
rubenwardy
4c76239818
Remove dead code (#10845) 2021-01-22 15:09:26 +00:00
sfan5
74762470b2 Fix some minor code issues all over the place 2020-12-24 13:44:54 +01:00