See if this helps smooth out performance
issues in 5.3+. It was never confirmed to
increase the number of ABMs we were able
to successfully process anyway.
Detect ABMs that share the same "signature"
except for the central nodenames, and use a
single ABM to run them, looking up the core
bodies to run based on nodename on the Lua
side. This could reduce the total number of
ABMs we're using by almost half, and
mitigate some of the performance issues
that MT continues to have with ABMs.
By restricting the recipes we check based
on the name of the central object being
checked, we can do many fewer craft
checks per item and avoid expensive
checks.
When unlaundered ABMs run, give the
laundered ABM pump a rest for 1 tick, to
ensure we don't run 2 batches worth of
ABMs on any 1 tick, to smooth things out.
Instead of using 20% of CPU time to run
ABMs, defer 75% of them, so we are using
20% time to run 20% ABMs plus defer
a further 60%, giving us a total of roughly
80% CPU time for ABMs (not factoring in
overhead).
This should let us work around the engine's
hardcoded 20% ABM limit.
- New Delayed Node Trigger API that allows
the use of multiple externally-defined node
timer events, as long as on_timer of a node
is not explicitly overridden.
- Use the new DNT system to make door
ablation reliable.
Suggested by oilboi to make the swimming eye
height match the model anim. There is a bit of
jank switching between swimming and standing
height, but it doesn't seem to be too bad, and it
makes players have to actually break the
surface to breathe, and makes swimming a little
less bizarre in 3rd person view.
- There was never any real proof that the
limiting mechanism was necessary, and if it is,
it may be better to use it sparingly.
- We suspect this may be complicit in some
serious issues, such as door ablation failures.
- Despite 2 different revisions of the code,
limited abms have never worked reliably.
- Instead of fixed count limits, either dynamic
or time-based limits would be better.
Before, ABM firing was delayed by up to a full
interval, but the fulfillment timer could wander
around relative to the trigger, which could lead
to unreliable door ablation.
Instead, just always run the ABM fulfilment
triggers on the next tick, so limted_abm is
ONLY doing the limiting for events that arrive
within the same tick, as most ABMs do.
- Players no longer constantly glow in darkness.
- Players can now place light spots by scaling, faster
than actual climbing spots.
- Climbing spots appear if player continues placement
after light appears.
- Floor traversal mechanism is now obsolete.
This allows players to traverse dark caves reasonably
well, still, but only voluntarily, so darkness stealth
mechanics are possible again.
If the node we want to place dynamic light in is occupied (e.g.
player is inside a ladder node space) then allow placement on one
of the 6 face-touching spaces. This makes dynamic lights work
correctly on most ladders, and may fix other similar situations.