Commit Graph

12804 Commits

Author SHA1 Message Date
teknomunk
429b55b9c6 Add _vl_projectile.can_punch() to mob API and move hard-coded entity behavior from arrow to rover code 2024-12-07 19:15:38 +01:00
teknomunk
d2523dcb02 Change to use nil radius in within_limits(pos,radius) check 2024-12-07 19:15:38 +01:00
teknomunk
980d18b6d2 Add reference to Projectile API documentatino from mob API documentation 2024-12-07 19:15:38 +01:00
teknomunk
c63cd9c96d Update { ... } to {...} 2024-12-07 19:15:38 +01:00
teknomunk
4c5b29b404 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-07 19:15:38 +01:00
teknomunk
7c1cb6dc46 Rework self.timer and _owner collision conditions 2024-12-07 19:15:38 +01:00
teknomunk
3897d4b61f Fix bug in solid node collision code (not updating _last_velocity, making delta_v larger if length was small) 2024-12-07 19:15:38 +01:00
teknomunk
a63d97d637 Use creative arrow collection behavior from master (except they make pickup noises in creative), make all creative arrows infinity 2024-12-07 19:15:38 +01:00
teknomunk
291d0ee0f0 Rearrange conditions to minimize executed code 2024-12-07 19:15:38 +01:00
teknomunk
5d371e55a1 Stop infinite loop of arrows stuck in yourself punching you 2024-12-07 19:15:38 +01:00
teknomunk
e1bd9b46d0 Sound fix, preserve _itemstring as well 2024-12-07 19:15:38 +01:00
teknomunk
982c16b1a6 Add _arrow_item to list of perserved fields 2024-12-07 19:15:38 +01:00
teknomunk
b26ba45e20 Make arrows (and all their derivatives) preserve collectable and entity properties across world unload/load 2024-12-07 19:15:38 +01:00
teknomunk
201476d109 Make stuck arrows stop processing all other behaviors 2024-12-07 19:15:38 +01:00
teknomunk
4cbc58ab97 Make it possible to pick up arrows in creative mode 2024-12-07 19:15:38 +01:00
teknomunk
c67e09b1d4 Fix tipped arrow behavior, remove debug code 2024-12-07 19:15:38 +01:00
teknomunk
d6688030bc Rework projectile pickup code (to prevent item duplication bugs), always update _last_pos, short circuit processing behaviors if the entity was removed by a behavior but didn't report it 2024-12-07 19:15:38 +01:00
teknomunk
f4a49efa88 Fix crash when respawning 2024-12-07 19:15:38 +01:00
teknomunk
6c5214d37d Let arrows stick in players 2024-12-07 19:15:38 +01:00
teknomunk
a633b3f016 Implement mcl_util.remove_entity() and convert projectile code to use it 2024-12-07 19:15:38 +01:00
teknomunk
3f14af8b59 Add pitch and yaw offset support to vl_projectile 2024-12-07 19:15:38 +01:00
teknomunk
40a0a934a6 Correct self-collision for lingering/splash potions 2024-12-07 19:15:38 +01:00
teknomunk
1db9723c9b Fix condition on node collision for mob projectiles 2024-12-07 19:15:38 +01:00
teknomunk
ffb1d39464 Correct damage for mob projectiles 2024-12-07 19:15:38 +01:00
teknomunk
1db0c30be7 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-07 19:15:38 +01:00
teknomunk
529448e4b2 Fix crash when firing rocket arrows 2024-12-07 19:15:38 +01:00
teknomunk
8f8d27d7e0 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-07 19:15:38 +01:00
teknomunk
ec6f28c2d1 Remove debug dump, move maximum time to live to vl_projectile 2024-12-07 19:15:38 +01:00
teknomunk
7b027f044e Document vl_projectile.replace_with_item_drop 2024-12-07 19:15:38 +01:00
teknomunk
bde58675eb Move projectile stick logic into vl_projectile 2024-12-07 19:15:38 +01:00
teknomunk
6193b2630f Move tracer to vl_projectile 2024-12-07 19:15:38 +01:00
teknomunk
77d3dbf33d Change mcl_bows to use standard vl_projectile on_step handler, move burning behavior to vl_projectile 2024-12-07 19:15:38 +01:00
teknomunk
1b8a4d6ecb Move arrow-node logic out of mcl_bows/arrow.lua and into the node definitions under _vl_projectile.on_collide 2024-12-07 19:15:38 +01:00
teknomunk
1600a65dd7 Remove secondary collision check in mcl_bows/arrow.lua (it was just hitting grass) 2024-12-07 19:15:38 +01:00
teknomunk
4a6eef8656 Remove code with no effect other than emitting a warning 2024-12-07 19:15:38 +01:00
teknomunk
bd4a701322 Resolve luacheck findings 2024-12-07 19:15:38 +01:00
teknomunk
d85c7c395f Fix crashes in mcl_throwing 2024-12-07 19:15:38 +01:00
teknomunk
b9c42af179 Fix crash when hit with an arrow that is not piercing 2024-12-07 19:15:38 +01:00
the-real-herowl
00acc1742e Rockets and piercing arrows fixed
They both work properly now.
2024-12-07 19:15:38 +01:00
the-real-herowl
03c3447657 Fix throwables' punch allow check 2024-12-07 19:15:38 +01:00
the-real-herowl
d97d0a9b35 Fixed abnormal skull rotation 2024-12-07 19:15:38 +01:00
the-real-herowl
d0c8721afd Fixed wither skulls
- wither skulls now hit players again
- wither skulls (strong version) don't cause a crash anymore
2024-12-07 19:15:38 +01:00
teknomunk
6ce71b78ce Add attribution with exact links for minetest code 2024-12-07 19:15:38 +01:00
teknomunk
d26eb2d5a3 Add hook to allow piercing enchantment to be implemented 2024-12-07 19:15:38 +01:00
teknomunk
c01cbe995f Fix chick spawning in the presence of a functional has_room() check 2024-12-07 19:15:38 +01:00
teknomunk
dc1fdebd05 Fix dispenser arrows so they hit players and entities, minetest.register_entity -> vl_projectile.register for mcl_throwing:egg 2024-12-07 19:15:38 +01:00
teknomunk
64b2b5b125 Make egg and snowball stack count match master 2024-12-07 19:15:38 +01:00
teknomunk
53674ea9ef Prevent dereferencing nil in wither.lua, fix minor typo in debug statement 2024-12-07 19:15:38 +01:00
teknomunk
5a0200ee9d Add workarround for random velocity change of particles on creation 2024-12-07 19:15:38 +01:00
teknomunk
3688e1994e Make sure a projectile sets on fire the thing it collided with 2024-12-07 19:15:38 +01:00