summaryrefslogtreecommitdiff
path: root/src/irr_v3d.h
Commit message (Collapse)AuthorAge
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* Clang-format: trivial fix on some headers (#5495)Loïc Blot2017-04-01
| | | Fix some headers style and remove them from whitelist
* SAPI/Noise: Add PerlinNoiseMap:getMapSlice() functionkwolekr2015-05-17
| | | | | | This adds the ability to grab 'slices' of noise calculated by PerlinNoiseMap. Retrieving smaller slices of noise from the computation result as needed optimizes memory usage while maintaining a reasonable amount of CPU overhead.
* Update Copyright YearsSfan52013-02-24
|
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
|
* Optimize headersPerttu Ahola2012-06-17
m"> Compound ("and") conjunctions are not supported (--TODO should they?) For editing, those tables are transformed into lines in a text area: {ln=...} -> LN ... {rc=...} -> RC ... {c=...} -> #... {default=true} -> * See also route_ui.lua ]] local il = advtrains.interlocking local function find_rtematch(routes, train) local default local line = train.line local routingcode = train.routingcode for rteid, route in ipairs(routes) do if route.ars then if route.ars.default then default = rteid else for arskey, arsent in ipairs(route.ars) do --atdebug(arsent, line, routingcode) if arsent.ln and line and arsent.ln == line then return rteid elseif arsent.rc and routingcode and string.find(" "..routingcode.." ", " "..arsent.rc.." ", nil, true) then return rteid end end end end end return default end function advtrains.interlocking.ars_check(sigd, train) local tcbs = il.db.get_tcbs(sigd) if not tcbs or not tcbs.routes then return end if tcbs.routeset then -- ARS is not in effect when a route is already set return end local rteid = find_rtematch(tcbs.routes, train) if rteid then --delay routesetting, it should not occur inside train step -- using after here is OK because that gets called on every path recalculation minetest.after(0, il.route.update_route, sigd, tcbs, rteid, nil) end end