teknomunk
0d82c8f725
Replace magic numbers with named constants, add missing 'local'
2024-12-25 11:52:24 +01:00
teknomunk
bb934d09ee
Break long lines, add space between functions in vl_projectile/init.lua
2024-12-25 11:52:24 +01:00
teknomunk
bc321ccae4
Add _vl_projectile.can_punch() to mob API and move hard-coded entity behavior from arrow to rover code
2024-12-25 11:52:24 +01:00
teknomunk
5db55dde3c
Update { ... } to {...}
2024-12-25 11:52:24 +01:00
teknomunk
0d8f7515c6
Update minetest->Luanti in affected documentation, update minetest. -> core. in affected code, factor out common subexpressions in mods/ITEMS/vl_projectile/init.lua
2024-12-25 11:52:24 +01:00
teknomunk
73c66dc888
Sound fix, preserve _itemstring as well
2024-12-25 11:52:24 +01:00
teknomunk
1e165155d8
Add _arrow_item to list of perserved fields
2024-12-25 11:52:24 +01:00
teknomunk
f426d96ef5
Make arrows (and all their derivatives) preserve collectable and entity properties across world unload/load
2024-12-25 11:52:24 +01:00
teknomunk
d1fe8de1b6
Fix crash when respawning
2024-12-25 11:52:24 +01:00
teknomunk
174cb5fe1c
Let arrows stick in players
2024-12-25 11:52:24 +01:00
teknomunk
aa8cec9911
Implement mcl_util.remove_entity() and convert projectile code to use it
2024-12-25 11:52:24 +01:00
teknomunk
efa6e7d2d0
Move arrow self-collision grace logic to vl_projectile then apply to mob projectiles and splash and linger potions, allow entity luaentity to be passed to mcl_util.get_entity_id()
2024-12-25 11:52:24 +01:00
teknomunk
2d56deacf6
Replace _puncher with _owner, rework projectile code to make _owner a string, copy mcl_util.gen_uuid() from minecart branch, add mcl_util.get_entity_id(), fix crash
2024-12-25 11:52:24 +01:00
teknomunk
96abcd2bcc
Remove debug dump, move maximum time to live to vl_projectile
2024-12-25 11:52:24 +01:00
teknomunk
c857d66f5d
Move projectile stick logic into vl_projectile
2024-12-25 11:52:24 +01:00
teknomunk
32d37b30bf
Move tracer to vl_projectile
2024-12-25 11:52:24 +01:00
teknomunk
f265f5b52d
Change mcl_bows to use standard vl_projectile on_step handler, move burning behavior to vl_projectile
2024-12-25 11:52:24 +01:00
teknomunk
8e4f870a46
Move arrow-node logic out of mcl_bows/arrow.lua and into the node definitions under _vl_projectile.on_collide
2024-12-25 11:52:24 +01:00
teknomunk
ba244fa930
Remove secondary collision check in mcl_bows/arrow.lua (it was just hitting grass)
2024-12-25 11:52:24 +01:00
teknomunk
dc312ee012
Fix crash when hit with an arrow that is not piercing
2024-12-25 11:52:24 +01:00
the-real-herowl
a1c7bb55a1
Rockets and piercing arrows fixed
...
They both work properly now.
2024-12-25 11:52:24 +01:00
teknomunk
db8bceebf3
Fix dispenser arrows so they hit players and entities, minetest.register_entity -> vl_projectile.register for mcl_throwing:egg
2024-12-25 11:52:24 +01:00
teknomunk
b821f3d72f
Fix luacheck findings for this PR: remove unused variables, remove overwritten value, add missing dependencies, fix undefined variable usage
2024-12-25 11:52:24 +01:00
teknomunk
4c36870776
Small optimization for calculating _allow_punch
2024-12-25 11:52:24 +01:00
teknomunk
dbbc53173c
Stop minimum draw arrows from hitting player that shot them
2024-12-25 11:52:24 +01:00
teknomunk
3b7fb6613e
Prevent collisions with entities until projectile is at least one node from where it started (to prevent always hitting yourself), modify mcl_bows.shoot_arrow() and mcl_bows_s.shoot_arrow_crossbow() to use vl_projectile.create(), fix projectiles damaging players
2024-12-25 11:52:24 +01:00
teknomunk
4e3e8aafc8
Address most of kno10's comments about mcl_utils/node.lua and a couple others, fix lingering potion sound
2024-12-25 11:52:24 +01:00
teknomunk
d71d9f5bf2
Address more review comments
2024-12-25 11:52:24 +01:00
teknomunk
c4df080af5
Make arrows damage players, update API documentation, fix several crashes that occurred when arrows hit a player
2024-12-25 11:52:24 +01:00
teknomunk
d18cc8ff52
Fix picking up tipped arrows
2024-12-25 11:52:24 +01:00
teknomunk
dd2c6638f6
Fix crash related to nil _time_in_air
2024-12-25 11:52:24 +01:00
teknomunk
6893a4e8b6
Fix typo in api.md, add TODO, change entity -> object
2024-12-25 11:52:24 +01:00
teknomunk
5ced87dc26
Fix typos documentation, add ignore_gravity and liquid_drag options, use vl_projectile.register() for enter pearl, move projectile physics to vl_projectile add hook for future vl_physics support
2024-12-25 11:52:24 +01:00
teknomunk
fdfefd2af8
Resolve more review comments, fix crash
2024-12-25 11:52:24 +01:00
teknomunk
17a25a39ef
Resolve review comments
2024-12-25 11:52:24 +01:00
teknomunk
4dec7e1ce5
Give arrows a maximum lifetime to prevent them from getting stuck in mid-air forever
2024-12-25 11:52:24 +01:00
teknomunk
def9d26ca3
Add API documentation, minor API cleanup
2024-12-25 11:52:24 +01:00
teknomunk
7317981134
Convert rocket to use vl_projectile API using mcl_bows:arrow as a template, remove some dead code
2024-12-25 11:52:24 +01:00
teknomunk
0516b69f68
Fold tipped arrows into standard arrows and handle effects via item definition callback, remove arrows when they collide with entities, update handling of removing projectiles
2024-12-25 11:52:24 +01:00
teknomunk
caf09cc7d3
More refactoring to generalize arrow code into projectile
2024-12-25 11:52:24 +01:00
teknomunk
34b9fe88e5
Start mcl_bows:arrow_entity refactor
2024-12-25 11:52:24 +01:00
Loveaabb
f26c34e65f
Bugfix: Shield fails to block arrows
2024-11-10 01:34:50 +01:00
teknomunk
d2a49799ae
Change over internal name so that /spawn_mob works
2024-05-05 16:22:19 +00:00
PrairieWind
d3095fea57
Update ignition, smothering, and campfire inventory drops
...
Bonus fix for grass path creation sound traveling across the entire server
2023-09-04 22:05:38 +00:00
epCode
7e03f86b84
Give the arrows a far less laggy look with an attached particle spawner with critical shot.
2022-10-04 16:46:47 -07:00
iliekprogrammar
156aff21a1
[5.6][bows] fix unsafe entity handling for arrows
2022-08-07 12:48:09 +08:00
iliekprogrammar
221ee0fcf1
[5.6] mark places with unsafe set_hp entity handling
...
There might be other places i might be missing, but these are the obvious ones.
leftover entity handling i did not mark:
* everything that involves a apply()-like algorithm (e.g. callbacks) over the
same list of objects.
* in mcl_damage, it's not known whether mcl_damage.from_mt() would involve
entity handling or just player handling.
2022-08-07 00:13:03 +08:00
cora
bf23c61e34
skip damage completely when player & pvp disabled
2022-07-16 12:12:28 +00:00
GNU Hacker
454d7e8b04
arrow check if pvp is enable
2022-07-16 12:12:28 +00:00
epCode
6c804f44d5
add a small bit of doc
2022-06-06 18:43:50 -07:00