some fixes
This commit is contained in:
parent
f3d8ab17fc
commit
5a8b8e6df4
5
api.lua
5
api.lua
@ -102,6 +102,7 @@ timer = 0
|
||||
|
||||
--New vehicle function, combines all of the others
|
||||
|
||||
|
||||
function vehicles.object_drive(entity, dtime, def)
|
||||
--definition
|
||||
local speed = def.speed or 10
|
||||
@ -196,7 +197,7 @@ function vehicles.object_drive(entity, dtime, def)
|
||||
end)
|
||||
end
|
||||
|
||||
minetest.chat_send_all("decell:"..decell.." speed"..absolute_speed)
|
||||
--minetest.chat_send_all("decell:"..decell.." speed"..absolute_speed)
|
||||
|
||||
--death_node
|
||||
if death_node ~= nil and node == death_node then
|
||||
@ -234,7 +235,7 @@ function vehicles.object_drive(entity, dtime, def)
|
||||
--face the right way
|
||||
local target_yaw = yaw+math.pi+math.pi/2+extra_yaw
|
||||
local entity_yaw = entity.object:getyaw()
|
||||
local change_yaw = (((target_yaw-entity_yaw+math.pi)%(math.pi*2))-math.pi)/8
|
||||
local change_yaw = (((target_yaw-entity_yaw+math.pi)%(math.pi*2))-math.pi)/16
|
||||
if entity_yaw ~= target_yaw and not uses_arrow_keys then
|
||||
entity.object:setyaw(entity_yaw+change_yaw)
|
||||
dir.x = -math.sin(entity_yaw)
|
||||
|
32
init.lua
32
init.lua
@ -666,7 +666,7 @@ minetest.register_entity("vehicles:ute", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 17,
|
||||
decell = 0.6,
|
||||
decell = 0.95,
|
||||
boost = true,
|
||||
boost_duration = 6,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -734,7 +734,7 @@ minetest.register_entity("vehicles:ute2", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 17,
|
||||
decell = 0.6,
|
||||
decell = 0.95,
|
||||
boost = true,
|
||||
boost_duration = 6,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -777,7 +777,7 @@ minetest.register_entity("vehicles:astonmaaton", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 19,
|
||||
decell = 0.8,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 5,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -820,7 +820,7 @@ minetest.register_entity("vehicles:nizzan", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 18,
|
||||
decell = 0.8,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 5,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -882,7 +882,7 @@ minetest.register_entity("vehicles:nizzan2", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 18,
|
||||
decell = 0.8,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 5,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -944,7 +944,7 @@ minetest.register_entity("vehicles:lambogoni", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 19,
|
||||
decell = 0.8,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 4,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -987,7 +987,7 @@ minetest.register_entity("vehicles:lambogoni2", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 19,
|
||||
decell = 0.8,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 4,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -1030,7 +1030,7 @@ minetest.register_entity("vehicles:masda", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 21,
|
||||
decell = 0.95,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 4,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -1073,7 +1073,7 @@ minetest.register_entity("vehicles:masda2", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 21,
|
||||
decell = 0.85,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 4,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -1116,7 +1116,7 @@ minetest.register_entity("vehicles:policecar", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 20,
|
||||
decell = 0.95,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 8,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -1159,7 +1159,7 @@ minetest.register_entity("vehicles:musting", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 17,
|
||||
decell = 0.85,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 4,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -1202,7 +1202,7 @@ minetest.register_entity("vehicles:musting2", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 17,
|
||||
decell = 0.85,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 4,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -1245,7 +1245,7 @@ minetest.register_entity("vehicles:fourd", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 15,
|
||||
decell = 0.85,
|
||||
decell = 0.99,
|
||||
driving_sound = "engine",
|
||||
sound_duration = 11,
|
||||
moving_anim = {x=3, y=18},
|
||||
@ -1298,7 +1298,7 @@ minetest.register_entity("vehicles:fewawi", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 20,
|
||||
decell = 0.95,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 4,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -1395,7 +1395,7 @@ minetest.register_entity("vehicles:pooshe", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 15,
|
||||
decell = 0.95,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 4,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
@ -1438,7 +1438,7 @@ minetest.register_entity("vehicles:pooshe2", {
|
||||
on_step = function(self, dtime)
|
||||
return vehicles.on_step(self, dtime, {
|
||||
speed = 20,
|
||||
decell = 0.95,
|
||||
decell = 0.99,
|
||||
boost = true,
|
||||
boost_duration = 4,
|
||||
boost_effect = "vehicles_nitro.png",
|
||||
|
Loading…
x
Reference in New Issue
Block a user