Commit Graph

55 Commits (e98d421aff046a2d9a9b87516779603dc170b209)

Author SHA1 Message Date
MoNTE48 e98d421aff Merge remote-tracking branch 'upstream/stable-0.4' into sync 2019-04-01 20:18:54 +02:00
SmallJoker 2fb3b1e414 Damage: Remove damage ignore timer 2018-06-03 17:32:00 +02:00
Loïc Blot f7b094ac93 Verify HudSetParams input when hotbar textures are set (#6013)
* Verify HudSetParams input when hotbar textures are set

This fix #6011
2018-06-03 17:31:59 +02:00
Maksim Gamarnik 35770f4abb Merge Minetest 0.4.16 2017-06-06 23:03:34 +03:00
Loïc Blot 8fa097e102 When minimap is disabled in configuration, really disable it (#5771)
* When minimap is disabled in configuration, really disable it
2017-05-19 07:25:27 +02:00
SmallJoker 8a74c66b03 Fading soungs: Fix client crash on older servers 2017-05-03 13:48:46 +02:00
paramat ad2e38e257 Set sky API: Add bool for clouds in front of custom skybox
Default true.
Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API.
Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of
'm_visible' (whether normal sky is visible).
2017-05-02 20:42:35 -07:00
SmallJoker 1b21a680f0 Sneak: Improve and fix various things
Remove useless `got_teleported`.
Fix jitter when walking against the sneak limits.
Fix damage evading on sneak ladders.
2017-05-03 03:16:20 +01:00
Brandon 893c2dfb5e Sound API: Add fading sounds 2017-05-03 03:12:45 +01:00
Ben Deutsch 4236cf8e5e Add clouds API 2017-04-30 00:06:13 +01:00
ShadowNinja b41838b8ef Rename Scripting API files for consistency 2017-04-25 13:41:36 -04:00
red-001 3fd3573def Network:Remove old opcodes and fix documentation. (#5573) 2017-04-22 13:59:02 +02:00
Loïc Blot 126d41f70f Client handlers: Remove useless stringstream usage in two handlers (#5510) 2017-04-04 07:47:04 +02:00
Loïc Blot b9e61d4da3 [CSM] Add minimap API modifiers (#5399)
* Rename Mapper (too generic) to Minimap
* Add lua functions to get/set position, angle, mode for minimap
* Client: rename m_mapper to m_minimap
* Add minimap to core.ui namespace (core.ui.minimap)
* Add various functions to manage minimap (show, hide, toggle_shape)
* Cleanup trivial declaration in client
2017-03-16 10:34:54 +01:00
nerzhul 0da8c64041 [CSM] Add enable_client_modding param (default: false) 2017-03-13 23:56:05 +01:00
Loïc Blot 828a6149da [CSM] Add on_death, on_hp_modification & oh_damage_taken callbacks (#5093)
* Add on_death callback
* Add on_hp_modification & on_damage_taken callbacks
* move preview code to preview.lua
2017-03-13 23:56:05 +01:00
red-001 4fea6c30de [CSM] Add method that display chat to client-sided lua. (#5089) (#5091)
* squashed: [Client-sided scripting] Don't register functions that don't work. (#5091)
2017-03-13 23:56:05 +01:00
Loic Blot 045cc40d91 [CSM] Client side modding
* rename GameScripting to ServerScripting
* Make getBuiltinLuaPath static serverside
* Add on_shutdown callback
* Add on_receiving_chat_message & on_sending_chat_message callbacks
* ScriptApiBase: use IGameDef instead of Server
  This permits to share common attribute between client & server
* Enable mod security in client side modding without conditions
2017-03-13 23:56:05 +01:00
Maksim Gamarnik e05f7db82f Updated to Minetest ver. 0.4.15 2017-01-30 00:44:07 +02:00
sfan5 ef197b4880 Add particle animation, glow
This is implemented by reusing and extending the
TileAnimation code for the methods used by particles.
2017-01-18 23:21:01 +01:00
sfan5 a99777ab39 Revert "Adding particle blend, glow and animation (#4705)"
This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.
2016-11-14 15:28:06 +01:00
Foghrye4 04ea490226 Adding particle blend, glow and animation (#4705) 2016-11-15 00:09:59 +10:00
Ner'zhul 4d9f4685ff PlayerSAO/LocalPlayer refactor: (#4612)
* Create UnitSAO, a common part between PlayerSAO & LuaEntitySAO
* Move breath to PlayerSAO & LocalPlayer
* Migrate m_yaw from (Remote)Player & LuaEntitySAO to UnitSAO
* Migrate m_yaw from Player to LocalPlayer for client
* Move some functions outside of player class to PlayerSAO/RemotePlayer or LocalPlayer depending on which class needs it
* Move pitch to LocalPlayer & PlayerSAO
* Move m_position from Player to LocalPlayer
* Move camera_barely_in_ceiling to LocalPlayer as it's used only there
* use PlayerSAO::m_base_position for Server side positions
* remove a unused variable
* ServerActiveObject::setPos now uses const ref
* use ServerEnv::loadPlayer unconditionnaly as it creates RemotePlayer only if it's not already loaded
* Move hp from Player to LocalPlayer
* Move m_hp from LuaEntitySAO to UnitSAO
* Use m_hp from PlayerSAO/UnitSAO instead of RemotePlayer
2016-10-30 14:53:26 +01:00
raymoo 6e0388ece4 Attached particle spawners 2016-10-13 17:33:16 +02:00
Loic Blot 3558ac7829 More code cleanup (UNORDERED + RemotePlayer/LocalPlayer)
* ClientEnvironment now uses UNORDERED MAP for active objects
* Use RemotePlayer and LocalPlayer everywhere it's possible
* Minor code style fixes
* Drop Client::getBreath() unused function
2016-10-08 22:27:44 +02:00
Loic Blot aca9ff5961 Player/LocalPlayer/RemotePlayer inheritance cleanup (part 1 on X)
* LocalPlayer take ownership of maxHudId as it's the only caller
* RemotePlayer take ownership of day night ratio as it's the only user
* Pass getPlayerControl as const reference to prevent object copy on each call (perf improvement in ObjectRef::l_get_player_control call)
* getPlayerSAO is now only RemotePlayer call
* get/setHotbarItemCount is now RemotePlayer owned
* Server: Use RemotePlayer instead of Player object on concerned call to properly fix the object type
* PlayerSAO now uses RemotePlayer instead of Player because it's only server side
* ObjectRef::getplayer also returns RemotePlayer as it's linked with PlayerSAO
2016-10-08 11:36:28 +02:00
Loic Blot 2b5c276768 Use more unordered_maps to improve performance in c++11 builds 2016-10-06 12:33:35 +02:00
Auke Kok 9cb1159917 Particles: Add option to remove particles on collision
Adds the particle option `collision_removal = bool`

Some particles are hard to use right now since they either go through
solid blocks (without collision detection), and with collision
detection enabled they (e.g. raindrops) would just stop dead on the
floor and sit there until they expire, or worse, scrape along a wall
or ceiling.

We can solve the problem by adding a boolean flag that tells the
particle to be removed if it ever collides with something. This will
make it easier to add rain that doesn't fall through your roof or stick
on the top of it. Or clouds and smoke that don't go through trees.

Particles that collide with this flag are marked expired
unconditionally, causing them to be treated like normal expired
particles and cleaned up normally.

Documentation is adjusted accordingly.

An added bonus of this patch is that particles can potentially collide
many times with nodes, and this reduces the amount of collisions to 1
(max), which may end up reducing particle load on the client.
2016-05-28 00:08:23 -04:00
Maksim Gamarnik f56e578960 Merge remote-tracking branch 'upstream1/master' 2016-03-21 01:45:56 +02:00
ShadowNinja 3592feb875 Clean up Strfnd
Changes:
  * Fix indentation.
  * Pass strings by const reference.
  * Merge Strfnd and WStrfnd into one class instead of copying them.
  * Remove trailing spaces.
  * Fix variable names.
  * Move to util.
  * Other miscellaneous style fixes.
2016-03-19 21:27:57 -04:00
Maksim Gamarnik 8f6ddcc57c Merge branch 'upstream/master' 2016-03-14 11:44:17 +02:00
HybridDog 95a304db08 Fix player teleportation bug whilst sneaking
Only set back position when sneaking if player wasn't teleported by adding and using a bool "got_teleported" to player
it fixes #2876
2016-03-14 08:44:28 +00:00
Maksim Gamarnik bcf249297c Merge last Minetest commits 2015-11-10 20:29:00 +02:00
Maksim Gamarnik 919be490f9 Update
Sync all Minetest commits
2015-11-10 13:49:24 +02:00
ShadowNinja 29e8adeadc Use warningstream for log messages with WARNING
Remove DTIME macro and its uses, too
2015-10-14 01:36:48 -04:00
est31 9e5c0119da Hide minimap if it has been disabled by server 2015-09-01 19:00:33 +02:00
ShadowNinja 098d28aa5e Clean up threading
* Rename everything.
    * Strip J prefix.
    * Change UpperCamelCase functions to lowerCamelCase.
  * Remove global (!) semaphore count mutex on OSX.
  * Remove semaphore count getter (unused, unsafe, depended on internal
    API functions on Windows, and used a hack on OSX).
  * Add `Atomic<type>`.
  * Make `Thread` handle thread names.
  * Add support for C++11 multi-threading.
  * Combine pthread and win32 sources.
  * Remove `ThreadStarted` (unused, unneeded).
  * Move some includes from the headers to the sources.
  * Move all of `Event` into its header (allows inlining with no new includes).
  * Make `Event` use `Semaphore` (except on Windows).
  * Move some porting functions into `Thread`.
  * Integrate logging with `Thread`.
  * Add threading test.
2015-08-23 22:04:06 -04:00
Maksim Gamarnik 9247f32e0e LGPL 2.1 to 3.0 on all files 2015-08-14 01:26:28 +03:00
est31 c3162ae744 Fix srp.cpp:815 leak
Thanks @Zeno-
2015-07-27 08:15:39 +02:00
est31 713002778f Optional reconnect functionality
Enable the server to request the client to reconnect.

This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
2015-07-23 07:38:13 +02:00
kwolekr fb9a752a18 Remove raw message output on AOM deserialization failure
Improve TOCLIENT_ACTIVE_OBJECT_MESSAGES robustness for handling invalid data
2015-07-13 23:29:29 -04:00
est31 dd302e0032 Use UTF-8 instead of narrow
Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places.
Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
2015-07-08 10:12:44 +02:00
est31 991448706d Client: better m_proto_ver initialisation
Previously, m_proto_ver was set to the serialisation version
inside the legacy init packet.

Now, if the server doesn't send a protocol version (protocols < 25),
we set m_proto_ver to some value < 25 and > 0.
2015-07-07 17:03:26 +02:00
Loic Blot a92e6d00b0 Typo fix on previous @est31 commit 2015-06-23 23:17:47 +02:00
est31 4b3721a7ed Small TOCLIENT_HELLO logging fix
Fix grammar error and missing number conversion for version.
Also add deployed protocol to log line.
2015-06-23 21:14:48 +02:00
est31 2a58ad066a Finalize init packets and enable protocol v25
This enables srp.
2015-05-31 23:16:28 +10:00
est31 69bda0a70f Make early protocol auth mechanism generic, and add SRP
Adds everything needed for SRP (and everything works too),
but still deactivated, as protocol v25 init packets aren't final yet.
Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25
inside networkprotocol.h.
2015-05-31 23:14:05 +10:00
est31 223cd47b49 Finalize init packets and enable protocol v25
This enables srp.
2015-05-16 21:17:28 +02:00
est31 4769d4fe1d Make early protocol auth mechanism generic, and add SRP
Adds everything needed for SRP (and everything works too),
but still deactivated, as protocol v25 init packets aren't final yet.
Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25
inside networkprotocol.h.
2015-05-11 18:40:27 +02:00
est31 33ab5efbff Protocol 25: wstring -> string for custom access denial reasons
Also fix std::logic_error when server::DenyAccess() is used with only two arguments.
2015-04-26 16:46:07 +10:00