aboutsummaryrefslogtreecommitdiff
path: root/advtrains/wagons.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2018-02-20 16:22:31 +0100
committerGitHub <noreply@github.com>2018-02-20 16:22:31 +0100
commite9322075a366f7d09b472194a13bdb239f7410cf (patch)
tree1c9ad7ca4d23486078212bac0540514e4ea12aa4 /advtrains/wagons.lua
parent06cdb14f3d28780f011d842c17580c748d2020f2 (diff)
downloadadvtrains-e9322075a366f7d09b472194a13bdb239f7410cf.tar.gz
advtrains-e9322075a366f7d09b472194a13bdb239f7410cf.tar.bz2
advtrains-e9322075a366f7d09b472194a13bdb239f7410cf.zip
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...
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r--advtrains/wagons.lua2
1 files changed, 1 insertions, 1 deletions
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