mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-09 16:49:35 +01:00
Fix ender pearl crash
This commit is contained in:
parent
70d05a6720
commit
bd31808bed
1 changed files with 1 additions and 2 deletions
|
@ -31,7 +31,7 @@ function on_collide(self, pos, node)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Make sure we have a reference to the player
|
-- Make sure we have a reference to the player
|
||||||
local player = self._thrower and core.get_player_by_name(self._thrower)
|
local player = self._owner and core.get_player_by_name(self._owner)
|
||||||
if not player then return end
|
if not player then return end
|
||||||
|
|
||||||
-- Teleport and hurt player
|
-- Teleport and hurt player
|
||||||
|
@ -113,7 +113,6 @@ vl_projectile.register("mcl_throwing:ender_pearl_entity",{
|
||||||
|
|
||||||
on_step = vl_projectile.update_projectile,
|
on_step = vl_projectile.update_projectile,
|
||||||
_lastpos={},
|
_lastpos={},
|
||||||
_thrower = nil, -- Player ObjectRef of the player who threw the ender pearl
|
|
||||||
_vl_projectile = {
|
_vl_projectile = {
|
||||||
behaviors = {
|
behaviors = {
|
||||||
vl_projectile.collides_with_solids,
|
vl_projectile.collides_with_solids,
|
||||||
|
|
Loading…
Reference in a new issue