mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-02-04 06:10:16 +01:00
[Carts] Only the driver can punch
This commit is contained in:
parent
dce8163a9c
commit
2244c7498b
@ -140,7 +140,7 @@ function carts.cart:on_punch(puncher, time_from_last_punch, tool_capabilities, d
|
|||||||
if math.abs(vel.x + vel.z) > carts.punch_speed_min then
|
if math.abs(vel.x + vel.z) > carts.punch_speed_min then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
--end --Only the driver can punch
|
||||||
|
|
||||||
local punch_dir = carts:velocity_to_dir(puncher:get_look_dir())
|
local punch_dir = carts:velocity_to_dir(puncher:get_look_dir())
|
||||||
punch_dir.y = 0
|
punch_dir.y = 0
|
||||||
@ -161,6 +161,7 @@ function carts.cart:on_punch(puncher, time_from_last_punch, tool_capabilities, d
|
|||||||
self.old_pos = nil
|
self.old_pos = nil
|
||||||
self.punched = true
|
self.punched = true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function carts.cart:on_step(dtime)
|
function carts.cart:on_step(dtime)
|
||||||
local vel = self.object:getvelocity()
|
local vel = self.object:getvelocity()
|
||||||
|
Loading…
Reference in New Issue
Block a user