aboutsummaryrefslogtreecommitdiff
path: root/src/serverobject.h
AgeCommit message (Collapse)Author
2020-04-11Move serveractiveobject & unitsaoLoic Blot
Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h} Move UnitSAO class to dedicated files
2020-04-10Drop genericobject.{cpp,h} (#9629)Loïc Blot
* Drop genericobject.{cpp,h} This file is not for generic object but for ActiveObject message passing. Put ownership of the various commands to the right objects and cleanup the related code. * Protect ServerActiveObject::m_messages_out * typo fix
2019-09-22Punchwear (improved) (#8959)sfan5
2019-09-21Wieldhand: Specify which ItemStack to use (#8961)SmallJoker
Makes 'get_wield_item' to return the "main" ItemStack
2019-08-07Unify wield item handling (#8677)SmallJoker
This moves the wield item functions to Player and the tool utils for range calculation Also 'local_inventory' was removed due to redundancy in Client
2019-08-01Correct ServerActiveObject's virtual getArmorGroups() to be const.Beha
Due to commit ec3142a , UnitSAO's getArmorGroups() did not match ServerActiveObject's, notably resulting in the lua get_armor_groups() call returning nothing.
2019-07-29ContentCAO: Fix broken attachments on join (#8701)SmallJoker
What happened: 1) Object data is received. Client begins to read the data 2) Client initializes all its children (gob_cmd_update_infant) 3) Children try to attach to parent (yet not added) 4) Parent initializes, is added to the environment And somewhere in between, Irrlicht wrecks up the attachments due to the missing matrix node. The solution here is to: 1) Use the same structure as ServerActiveObject 2) Attach all children after the parent is really initialized
2019-02-10Consistent HP and damage types (#8167)SmallJoker
Remove deprecated HUDs and chat message handling. Remove unused m_damage variable (compat break). HP: s32 for setter/calculations, u16 for getter.
2018-12-16Fix C++11 violation that broke clang on Debian StretchPedro Gimeno
2018-08-05Prevent objects from colliding with own child attachments (#7610)SmallJoker
Also, use a better distance calculation for 'collide with objects'. Fixes the issue of a vehicle occasionally colliding with its own driver, causing one of the velocity components to be set to zero.
2018-04-30Allow damage for attached objects, add attach/detach callbacks (#6786)SmallJoker
* Allow right-clicking on attached LuaEntities
2018-03-28Add reasons to on_dieplayer and on_hpchangeAndrew Ward
2017-09-15ServerEnv: Clean up object lifecycle handling (#6414)sfan5
* ServerEnv: Clean up object lifecycle handling
2017-09-01Fix animation frame_speed and blend loosing precision due to incorrec… (#6357)sapier
* Fix animation frame_speed and blend loosing precision due to incorrect data type Add lua function set_animation_frame_speed to update the frame speed without resetting the animation to start
2017-08-19Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)Loïc Blot
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-08-11ServerEnvironment::step: modernize loopsLoic Blot
Use various ranged-based for loops in ServerEnvironment::step Also set ServerObject::getBasePosition const to be compliant ServerEnvironment::deleteParticleSpawner: use a const iterator
2017-06-21Cpp11 initializers: last src root changeset (#6022)Loïc Blot
* Cpp11 initializers: last src root changeset Finish to migrate all src root folder files to C++11 constructor initializers
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-01-21Revert "Detach the player from entities on death." (#5087)Loïc Blot
2017-01-21Detach the player from entities on death. (#5077)red-001
2017-01-14Fix missing const in ServerActiveObject::getStaticDataLoic Blot
This fixes #5033 Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
2017-01-13Optimize SAO getStaticData by using std::string pointer instead of return copyLoic Blot
Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
2017-01-11Performance fix + SAO factorizationRogier
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>
2016-10-30PlayerSAO/LocalPlayer refactor: (#4612)Ner'zhul
* 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-13Attached particle spawnersraymoo
2016-10-08Player/LocalPlayer/RemotePlayer inheritance cleanup (part 2 on X)Loic Blot
* 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-08Prevent attached models from disappearing during parent reload (#4128)Foghrye4
2015-07-18Fix invisible player when the attached entity is removedTeTpaAka
2015-06-22Fix some issues with animations, and allow non-looped animations to be definedMirceaKitsune
2015-05-28Fix typo in variable nameKahrl
2015-05-28Add some missing getter functions to the lua APITeTpaAka
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-27Consistent const string paramsest31
Parent commit broke behaviour. Thanks @TeTpaAka for testing the fix.
2015-03-05Remove Queue class which uses std::list and use native std::queueLoic Blot
2015-02-17SAO: re-add old ActiveObjectTypes for a future migration layerLoic Blot
2015-02-17SAO work: ActiveObject types & SAO cleanup * Replace u8 types with ↵Loic Blot
ActiveObjectType. * Merge content_object.h into activeobject.h * Remove DummyLoadSAO, it's now unused. * Remove ItemSAO, it's also unused
2014-11-08Replace setting unlimited_player_transfer_distance with player_transfer_distanceSmallJoker
2014-10-23Remove remenants of mob codePavel Puchkin
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`.
2013-04-05Allow modifying movement speed, jump height and gravity per-player via the ↵MirceaKitsune
Lua API.
2013-03-11Migrate to STL containers/algorithms.Ilya Zhuravlev
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2012-11-29Full protocol 13 compatibility on server sidePerttu Ahola
2012-11-25A bunch of fixesMirceaKitsune
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-25Update attachments at the ending of the addToScene function for parents. And ↵MirceaKitsune
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-25Framework for the attachment system, new object property which allows ↵MirceaKitsune
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-25Get the new animation framework properly workingMirceaKitsune
Store start and end frames as v2f Also move bone animations to their own function instead of object properties
2012-09-09Add dtime_s to entity activationPerttu Ahola
2012-06-17Optimize headersPerttu Ahola
2012-06-17Properly and efficiently use split utility headersPerttu Ahola