summaryrefslogtreecommitdiff
path: root/src/serverobject.h
Commit message (Collapse)AuthorAge
* Punchwear (improved) (#8959)sfan52019-09-22
|
* Wieldhand: Specify which ItemStack to use (#8961)SmallJoker2019-09-21
| | | Makes 'get_wield_item' to return the "main" ItemStack
* Unify wield item handling (#8677)SmallJoker2019-08-07
| | | | 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
* Correct ServerActiveObject's virtual getArmorGroups() to be const.Beha2019-08-01
| | | | | | Due to commit ec3142a , UnitSAO's getArmorGroups() did not match ServerActiveObject's, notably resulting in the lua get_armor_groups() call returning nothing.
* ContentCAO: Fix broken attachments on join (#8701)SmallJoker2019-07-29
| | | | | | | | | | | | | 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
* Consistent HP and damage types (#8167)SmallJoker2019-02-10
| | | | | Remove deprecated HUDs and chat message handling. Remove unused m_damage variable (compat break). HP: s32 for setter/calculations, u16 for getter.
* Fix C++11 violation that broke clang on Debian StretchPedro Gimeno2018-12-16
|
* Prevent objects from colliding with own child attachments (#7610)SmallJoker2018-08-05
| | | | | 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.
* Allow damage for attached objects, add attach/detach callbacks (#6786)SmallJoker2018-04-30
| | | * Allow right-clicking on attached LuaEntities
* Add reasons to on_dieplayer and on_hpchangeAndrew Ward2018-03-28
|
* ServerEnv: Clean up object lifecycle handling (#6414)sfan52017-09-15
| | | | * ServerEnv: Clean up object lifecycle handling
* Fix animation frame_speed and blend loosing precision due to incorrec… (#6357)sapier2017-09-01
| | | | | * 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
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)Loïc Blot2017-08-19
| | | | | | | | | | | * 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
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* ServerEnvironment::step: modernize loopsLoic Blot2017-08-11
| | | | | | Use various ranged-based for loops in ServerEnvironment::step Also set ServerObject::getBasePosition const to be compliant ServerEnvironment::deleteParticleSpawner: use a const iterator
* Cpp11 initializers: last src root changeset (#6022)Loïc Blot2017-06-21
| | | | | | * Cpp11 initializers: last src root changeset Finish to migrate all src root folder files to C++11 constructor initializers
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
|
* Revert "Detach the player from entities on death." (#5087)Loïc Blot2017-01-21
|
* Detach the player from entities on death. (#5077)red-0012017-01-21
|
* Fix missing const in ServerActiveObject::getStaticDataLoic Blot2017-01-14
| | | | | | This fixes #5033 Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
* Optimize SAO getStaticData by using std::string pointer instead of return copyLoic Blot2017-01-13
| | | | Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
* Performance fix + SAO factorizationRogier2017-01-11
| | | | | | | | | | 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>
* PlayerSAO/LocalPlayer refactor: (#4612)Ner'zhul2016-10-30
| | | | | | | | | | | | | | | | | * 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
* Attached particle spawnersraymoo2016-10-13
|
* Player/LocalPlayer/RemotePlayer inheritance cleanup (part 2 on X)Loic Blot2016-10-08
| | | | | | | * 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())
* Prevent attached models from disappearing during parent reload (#4128)Foghrye42016-10-08
|
* Fix invisible player when the attached entity is removedTeTpaAka2015-07-18
|
* Fix some issues with animations, and allow non-looped animations to be definedMirceaKitsune2015-06-22
|
* Fix typo in variable nameKahrl2015-05-28
|
* Add some missing getter functions to the lua APITeTpaAka2015-05-28
| | | | | | | | | | | | | | | | | | | | | | | 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
* Consistent const string paramsest312015-05-27
| | | | | Parent commit broke behaviour. Thanks @TeTpaAka for testing the fix.
* Remove Queue class which uses std::list and use native std::queueLoic Blot2015-03-05
|
* SAO: re-add old ActiveObjectTypes for a future migration layerLoic Blot2015-02-17
|
* SAO work: ActiveObject types & SAO cleanup * Replace u8 types with ↵Loic Blot2015-02-17
| | | | ActiveObjectType. * Merge content_object.h into activeobject.h * Remove DummyLoadSAO, it's now unused. * Remove ItemSAO, it's also unused
* Replace setting unlimited_player_transfer_distance with player_transfer_distanceSmallJoker2014-11-08
|
* Remove remenants of mob codePavel Puchkin2014-10-23
| | | | | | 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`.
* Allow modifying movement speed, jump height and gravity per-player via the ↵MirceaKitsune2013-04-05
| | | | Lua API.
* Migrate to STL containers/algorithms.Ilya Zhuravlev2013-03-11
|
* Update Copyright YearsSfan52013-02-24
|
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
|
* Full protocol 13 compatibility on server sidePerttu Ahola2012-11-29
|
* A bunch of fixesMirceaKitsune2012-11-25
| | | | | | | | | | | | 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
* Update attachments at the ending of the addToScene function for parents. And ↵MirceaKitsune2012-11-25
| | | | | | | | | | | | | | | | | | | | 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
* Framework for the attachment system, new object property which allows ↵MirceaKitsune2012-11-25
| | | | | | | | | | | | | | 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
* Get the new animation framework properly workingMirceaKitsune2012-11-25
| | | | | | Store start and end frames as v2f Also move bone animations to their own function instead of object properties
* Add dtime_s to entity activationPerttu Ahola2012-09-09
|
* Optimize headersPerttu Ahola2012-06-17
|
* Properly and efficiently use split utility headersPerttu Ahola2012-06-17
|
* Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola2012-06-05
| | | | GPLv2/later, by agreement of major contributors
* ObjectRef:set_armor_groups() and ObjectRef:set_properties() - works on ↵Perttu Ahola2012-03-30
| | | | players too!