Allow wagon owners to control their own trains

...even without the train_operator privilege
This still doesn't allow them to control switches, but whatever...
This commit is contained in:
orwell96 2018-02-20 16:22:31 +01:00 committed by GitHub
parent 06cdb14f3d
commit e9322075a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ function wagon:on_step(dtime)
--driver control
for seatno, seat in ipairs(self.seats) do
local driver=self.seatp[seatno] and minetest.get_player_by_name(self.seatp[seatno])
local has_driverstand = self.seatp[seatno] and minetest.check_player_privs(self.seatp[seatno], {train_operator=true})
local has_driverstand = self.seatp[seatno] and (minetest.check_player_privs(self.seatp[seatno], {train_operator=true}) or self.owner==self.seatp[seatno])
if self.seat_groups then
has_driverstand = has_driverstand and (seat.driving_ctrl_access or self.seat_groups[seat.group].driving_ctrl_access)
else