Fix server crash when boat passenger sneaks

The crash occured when a player who is not a driver of a boat sneaked.
This commit is contained in:
Lizzy Fleckenstein 2021-03-26 17:51:13 +01:00 committed by Nils Dagsson Moskopp
parent 6c311d5528
commit 764ff5512a
Signed by untrusted user who does not match committer: erle
GPG Key ID: A3BC671C35191080
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ function boat.on_step(self, dtime, moveresult)
else else
local ctrl = self._passenger:get_player_control() local ctrl = self._passenger:get_player_control()
if ctrl and ctrl.sneak then if ctrl and ctrl.sneak then
detach_player(self._passenger, true) detach_object(self._passenger, true)
self._passenger = nil self._passenger = nil
end end
end end