rationale:
* it's just boilerplate, as these just fill out the structs. can also be done at call site
* they are usually only called at one place
* it would lead to many includes (or at least forward defs) in sscsm_controller.h and
sscsm_environment.h
20 us was the value, firefox used as first response to the spectre attacks.
now it's 100 us or 5 us, depending on whether it's "cross-origin isolated".
we only have one origin, so choosing 20 us is probably fine, I guess
see also:
https://www.mozilla.org/en-US/security/advisories/mfsa2018-01/https://developer.mozilla.org/en-US/docs/Web/API/Performance/now#security_requirements
other clocks:
* os.time() and os.date() only have seconds precision, AFAIK.
* dtime is only given once per step, so it's not useful
* there might be other ways to build clocks (if we get async envs for sscsm,
with a busy loop, for example)
tostring({}) and string.format("%s", {}) give you pointers.
(see lj_strfmt_obj)
this is not very critical, but attacks could be made harder if we change this.
the effort of overwriting is not worth it I think right now
Shortening the peer timeout was supposedly necessary at some point
to work around an unknown bug. I was not able to reproduce the bug
running a headless Luanti server on WSL Tumbleweed and connecting with
a client on the Windows host. That is not enough to say the issue no
longer exists. This commit may cause a regression.
The access to change the peer timeout was unsynchronized and done by a
different thread than the sending thread, so it was detected by TSan to
be a data race. Since this patch deletes the code performing the write,
the data race is no longer a concern and no synchronization must be
added.
Fixes issues related to combining animated and world-aligned textures.
Changes texture coordinates of cuboid drawtypes to stay in the [0,1] range, instead of carrying the mapblock alignment and becoming negative after transformations.
The setting 'gui_scaling_filter = true' previously broke 9-slice images.
With this change, custom button background images now scale the same as
backgrounds created using 'background9[...]' (9-slice images).
Second try after the revert in 8a28339 due to an unexpected regression.
- Rigidly animated models (e.g. the glTF frog node) were not working correctly,
since cloning the mesh ignored the transformation matrices.
Note that scaling the mesh needs to occur *after* transforming the vertices.
- Visual scale did not apply to skinned models,
as resetting the animation overwrote scaled vertex data with static positions & normals.
For backwards compatibility, we now apply a 10x scale to static, non-glTF models.
We now do scale static meshes, as the bug that caused meshes not to be scaled was limited to skeletally animated meshes,
hence we ought not to reproduce it for skinned meshes that do not take advantage of skeletal animations (e.g. current MTG doors).
However, glTF models (e.g. Wuzzy's eyeballs) up until recently were always affected due to technical reasons
(using skeletal animation for rigid animation).
Thus, to preserve behavior, we:
1. Do not apply 10x scale to glTF models.
2. Apply 10x scale to obj models.
3. Apply 10x scale to static x or b3d models, but not to animated ones.
See also: #16141
The error was caused by fd857374, where 'MenuQuit' was processed after 'try_quit'.
This commit fixes the error by moving the special 'MenuQuit' handling to Lua.