mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-02-03 22:00:19 +01:00
[Carts] Stops the cart when we leave it
This commit is contained in:
parent
5f7adebd08
commit
dce8163a9c
@ -63,6 +63,8 @@ function carts.cart:on_rightclick(clicker)
|
||||
if self.driver and player_name == self.driver then
|
||||
self.driver = nil
|
||||
carts:manage_attachment(clicker, false)
|
||||
self.object:setacceleration({x=0, y=0, z=0}) -- Stops the cart when we leave it
|
||||
self.object:setvelocity({x=0, y=0, z=0})
|
||||
elseif not self.driver then
|
||||
self.driver = player_name
|
||||
carts:manage_attachment(clicker, true, self.object)
|
||||
|
Loading…
Reference in New Issue
Block a user