1467 Commits

Author SHA1 Message Date
Aaron Suen
e5385bca3a Update all notes from Discord. 2020-05-29 09:20:40 -04:00
Aaron Suen
856eadcafc Prevent NodeCore being loaded on top of another game
Apparently some users have had problems installing NodeCore because
they assumed it was a modpack and just copied the mods/* into
~/.minetest/mods and enabled them in an MTG game world.  The result
apparently didn't immediately crash but wasn't really playable
either.

Detect NodeCore being combined with a mod named "default" and
throw an error immediately.  This should catch like 90% of the
games out there.  Some like LoTT or IKEA don't use a default, but
they're also not the ones that players would naively try to run
arbitrary mods on top of.
2020-05-27 07:00:13 -04:00
Aaron Suen
4426bd6a6c Get rid of old debug code. 2020-05-27 01:13:02 -04:00
Aaron Suen
8a04c5163b Make damage touch ignore non-pointables 2020-05-26 20:52:54 -04:00
Aaron Suen
2625f61fd1 Make light_source ents themselves glow 2020-05-26 19:43:09 -04:00
Aaron Suen
05abaf3199 Fix invisible players casting light 2020-05-26 19:32:15 -04:00
Aaron Suen
b1584290a8 Fix light overlap, torch fading in lode crate 2020-05-26 19:26:08 -04:00
Aaron Suen
2c85ee9a81 Unreorder a small calc 2020-05-26 19:07:28 -04:00
Aaron Suen
9865abd2ba Visinvs can cast dynamic light too, given space 2020-05-26 19:06:20 -04:00
Aaron Suen
533d8f3360 Remove old dead torch globalstep hook
This has now been replaced entirely by dynamic lighting and AISMs
2020-05-26 18:49:09 -04:00
Aaron Suen
55efdfa027 Fire ambiance consolidation
- Fire flame and torch flame use the same ambiance def via
  a new flame_ambiance group.
- Items can now emit ambiance via AISM.
2020-05-26 18:48:03 -04:00
Aaron Suen
63d9c3fdec Allow dynamic light displacement
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.
2020-05-26 18:46:06 -04:00
Aaron Suen
620e7c09a4 Change dynamic light API, smoother under lag?
Instead of registering the TTL for a light and expecting
more time to be pushed in, use a fixed TTL of 0.25s and
register a callback to check if the light is still valid, i.e.
lights now pull time as necessary.

This should prevent light flickering that can happen
under heavy server lag, i.e. when the time step is
wider than the dynamic light TTL.

Lights that don't register a callback will be ephemeral,
and will disappear after 0.25 seconds, which can be
used to increase the chance that the server has had an
opportunity to move the light, as per torch destructor.
2020-05-26 07:50:57 -04:00
Aaron Suen
11438a1625 Deprecate ent_prop_set() method 2020-05-25 11:43:51 -04:00
Aaron Suen
e7f6afd789 More entity property setting reforms
- Move comparison check into object metatable so
  it applies to all naive set_properties() calls.  This
  should help catching it in downstream mods.
- Remove sprite property filtering.  It seems the issue
  was actually caused by a 2D/3D vector
  disagreement between caller and property def,
  which the hack wouldn't have fixed for sprite-type
  visuals anyway; it only actually helped in the current
  code because the only entities trying to set them to
  3D vectors in the first place were non-sprite.
2020-05-25 11:27:20 -04:00
Aaron Suen
28f8e0f229 Add MT bug 9934 to wishlist 2020-05-25 10:35:40 -04:00
Aaron Suen
bb76463e77 Guard against future sprite prop noise
MT apparently internally ignores sprite properties on
entities that are not using a sprite visual, and returns
dummy values, rather than preserving what was sent
in, on get_properties().

Guard against set_property() noise on future/mod
calls explicitly rather than relying on the caller not
sending these props in when not applicable.
2020-05-25 09:57:28 -04:00
Aaron Suen
7fd4e3dc16 Don't set sprite props on non-sprite visuals 2020-05-25 09:49:06 -04:00
Aaron Suen
39cf68a575 Speed up objects_at_pos (in theory) 2020-05-25 00:00:40 -04:00
Aaron Suen
b4bf537513 Skip visinv checks for empty stacks 2020-05-24 23:18:33 -04:00
Aaron Suen
424e53d6c4 Document bug in wishlist. 2020-05-23 09:11:36 -04:00
Aaron Suen
a92ea48cca Merge branch 'master' into dev 2020-05-23 09:02:24 -04:00
Aaron Suen
de8e409033 Try to work around MT segfault (#9916)
The MT client crashes sometimes when trying to do a
lighting calc on upright_sprite entity visuals.

This may or may not be fixed in a future release, since it's
a heisenbug and a rare use-case, so for now try to
eliminate use of the rare and poorly supported upright_sprite
visual type by making empty inventory slots craftitem extrude
meshes.

As a limitation, for now, virtual_items such as injury or
lux burns will be invisible instead of showing the icon, as
we can't swap out the texture like we could for upright_sprite.
2020-05-23 09:02:18 -04:00
Aaron Suen
f834f8a860 Rakes should be flammable
How did we miss that for so long...?
2020-05-23 09:02:07 -04:00
Aaron Suen
6147a11de6 Try to work around MT segfault (#9916)
The MT client crashes sometimes when trying to do a
lighting calc on upright_sprite entity visuals.

This may or may not be fixed in a future release, since it's
a heisenbug and a rare use-case, so for now try to
eliminate use of the rare and poorly supported upright_sprite
visual type by making empty inventory slots craftitem extrude
meshes.

As a limitation, for now, virtual_items such as injury or
lux burns will be invisible instead of showing the icon, as
we can't swap out the texture like we could for upright_sprite.
2020-05-23 08:59:16 -04:00
Aaron Suen
c2fab4b12d Rakes should be flammable
How did we miss that for so long...?
2020-05-22 15:34:39 -04:00
Aaron Suen
a35413ad2a Remove distance from player names 2020-05-22 08:21:42 -04:00
Aaron Suen
ab357c57ca Players lose runnig speed if stuck
This prevents the "running up a ladder"
exploit, and adds a bit of realism.

This MAY cause problems for players who
have sufficiently crappy network, so
hopefully the liberal stuck time of 2 full
seconds is enough.  Players with that much
latency probably can't pummel, so probably
can't play anyway.
2020-05-22 07:45:27 -04:00
Aaron Suen
fe23c34208 Player buoyancy fixes/refinements
- Nerf effect by 50% to be less disruptive
- Effect can be avoided by not being in a
  swimming position (matching model anim)
- Refactor swimming check into API
- Special checking and handling for linkdead
  players, for whom client knockback
  wouldn't work anyway.
2020-05-22 07:30:12 -04:00
Aaron Suen
c6cf1f9cb6 Players float when idle in water
This is done rather hackishly, but Minetest doesn't
seem to offer a sane way to register fluid buoyancy, or
even a reasonable hack to use negative gravity for this.
Instead, just push player upward with velocity impulses
every so often.

This is helpful gameplay-wise to make chatting while
swimming easier for players not using auto-forward, or
to prevent players from drowning and losing their stuff
while swimming long-distance and dropping network
connection and their in-game character waiting in the
water for the timeout.  Instead, players will return to the
surface and remain where they can breathe until the
player can take control again.
2020-05-18 20:49:30 -04:00
Aaron Suen
9c9eb4b85a Guard against dummy objects in 5.3+
Some time in the 5.3 dev stream (docs updated at
217f3a42), object refs started being invalidated
immediately on calling obj:remove(), such that
obj:get_pos() starts to return nil instead of the object's
last known position.

This can cause some crashes in NodeCore, where we
assume that our object is still valid (or usable as if it
were still valid) even though we're looping through
handlers and any one of them may have remove()d the
object before other handlers get a chance to fire.

Instead, just watch for unexpected nil returns from
functions we expect would never return nil (e.g.
get_pos or get_properties) and return if we hit one.
We can assume all other calls will be non-nil after that
one, as long as we stay in the same function flow.
2020-05-18 18:36:06 -04:00
Aaron Suen
1d0f9aa81f Fix doors/concrete API registration
When 3rd-party mods try to register extensions, don't
crash on trying to register in wrong namespace.

Keep registrations to original mod namespace for now,
as I'm not certain whether I actually made assumptions
about mod name in some logic.
2020-05-18 18:09:44 -04:00
Aaron Suen
dde2a00637 Merge branch 'master' into dev 2020-05-18 10:56:52 -04:00
Aaron Suen
61e99ce3cf Fix incorrect package identifier 2020-05-18 10:56:48 -04:00
Aaron Suen
14f5cae41b Cleanup CDB short desc 2020-05-18 10:56:40 -04:00
Aaron Suen
2f713aa1d6 Fix incorrect package identifier 2020-05-18 10:54:50 -04:00
Aaron Suen
3e3de583e4 Cleanup CDB short desc 2020-05-18 07:46:41 -04:00
Aaron Suen
7dbc22abe7 Centralize some sanity checks 2020-05-12 07:25:58 -04:00
Aaron Suen
3fc187f0e6 Centralize entity glow too
Thrown/falling entities containing a light_source will now cast
a dynamic light glow automatically as well.
2020-05-12 07:22:41 -04:00
Aaron Suen
a43c915710 Buff scaling glow by 50%
Lots of issues with players being unable to figure out traversal
of dark caves.  Total darkness is probably too much of an ostacle
for players who haven't already learned how to avoid those kind
of circumstances.
2020-05-12 07:14:35 -04:00
Aaron Suen
3484b55cb0 Centralize wield glow logic
- Wield item glow is now handled automatically
- Player glows with same glow level as scaling nodes
2020-05-12 07:13:36 -04:00
Aaron Suen
124aa5e4f4 Dynamic light restructuring
All possible light level nodes are pre-registered at startup time
so that light levels can be determined fully dynamically at run
time, without needing to explicitly declare what light levels will
actually be needed.

Hopefully this will make using dynamic lights a little easier
and lead to some interesting content.
2020-05-12 06:55:11 -04:00
Aaron Suen
9a3c37b02d Update translation sources 2020-04-20 08:38:45 -04:00
Aaron Suen
b9028d0b01 Trim blank lines 2020-04-20 08:17:02 -04:00
Aaron Suen
c69d0a1cff Infodump config, dump texture override template 2020-04-20 08:15:53 -04:00
Aaron Suen
cf7ae16287 More Russian translation updates 2020-04-20 07:30:25 -04:00
Aaron Suen
b903ddd42a Image optimizations. 2020-04-16 01:27:54 -04:00
Aaron Suen
d33877fbc7 Fix sponge tote crash 2020-04-16 01:07:48 -04:00
Aaron Suen
a6ef71d9dd More breath HUD redoing 2020-04-13 00:00:31 -04:00
Aaron Suen
9c85cfd5d3 Lengthen concrete curing 2020-04-12 21:41:44 -04:00