Commit Graph

4213 Commits

Author SHA1 Message Date
orwell96 681d127ff1 Particles: Make attached particle spawners respect the parent's yaw
Position, velocity and acceleration vectors of particles are rotated
by the yaw of the parent object so that they are truly relative to it.
Clarify new attached particle spawner behavior in lua_api.txt.
2016-11-18 06:18:54 +00:00
paramat bc3980e1d6 Mgv7: Add optional floatlands, disabled by default 2016-11-15 23:07:06 +00:00
sfan5 5fd1ef9b58 Revert "Adding particle blend, glow and animation (#4705)"
This reverts commit 93e3555eae.
2016-11-14 15:28:06 +01:00
Foghrye4 93e3555eae Adding particle blend, glow and animation (#4705) 2016-11-15 00:09:59 +10:00
Rogier 1980d9ea31 Fix crash when attached object no longer exists
Active objects that are attached to other objects are not safe
from deletion. As a result, the parent object may have a reference
to an id of a child's that no longer exists.

If at some point an attempt is made to manipulate the child,
enviromment->getActiveObject(child-id) returns NULL. Using the
NULL pointer causes the crash...
2016-11-13 10:10:28 +01:00
raymoo e4031156f1 Add control information to player interacts (#4685) 2016-11-12 17:22:39 +10:00
RealBadAngel 68f5b877c7 Halo: Highlight selected face
This is a slightly modified and cleaned up version of #3774 by RealBadAngel.
By sofar: Remove color change (just make it lighter) and some minor cleanups.
2016-11-12 06:41:04 +00:00
lisacvuk 8a1a9fdc24 Fixed tooltips not resizing with \n (#4766)
* Fixed tooltips not resizing with \n

* Fixed it for 1.8.4 too.

* Fixed not working with Freetype disabled.

* Modified it to use Zeno-'s solution.
2016-11-11 21:16:34 +10:00
Rogier-5 b98f98b367 Fix incorrect distance computation for visible blocks (#4765)
The client would not compute the distance from the camera to
to a mapblock correctly. The result was that blocks that were in
view (i.e. not beyond the fog limit) would not be rendered.

With the improved distance computation, a range adjustment that
existed in clientiface.cpp is no longer required.
2016-11-11 18:30:37 +10:00
Rogier-5 7e17eaedb2 Fix mob deserialization errors in the client (#4743)
The problem was seen while using the mobf mod package.

The problem happens when the server serializes entity attachments.
Sometimes, such attachments no longer exist. The serialization code
skips those. However, the total number of attachments was serialized
earlier.  Therefore the client expects more than it gets, and logs a
serialization error.
2016-11-10 13:42:49 +01:00
paramat c05aac3766 Occlusion culling: Add comments, minor code improvements
Remove unnecessary code.
Use '/ 2.0f' because endoff is a float.
2016-11-09 00:09:35 +00:00
Lars Hofhansl 739ef175aa Sky: Draw bottom of the sky box in 'cloudy fog color'
To be identical to the lower half of the skybox sides.
Now needed as the skybox base is often seen due to increasingly vertical
mapgens.
2016-11-08 15:20:01 +00:00
Lars Hofhansl e7c62edec9 Retrieve mapblocks from the server in a sphere, not a cube
Use unused range argument in 'isBlockInSight()' to limit mapblock sends
to a sphere of radius 'max block send distance'.
2016-11-08 15:15:27 +00:00
Lars Hofhansl 2b21cac1d8 Occlusion culling: Fix 'end offset' distance, half this for centre point
'endoff', the maximum diagonal of a mapblock, was incorrectly calculated.
Half this value for the centre point of the mapblock.
2016-11-08 15:12:08 +00:00
Lars Hofhansl 45eab340b9 Don't use reduced vertical limits for mapblock send and generation 2016-11-07 21:55:17 +00:00
adrido 295232667e Windows: Add manifest file and set "High DPI Aware" true
This resolves washy font and incorrect mouse handling on Windows if
a screen with high DPI is used.
2016-11-07 21:55:01 +00:00
SmallJoker ad4bf2ccf9 MSVC: Generate debug information for release builds (#4674)
Replace parameters with the equivalent /Ox
2016-11-06 11:14:36 -05:00
Ner'zhul 66bb295436 PlayerSAO saving fix (#4734)
PlayerSAO::disconnected() function was historical and remove the link between SAO and RemotePlayer session. With previous attributes linked to RemotePlayer saving was working. But now attributes are read from SAO not RemotePlayer and the current serialize function verify SAO exists to save the player attributes.

Because PlayerSAO::disconnected marks playersao for removal, only mark playerSAO for removal and let PlayerSAO::removingFromEnvironment do the correct saving behaviour and all the disconnection process instead of doing a partial removal and let the server loop doing the RemotePlayer cleanup and remove some saved attributes...
2016-11-05 10:25:30 +01:00
Zeno- b5c84c34ce Fix memory leak in ::safeLoadFile (#4730) 2016-11-05 15:10:49 +10:00
lhofhansl 6bb4347208 Remove unused shader matrices. (#4723) 2016-11-04 18:12:45 +01:00
lhofhansl dde66a82ed Cycle directly to nothing shown instead of showing the profiler graph again
Fix for previous commit.
2016-11-04 05:08:23 +01:00
lhofhansl f8fd432dca Add debug priv, and allow player to display the scene as wire-frame. (#4709) 2016-11-04 03:14:32 +01:00
Brandon bf315c05f1 Add minetest.get_server_uptime() function to Lua API (#4702)
Add minetest.get_server_uptime() function to Lua API
2016-11-02 09:36:58 -07:00
ShadowNinja 7607b0ac20 Add version API 2016-10-31 21:53:00 -07:00
paramat 70e2df4f86 Lua voxelmanip: Add optional buffer param for 'get param2 data'
Update lua_api.txt.
2016-10-31 10:59:38 +00:00
lhofhansl e1842ed370 Optionally disable optimization that causes underwater and cave rendering glitches. (#4686) 2016-10-30 23:35:55 -04:00
Loic Blot 595932a860 Fix overloading problems mentioned by clang 2016-10-30 16:30:55 +01:00
Ner'zhul 9d25242c5c 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
Hugo Locurcio d43326021a Rename testsounds/ directory to sounds/ (#1984) 2016-10-30 14:36:57 +10:00
sfan5 6d7b95d763 Add missing keyname_to_keycode function (needed on Android)
When rewriting keycode.cpp I overlooked this function, fixes #4683 completely
2016-10-28 15:50:23 +02:00
Ner'zhul 361e687f3a Add unittests to test player saving/loading (#4679) 2016-10-27 09:45:01 +02:00
Dániel Juhász bcb06aeb85 Cleanup 2016-10-27 08:04:42 +02:00
Dániel Juhász be39f61359 Use node lighting for liquid spreading
This commit modifies the liquid transforming procedure to light and
unlight nodes instead of whole map blocks.
2016-10-27 08:04:42 +02:00
Dániel Juhász c071efaa43 Improved lighting
This commit rewrites the procedure that is responsible for light
updating.

this commit
-provides iterative solutions for unlighting and light spreading
-introduces a new priority queue-like container for the iteration
-creates per-node MapBlock caching to reduce retrieving MapBlocks from
the map
-calculates with map block positions and in-block relative node
coordinates
-skips light updating if it is not necessary since the node's new light
will be the same as its old light was
2016-10-27 08:04:42 +02:00
Foghrye4 6eb6e75fff Adding LuaError on attempt to assign vectors with values out of range 2016-10-25 21:10:51 +02:00
Gael-de-Sailly 3db2f08ff9 ParticleSpawner: fix offset being added twice 2016-10-25 20:39:39 +02:00
adrido a1e1323d6e Windows: dont link to libraries that are already linked by cmake
This solves the problem whith building where build fails if the libaries have different names.
2016-10-25 13:54:24 +02:00
paramat 0c76303186 Damage flash: Reduce maximum alpha. Avoid fade overload
Flash alpha maximum is reduced from 180 to 127 to avoid player blindness
in combat. Flash alpha minimum is unchanged.
The 'damage_flash' value is now limited to max alpha, to avoid multiple
hits creating a huge value that causes flash to stay at maximum alpha
for a long period. Now alpha always starts to fade immediately after
taking damage.
Both problems can be seen in Minetest let's play videos.
Simplify and optimise some code.
2016-10-21 05:48:53 +01:00
paramat 63a3bb229a Changes to static object storage limit and error message
Move static object storage force-delete message from errorstream to
warningstream.
Increase 'max objects per block' setting to 64.
Add missing spaces in warning code.
2016-10-20 03:40:47 +01:00
Foghrye4 91250c1078 Fix crash on attaching player to entity
Rename "refresh" to "processInitData"
2016-10-19 08:40:43 +02:00
Lars Hofhansl a291cd6132 Revert changes to toggleNoClip and toggleFreeMove 2016-10-17 20:26:48 +02:00
Lars Hofhansl 3253b6bd22 Don't use day light sky unless noclip and free_move are enabled 2016-10-17 20:26:48 +02:00
ShadowNinja 2ff054d041 Enable mod security by default 2016-10-16 01:14:54 +01:00
Rogier 4b17105dc4 Emergeblocks: Fix occasional crash
Modification of the emergeblocks internal state was not protected
by a lock, causing a race condition.
This can be reproduced by repeatedly running emergeblocks for an
already-generated section of the map (with multiple emerge threads).
2016-10-16 01:13:16 +01:00
Lars Hofhansl 0ad40fd484 Use range-based fog instead of z-plane based. 2016-10-13 23:30:15 +02:00
raymoo c9e7a27eeb Attached particle spawners 2016-10-13 17:33:16 +02:00
sfan5 0b27a70b29 Don't use unordered maps for ProfilerGraph (fixes flickering) 2016-10-12 18:42:18 +02:00
Rogier a4a9ee94f3 Disable cmake message concerning WIN32 on non-windows systems 2016-10-11 07:29:04 +02:00
Loic Blot 1b450861f0 A little cleanup since previous commit 2016-10-09 16:31:43 +02:00
Loic Blot 70f104be07 Environment cleanup
* Move client list to ServerEnvironment and use RemotePlayer members instead of Player
* ClientEnvironment only use setLocalPlayer to specify the current player
* Remove ClientEnvironment dead code on player list (in fact other players are CAO not Player objects)
* Drop LocalPlayer::getPlayer(xxx) functions which aren't used.
* Improve a little bit performance by using const ref list for ClientEnvironment::getPlayerNames() & Client::getConnectedPlayerNames()
* Drop isLocal() function from (Local)Player which is not needed anymore because of previous changes

This change permits to cleanup shared client list which is very old code.
ClientEnvironment doesn't use player list anymore, it only contains the local player, as addPlayer is only called from Client constructor client side.
Clients are only CAO on client side, this cleanup permit to remove confusion about player list.
2016-10-09 15:17:10 +02:00