给船离开水面时增加重力

This commit is contained in:
zaoqi 2017-01-26 14:15:43 +08:00
parent 2452cf2bcf
commit da8e96d632

View File

@ -207,7 +207,7 @@ function vehicles.object_drive(entity, dtime, def)
--apply water effects
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
entity.object:setvelocity({x=velo.x*0.9, y=-1, z=velo.z*0.9})
--boost