76 Commits

Author SHA1 Message Date
MoNTE48
e98d421aff Merge remote-tracking branch 'upstream/stable-0.4' into sync 2019-04-01 20:18:54 +02:00
Loic Blot
8474e543a0 More C++03 fixes 2018-06-03 17:32:00 +02:00
sfan5
8e3a110314 ServerEnv: Clean up object lifecycle handling (#6414)
* ServerEnv: Clean up object lifecycle handling
2018-06-03 17:31:59 +02:00
Maksim Gamarnik
35770f4abb Merge Minetest 0.4.16 2017-06-06 23:03:34 +03:00
Maksim Gamarnik
e05f7db82f Updated to Minetest ver. 0.4.15 2017-01-30 00:44:07 +02:00
Loïc Blot
576308cb1d Revert "Detach the player from entities on death." (#5087) 2017-01-21 17:30:55 +01:00
red-001
9f6e715c65 Detach the player from entities on death. (#5077) 2017-01-21 16:11:55 +01:00
Loic Blot
08ecdc7304 Fix missing const in ServerActiveObject::getStaticData
This fixes #5033

Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
2017-01-14 12:03:50 +01:00
Loic Blot
c808bc4a39 Optimize SAO getStaticData by using std::string pointer instead of return copy
Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
2017-01-13 21:56:24 +01:00
Rogier
1386ba186e Performance fix + SAO factorization
Original credits goes to @Rogier-5

* Merge common attributes between LuaEntitySAO & PlayerSAO to UnitSAO
* Make some functions const
* Improve some lists performance by returning const ref

Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
2017-01-11 15:53:56 +01: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
d28e980e7c Player/LocalPlayer/RemotePlayer inheritance cleanup (part 2 on X)
* Server/Client Environments now have an helper to cast Player object in the right type to use it
* Server: use RemotePlayer everywhere and remove previous added casts
* Client: use LocalPlayer where needed
* Environment: remove unused functions (getPlayers(), getRandomConnectedPlayer(), getNearestConnectedPlayer())
2016-10-08 15:57:50 +02:00
Foghrye4
5f714c5c6f Prevent attached models from disappearing during parent reload (#4128) 2016-10-08 14:51:25 +02:00
Maksim Gamarnik
919be490f9 Update
Sync all Minetest commits
2015-11-10 13:49:24 +02:00
Maksim Gamarnik
9247f32e0e LGPL 2.1 to 3.0 on all files 2015-08-14 01:26:28 +03:00
TeTpaAka
1c520f2f20 Fix invisible player when the attached entity is removed 2015-07-18 07:41:43 +02:00
MirceaKitsune
ee7dfd7ba0 Fix some issues with animations, and allow non-looped animations to be defined 2015-06-22 01:53:38 +02:00
Kahrl
9145102b81 Fix typo in variable name 2015-05-31 23:21:47 +10:00
TeTpaAka
76c89a3f84 Add some missing getter functions to the lua API
ObjectRef:
get_properties
get_armor_groups
get_animation
get_attach
get_bone_position

Players:
get_physics_override
hud_get_hotbar_itemcount
hud_get_hotbar_image
hud_get_hotbar_selected_image
get_sky
get_day_night_ratio
get_local_animation
get_eye_offset

Global:
minetest.get_gen_notify
minetest.get_noiseparams
2015-05-31 23:21:45 +10:00
est31
988cc2f658 Consistent const string params
Parent commit broke behaviour.
Thanks @TeTpaAka for testing the fix.
2015-05-31 23:21:43 +10:00
Kahrl
dd8360391d Fix typo in variable name 2015-05-28 20:47:15 +02:00
TeTpaAka
4573eef202 Add some missing getter functions to the lua API
ObjectRef:
get_properties
get_armor_groups
get_animation
get_attach
get_bone_position

Players:
get_physics_override
hud_get_hotbar_itemcount
hud_get_hotbar_image
hud_get_hotbar_selected_image
get_sky
get_day_night_ratio
get_local_animation
get_eye_offset

Global:
minetest.get_gen_notify
minetest.get_noiseparams
2015-05-28 16:46:35 +02:00
est31
5dca9148ab Consistent const string params
Parent commit broke behaviour.
Thanks @TeTpaAka for testing the fix.
2015-05-27 13:23:09 +02:00
Loic Blot
1186245881 Remove Queue class which uses std::list and use native std::queue 2015-03-05 16:49:51 +10:00
Loic Blot
bde70b6d78 SAO: re-add old ActiveObjectTypes for a future migration layer 2015-02-17 11:37:55 +01:00
Loic Blot
1905f12b61 SAO work: ActiveObject types & SAO cleanup * Replace u8 types with ActiveObjectType. * Merge content_object.h into activeobject.h * Remove DummyLoadSAO, it's now unused. * Remove ItemSAO, it's also unused 2015-02-17 09:09:50 +01:00
SmallJoker
98e648368f Replace setting unlimited_player_transfer_distance with player_transfer_distance 2014-11-08 14:56:09 +01:00
Pavel Puchkin
ff49416daa Remove remenants of mob code
Since minetest has no mobs within the core anymore, I suppose these
settings and code should go. Any mod that uses `minetest.setting_getbool`
will work with no problem since the default return value is `false`.
2014-10-23 20:54:33 -04:00
MirceaKitsune
ad16c90acf Allow modifying movement speed, jump height and gravity per-player via the Lua API. 2013-04-05 02:00:59 +02:00
Ilya Zhuravlev
a12df55f29 Migrate to STL containers/algorithms. 2013-03-11 19:08:39 -04:00
Sfan5
3fab3825aa Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam
269f01224b Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Perttu Ahola
10014bbd62 Full protocol 13 compatibility on server side 2012-11-29 22:08:25 +02:00
MirceaKitsune
348ceb211f A bunch of fixes
No longer hide players who are dead. With models, a death animation should be used instead

Some changes requested by celeron55

Rename a lot of things in the code, and use better lua api function names

Minor code corrections

Bump protocol version up, since the models / animations / attachments code creates new client<->server messages
2012-11-25 19:14:24 +02:00
MirceaKitsune
987a4e06dc Update attachments at the ending of the addToScene function for parents. And with this... *drum roll* Client-side attachments are at last functional and stick visibly.
Fix the last segmentation fault (apparently). So far attachments seem to be fully functional, although removing the parent causes children to go to origin 0,0,0 and possibly still cause such a fault (though this should already be addressed)

Fix a bug in falling code where entities get stuck

Also check if the parent has been removed server-side, and detach the child if so. Fixes children going to origin 0,0,0 when their parent is removed.

Unset all attachment properties when permanently detaching (on both the client and server). Also store less data we don't need

Create a separate function for detaching, and also update lua api documentation

When a child is detached, update its position from the server to clients. This WILL cause it to get positioned slightly differently client side, as the server attachment system only copies parent origin and knows not about mesh / bone transformation. This prevents different clients seeing the object detached in different spots which is most correct

Update the position of attached players to clients. An attached player will see himself move, but this is currently VERY ugly and laggy as it is done by the server (it probably must stay this way too)

Use a different approach for locally attached players. This allows for smooth positio transitions to work, as well at the player turning around freely. Still buggy however
2012-11-25 19:14:24 +02:00
MirceaKitsune
3eaa0a2ace Framework for the attachment system, new object property which allows changing the color and alpha of mesh materials
New object property which allows changing the color and alpha of mesh materials. Due to the current lighting systems it doesn't work yet, but the full implementation is there

Framework for the attachment system, with no actual functionality yet

Send bone and player object to the setAttachment function in content_sao.cpp, but we need a way to translate it there and send it to the client

I will also want position and rotation offsets to be possible to apply to attachments

Network object ID from server to client. This will be used to identify the parent client-side and know what to attach to
2012-11-25 18:14:15 +02:00
MirceaKitsune
8548860fec Get the new animation framework properly working
Store start and end frames as v2f

Also move bone animations to their own function instead of object properties
2012-11-25 18:14:15 +02:00
Perttu Ahola
06850bceac Add dtime_s to entity activation 2012-09-09 17:12:29 +03:00
Perttu Ahola
ede1480ae9 Optimize headers 2012-06-17 04:03:39 +03:00
Perttu Ahola
ec937ecdd8 Properly and efficiently use split utility headers 2012-06-17 02:40:36 +03:00
Perttu Ahola
e70b6545b1 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00
Perttu Ahola
0f0e3a6b90 ObjectRef:set_armor_groups() and ObjectRef:set_properties() - works on players too! 2012-03-30 13:34:21 +03:00
Perttu Ahola
c960ed9f90 Add GenericCAO and player armor groups, but don't use them yet 2012-03-29 16:10:11 +03:00
Kahrl
bbb2502894 added PlayerSAO and RemotePlayer, removed ServerRemotePlayer 2012-03-29 14:05:45 +03:00
Perttu Ahola
e9cdb938fe Entity damage system WIP; Remove C++ mobs 2012-03-10 11:28:13 +02:00
Giuseppe Bilotta
64af6d3afe Fix some warnings on some compilers
ItemStack is a struct, not a class
CollisionInfo is a struct, not a class
InventoryAction is abstract and it needs a virtual destructor
2012-02-02 15:54:20 +02:00
Kahrl
6a76c226e1 The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef 2012-01-12 06:10:39 +01:00
Perttu Ahola
e4daa4c065 Make players be again visible from a long distance 2011-12-02 01:08:14 +02:00
Perttu Ahola
af32240545 Players are more like objects + related stuff 2011-12-01 23:33:48 +02:00