From e9322075a366f7d09b472194a13bdb239f7410cf Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 20 Feb 2018 16:22:31 +0100 Subject: 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... --- advtrains/wagons.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'advtrains') diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua index fd01abd..81b7571 100644 --- a/advtrains/wagons.lua +++ b/advtrains/wagons.lua @@ -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 -- cgit v1.2.3