aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
AgeCommit message (Collapse)Author
2020-04-11Drop content_sao.{cpp,h}Loic Blot
Move LuaEntitySAO to a new dedicated file Drop TestSAO (useless object) Drop the old static startup initialized SAO factory, which was pretty useless. This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
2020-04-11Move PlayerSAO to dedicated filesLoic Blot
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
2020-04-08Overall improvements to log messages (#9598)sfan5
Hide some unnecessarily verbose ones behind --trace or disable them entirely. Remove duplicate ones. Improve their contents in some places.
2020-03-05Fixes around ServerActiveObject on_punch handlingsfan5
2020-02-11Script API: Check that SAOs are still usable before attempting to use themsfan5
2020-01-22Remove unused weight property from objects (#9320)Wuzzy
2019-10-29Change some usages of "deprecated" to "obsolete" (#9062)random-geek
"Deprecated" means that something is still in use, but is unsupported and needs to be removed. "Obsolete" means it is already out of use.
2019-10-02Attachments: Fix attachments to temporary removed objects (#8989)SmallJoker
Does not clear the parent's attachment information when the child is deleted locally. Either it was removed permanently, or just temporary - we don't know, but it's up to the server to send a *detach from child" packet for the parent.
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-10Merge pull request #8776 from osjc/FixGetNodeJozef Behran
Finish getNode cleanup
2019-08-10Implement adding velocity to player from Luasfan5
The intended usecase is knockback, but there's potential for more.
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-01Group "immortal" also protects players from damageWuzzy
Document new meaning of immortal=1 for players Disable breathing if player is immortal Hide builtin statbars if player immortal (delayed) Co-authored-by: ClobberXD <ClobberXD@gmail.com>
2019-07-30Move the clamping of hp/breath when their maximums change to ↵Beha
read_object_properties(). (#8689) This prevents set_properties() calls that have nothing to do with hp_max or breath_max overriding the saved hp before another mod has the chance to set a player's intended hp_max (such as in on_joinplayer).
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-06-09Damage: Play no damage sound when immortal (#8350)SmallJoker
Add isImmortal server-side for proper enable_damage handling Rework log messages
2019-04-29PlayerSAO::setHP - Don't call on_hpchange callbacks if HP hasn't changedANAND
2019-04-28Force send a mapblock to a player (#8140)sofar
* Force send a mapblock to a player. Send a single mapblock to a specific remote player. This is badly needed for mods and games where players are teleported into terrain which may be not generated, loaded, or modified significantly since the last player visit. In all these cases, the player currently ends up in void, air, or inside blocks which not only looks bad, but has the effect that the player might end up falling and then the server needs to correct for the player position again later, which is a hack. The best solution is to send at least the single mapblock that the player will be teleported to. I've tested this with ITB which does this all the time, and I can see it functioning as expected (it even shows a half loaded entry hallway, as the further blocks aren't loaded yet). The parameter is a blockpos (table of x, y, z), not a regular pos. The function may return false if the call failed. This is most likely due to the target position not being generated or emerged yet, or another internal failure, such as the player not being initialized. * Always send mapblock on teleport or respawn. This avoids the need for mods to send a mapblock on teleport or respawn, since any call to `player:set_pos()` will pass this code.
2019-04-27Range-limit value passed to PlayerSAO::set{HP|Breath} (#8264)ANAND
2019-04-14Attend to review, re-arrange blank lines, update lua_api.txtparamat
2019-04-14Fix regression in automatic_face_movement_max_rotation_per_secPedro Gimeno
Values <= 0 should make the yaw change instant. This worked in 0.4.16 but was broken in 089f59458286. Per bug report by oil_boi_minetest on IRC.
2019-04-11Add node field to PlayerHPChangeReason table (#8368)Paul Ouellette
2019-02-15Don't regain breath while in ignore node (#8218)Wuzzy
* Don't regain breath while in ignore node Fixes #8217
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.
2019-01-03Proselytize the network. Use IEEE F32 (#8030)SmallJoker
* Proselytize the network. Use IEEE F32 * Remove unused V2F1000 functions
2018-12-23Fix entity rotation in existing worlds (#7989)SmallJoker
2018-12-05Fix player rotations (#7941)CoderForTheBetter
2018-11-28Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)CoderForTheBetter
* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
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-08-02Smoothed yaw rotation for objects (#6825)SmallJoker
2018-07-08Revert 6587 - Optimize entity-entity collision (#7539)lhofhansl
2018-05-14Fix segfault in player migration and crash in log_deprecatedSmallJoker
Makes log_deprecated work when triggered from no function
2018-04-30Allow damage for attached objects, add attach/detach callbacks (#6786)SmallJoker
* Allow right-clicking on attached LuaEntities
2018-04-15FOV: Raise lower limit to avoid zoom-loading of distant world (#7234)Paramat
In the client, raise lower limit from 30 to 45 degrees, to avoid server seeing this as a zoom and loading world beyond the server-set limit. Add minimum in settingtypes.txt and enforce lower limit when set using minetest.conf. In the server, distrust the client-sent FOV if below the heuristic zoom threshold and use the player object property 'zoom_fov' to check it, to protect against hacked clients.
2018-04-06Fix SAOM (#7200)Vitaliy
* Bugfix
2018-04-03Fix various clang-tidy reported performance-type-promotion-in-math-fnLoïc Blot
2018-04-03Optimize entity-entity collision (#6587)Vitaliy
* Add IrrLicht type aliases * Add hash for IrrLicht vector * Add object map
2018-03-29Optional alpha channel support for entitiesstujones11
2018-03-29Fix a warning introduced by c5b4e541749c50805519ce040d98a0a8e5e0ec03Loic Blot
2018-03-28Add reasons to on_dieplayer and on_hpchangeAndrew Ward
2018-02-26SAO limits: Allow SAOs to exist outside the set 'mapgen limit'paramat
2018-02-02Refine movement anticheat again (#7004)sfan5
* Account for walking speed in vertical dir * Avoid undefined behaviour due to division-by-zero
2018-01-28Apply physics overrides correctly during anticheat calculations (#6970)sfan5
2017-12-04Zoom: Set zoom FOV per-player using a player object propertyparamat
Remove player object property 'can zoom'. Add player object property 'zoom fov'. Remove clientside setting for 'zoom fov'. Object property default is 15 degrees in creative mode, zoom disabled in survival mode. Needed due to zoom now loading and/or generating distant world according to zoom FOV. Update object properties serialisation version to 3.
2017-12-01CAO/SAO: Nicer velocity-controlled, interpolated rotation property:SmallJoker
'automatic_face_movement_max_rotation_per_sec'. Rotate towards the smaller angle.
2017-11-14PlayerSAO damage: Update to cope with variable player heightsparamat
Nearby codestyle cleanup.
2017-11-06Player eye height: Make this a settable player object propertyparamat