aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2018-02-20 16:39:31 +0100
committerGitHub <noreply@github.com>2018-02-20 16:39:31 +0100
commit4c512f1dc5755efc7afd55b58078ec466442f648 (patch)
tree94eb7db83852bc556a73db1ca41a38db7dac5537
parente9322075a366f7d09b472194a13bdb239f7410cf (diff)
downloadadvtrains-4c512f1dc5755efc7afd55b58078ec466442f648.tar.gz
advtrains-4c512f1dc5755efc7afd55b58078ec466442f648.tar.bz2
advtrains-4c512f1dc5755efc7afd55b58078ec466442f648.zip
Allow wagon owners to drive their trains #2
The check was missing at check_seat_group_access
-rw-r--r--advtrains/wagons.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 81b7571..3ddd8b0 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -1084,7 +1084,7 @@ function wagon:seating_from_key_helper(pname, fields, no)
end
end
function wagon:check_seat_group_access(pname, sgr)
- if self.seat_groups[sgr].driving_ctrl_access and not minetest.check_player_privs(pname, "train_operator") then
+ if self.seat_groups[sgr].driving_ctrl_access and not (minetest.check_player_privs(pname, "train_operator") or self.owner==pname) then
return false, "Missing train_operator privilege."
end
if not self.seat_access then