给船离开水面时增加重力
This commit is contained in:
parent
2452cf2bcf
commit
da8e96d632
2
api.lua
2
api.lua
@ -207,7 +207,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
|
|
||||||
--apply water effects
|
--apply water effects
|
||||||
if is_watercraft and entity.on_water == false then
|
if is_watercraft and entity.on_water == false then
|
||||||
entity.object:setvelocity({x=0, y=0, z=0})
|
entity.object:setvelocity({x=velo.x*decell,y=velo.y-1,z=velo.z*decell})
|
||||||
elseif entity.on_water and not is_watercraft then
|
elseif entity.on_water and not is_watercraft then
|
||||||
entity.object:setvelocity({x=velo.x*0.9, y=-1, z=velo.z*0.9})
|
entity.object:setvelocity({x=velo.x*0.9, y=-1, z=velo.z*0.9})
|
||||||
--boost
|
--boost
|
||||||
|
Loading…
x
Reference in New Issue
Block a user