aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
Commit message (Collapse)AuthorAge
* Remove profiler.h include where it's not needed. Remove some unreachable and ↵Loic Blot2015-07-21
| | | | very old code
* 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
|
* Ignore punches with no damage in the actionstreamSmallJoker2015-06-15
|
* Add minetest.register_on_player_hpchangeTeTpaAka2015-06-13
|
* 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
* Spare some string copiesest312015-05-27
|
* Generalize core.get/set_nametag_color into core.get/set_nametag_attributesTeTpaAka2015-05-15
|
* Add minetest.register_on_punchplayerBrandon2015-05-15
|
* Add get and set functions for the nametag colorTeTpaAka2015-05-15
|
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
| | | | | | | | | | | | Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
* Reset the old HP method on PlayerSAO::setHPLoic Blot2015-03-19
|
* For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins2015-03-07
| | | | NDEBUG is defined), replace those usages with persistent alternatives
* Remove Queue class which uses std::list and use native std::queueLoic Blot2015-03-05
|
* Send Position packet on event, don't check it at each AsyncRunStep.Loic Blot2015-03-04
| | | | * This permit to cleanup the player checking loop
* Send Inventory packet on event, don't check it at each AsyncRunStep.Loic Blot2015-03-04
| | | | | | * Call UpdateCrafting into SendInventory because this functions is only called before SendInventory * Use Player* instead of peer_id for UpdateCrafting because SendInventory already has the Player* pointer, then don't loop for searching Player* per peer_id * m_env_mutex don't need to be used with this modification because it's already locked before the calls
* Remove unused m_wielded_item_not_sentLoic Blot2015-03-03
|
* Send Breath packet on event, don't check it at each AsyncRunStepLoic Blot2015-03-03
|
* Send Player HP when setHP (or a setHP caller) is called instead of looping ↵Loic Blot2015-03-03
| | | | and testing the state change.
* 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
* Fix all warnings and remove -Wno-unused-but-set cflagkwolekr2015-01-18
|
* Replace setting unlimited_player_transfer_distance with player_transfer_distanceSmallJoker2014-11-08
|
* Split settings into seperate source and header filesShadowNinja2014-09-21
| | | | This also cleans up settings a bit
* Only keep players loaded while they're connectedShadowNinja2014-06-23
|
* Pass arguments by referenceSelat2014-03-12
|
* Add sneak and sneak_glitch to set_physics_override()PilzAdam2013-12-03
|
* Add offset to automatic_face_movement_dirPilzAdam2013-09-10
|
* Send player damage to all clients and apply [brightenPilzAdam2013-08-17
|
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
|
* Add support for entities to automatic face movement directionsapier2013-08-13
|
* Fix various memory access problems detected by valgrindKahrl2013-08-07
|
* Allow mods to listen to cheat detections using minetest.register_on_cheat()Perttu Ahola2013-08-04
|
* Fix anticheatPerttu Ahola2013-08-03
|
* Add support for setting stepheight for entitiessapier2013-07-30
|
* Add an option to disable object <-> object collision for Lua entitiesPilzAdam2013-07-20
|
* Add set_breath and get_breath to lua API.RealBadAngel2013-07-20
|
* Move scriptapi to separate folder (by sapier)sapier2013-05-25
| | | | | | | | | | | On the lua side, notably minetest.env:<function>(<args>) should now be replaced by minetest.<function>(<args>). The old way is and will stay supported for a long time. Also: Update and clean up lua_api.txt (by celeron55) Move EnvRef to lua and remove add_rat and add_firefly (by kahrl) Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
* Allow nil as puncher e.g. to do damage by tntsapier2013-05-20
|
* Move player collisionbox to player classsapier2013-04-25
|
* fix objects colliding with its own collision boxessapier2013-04-09
|
* Allow modifying movement speed, jump height and gravity per-player via the ↵MirceaKitsune2013-04-05
| | | | Lua API.
* New damage system, add damageGroups to ToolCapabilities, bump protocol versionPilzAdam2013-03-29
|
* Closed add object <-> object collision handlingsapier2013-03-28
|
* lua methods set_look_pitch and set_look_yawRealBadAngel2013-03-17
|
* Migrate to STL containers/algorithms.Ilya Zhuravlev2013-03-11
|
* Update Copyright YearsSfan52013-02-24
|
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
|
* Initialize all member variables of LuaEntitySAOPerttu Ahola2012-12-23
|
* Full protocol 13 compatibility on server sidePerttu Ahola2012-11-29
|
* Fix LuaEntitySAO::getClientInitializationData() and bump the related versionPerttu Ahola2012-11-26
|
>, ts, true) local elm = {by=ts, rsn=rsn, origin=origin} if not ilrs.rte_locks[pts] then ilrs.rte_locks[pts] = { elm } else table.insert(ilrs.rte_locks[pts], elm) end end -- adds route lock for position function ilrs.add_manual_route_lock(pts, rsn) local elm = {rsn=rsn} if not ilrs.rte_locks[pts] then ilrs.rte_locks[pts] = { elm } else table.insert(ilrs.rte_locks[pts], elm) end end -- frees route locking for all points (components) that were set by this ts function ilrs.free_route_locks(ts, lcks, nocallbacks) for _,pts in pairs(lcks) do ilrs.free_route_locks_indiv(pts, ts, nocallbacks) end end function ilrs.free_route_locks_indiv(pts, ts, nocallbacks) local e = ilrs.rte_locks[pts] if not e then return nil elseif #e==0 then ilrs.rte_locks[pts] = nil return nil end local i = 1 while i <= #e do if e[i].by == ts then --atdebug("free_route_locks_indiv",pts,"clearing entry",e[i].by,e[i].rsn) table.remove(e,i) else i = i + 1 end end -- This must be delayed, because this code is executed in-between a train step -- TODO use luaautomation timers? if not nocallbacks then minetest.after(0, ilrs.update_waiting, "lck", pts) end end -- frees all route locks, even manual ones set with the tool, at a specific position function ilrs.remove_route_locks(pts, nocallbacks) ilrs.rte_locks[pts] = nil -- This must be delayed, because this code is executed in-between a train step -- TODO use luaautomation timers? if not nocallbacks then minetest.after(0, ilrs.update_waiting, "lck", pts) end end local function sigd_equal(sigd, cmp) return vector.equals(sigd.p, cmp.p) and sigd.s==cmp.s end -- starting from the designated sigd, clears all subsequent route and route_post -- information from the track sections. -- note that this does not clear the routesetting status from the entry signal, -- only from the ts's function ilrs.cancel_route_from(sigd) -- we start at the tc designated by signal local c_sigd = sigd local c_tcbs, c_ts_id, c_ts, c_rseg, c_lckp while c_sigd do c_tcbs = ildb.get_tcbs(c_sigd) c_ts_id = c_tcbs.ts_id c_ts = ildb.get_ts(c_ts_id) if not c_ts or not c_ts.route or not sigd_equal(c_ts.route.entry, c_sigd) then return end c_ts.route = nil if c_ts.route_post then advtrains.interlocking.route.free_route_locks(c_ts_id, c_ts.route_post.locks) c_sigd = c_ts.route_post.next else c_sigd = nil end c_ts.route_post = nil minetest.after(0, advtrains.interlocking.route.update_waiting, "ts", c_ts_id) end end local asp_generic_free = { main = { free = true, speed = 100, }, shunt = { free = false, }, dst = { free = true, speed = 100, }, info = {} } -- TCBS Routesetting helper: generic update function for -- route setting function ilrs.update_route(sigd, tcbs, newrte, cancel) -- in general, always show danger signal tcbs.aspect = nil if (newrte and tcbs.routeset and tcbs.routeset ~= newrte) or cancel then if tcbs.route_committed then --atdebug("Cancelling:",tcbs.routeset) advtrains.interlocking.route.cancel_route_from(sigd) end tcbs.route_committed = nil tcbs.routeset = newrte tcbs.route_auto = nil end if newrte or tcbs.routeset then if newrte then tcbs.routeset = newrte end --atdebug("Setting:",tcbs.routeset) local succ, rsn, cbts, cblk = ilrs.set_route(sigd, tcbs.routes[tcbs.routeset]) if not succ then tcbs.route_rsn = rsn --atdebug("Routesetting failed:",rsn) -- add cbts or cblk to callback table if cbts then --atdebug("cbts =",cbts) if not ilrs.rte_callbacks.ts[cbts] then ilrs.rte_callbacks.ts[cbts]={} end advtrains.insert_once(ilrs.rte_callbacks.ts[cbts], sigd, sigd_equal) end if cblk then --atdebug("cblk =",cblk) if not ilrs.rte_callbacks.lck[cblk] then ilrs.rte_callbacks.lck[cblk]={} end advtrains.insert_once(ilrs.rte_callbacks.lck[cblk], sigd, sigd_equal) end else --atdebug("Committed Route:",tcbs.routeset) tcbs.route_committed = true tcbs.route_rsn = false tcbs.aspect = asp_generic_free end end advtrains.interlocking.update_signal_aspect(tcbs) end -- Try to re-set routes that conflicted with this point -- sys can be one of "ts" and "lck" -- key is then ts_id or pts respectively function ilrs.update_waiting(sys, key) --atdebug("update_waiting:",sys,".",key) local t = ilrs.rte_callbacks[sys][key] ilrs.rte_callbacks[sys][key] = nil if t then for _,sigd in ipairs(t) do --atdebug("Updating", sigd) -- While these are run, the table we cleared before may be populated again, which is in our interest. -- (that's the reason we needed to copy it) local tcbs = ildb.get_tcbs(sigd) if tcbs then ilrs.update_route(sigd, tcbs) end end end end advtrains.interlocking.route = ilrs