Commit Graph

409 Commits (master)

Author SHA1 Message Date
celeron55 3f67215df9
Log sockets into tracestream instead of dstream (#12701) 2022-08-16 15:18:11 +01:00
sfan5 c4277877b6 Bump protocol version
Better late than never.
2022-08-04 22:45:52 +02:00
rubenwardy a871115889
Fix some warnings (#12615) 2022-07-30 12:51:23 +01:00
Lexi Hale 20bd6bdb68
Animated particlespawners and more (#11545)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Dmitry Kostenko <codeforsmile@gmail.com>
2022-07-13 11:57:12 +02:00
SmallJoker e51f474613
Sounds: Various little improvements (#12486)
Use SimpleSoundSpec where reasonable (OpenAL)
Ensure the sound IDs do not underflow or get overwritten -> loop in u16
Proper use of an enum.
2022-07-09 22:32:24 +02:00
Vincent Robinson f7bcf7fa46
FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453)
* FormSpec: 9-slice images and animated_images

* Add fgimg_middle; clean up code

* Address issues, add tests

* Fix stupid error; bump formspec version

* Re-add image[] elements without a size
2022-07-03 08:52:26 -04:00
Wuzzy 142928e944
Allow to set maximum star opacity at daytime (#11663) 2022-07-02 19:57:48 +01:00
SmallJoker a463620edb
Re-order sound-related code (#12382)
Dropped ServerSoundParams -> moved to ServerPlayingSound. This gets rid of the duplicated
'fade' and 'pitch' values on server-side where only one was used anyway.
SimpleSoundSpec is the basic sound without positional information, hence 'loop' is included.

Recursively added PROTOCOL_VERSION to most functions to reduce the versioning mess in the
future. Per-type version numbers are kept for now as a safety rope in a special case.
2022-06-20 21:56:12 +02:00
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