[helicopter] Update to Git commit 66a6523:

https://github.com/AntumDeluge/mtmod-helicopter/commit/66a6523
This commit is contained in:
AntumDeluge 2017-05-03 22:57:32 -07:00
parent 981609d091
commit 95a03facf2
4 changed files with 23 additions and 10 deletions

View File

@ -378,5 +378,5 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[patch.adv_spawning]: https://github.com/AntumDeluge/mtmod-adv_spawning/commit/572688b
[patch.ethereal]: https://github.com/AntumDeluge/minetest-mod-ethereal/commit/2714ad4
[patch.helicopter]: https://github.com/AntumDeluge/mtmod-helicopter/commit/bcb6fbf
[patch.helicopter]: https://github.com/AntumDeluge/mtmod-helicopter/commit/66a6523
[patch.rainbow_ore]: https://github.com/AntumDeluge/mtmod-rainbow_ore/commit/60dc35e

View File

@ -11,3 +11,14 @@ License of media (textures and sounds):
helicopter_motor.ogg by Robinhood76 | License: Attribution Noncommercial
Controls:
---------
Mount: right-click
Dismount: "E" + right-click or "E" + "S"
Forward: "W"
Reverse: "S"
Left: "A"
Right: "D"
Up: "Space"
Down: "Shift"
Switch driver: "E" + "A"

View File

@ -0,0 +1,2 @@
### TODO list for helicopter mod:
- Allow players to dismount only if heli is touching ground

View File

@ -490,7 +490,7 @@ function heli:on_step(dtime)
if self.driver then
--self.driver:set_animation({ x= 81, y=160, },10,0)
self.yaw = self.driver:get_look_yaw()
self.yaw = self.driver:get_look_horizontal()
local ctrl = self.driver:get_player_control()
--Forward/backward
@ -498,30 +498,30 @@ function heli:on_step(dtime)
if ctrl.up then
self.vx = self.vx + math.cos(self.driver:get_look_yaw())*0.1
self.vz = self.vz + math.sin(self.driver:get_look_yaw())*0.1
self.vx = self.vx + math.cos(self.driver:get_look_horizontal())*0.1
self.vz = self.vz + math.sin(self.driver:get_look_horizontal())*0.1
end
if ctrl.down and ctrl.aux1 then -- use key + sneak key gets out
self:removedriver()
elseif ctrl.down then
self.vx = self.vx-math.cos(self.driver:get_look_yaw())*0.1
self.vz = self.vz-math.sin(self.driver:get_look_yaw())*0.1
self.vx = self.vx-math.cos(self.driver:get_look_horizontal())*0.1
self.vz = self.vz-math.sin(self.driver:get_look_horizontal())*0.1
end
--Left/right
if ctrl.left and ctrl.aux1 then -- use key + left key switches places with the left passenger
self:setpas1(self.driver,"swap")
elseif ctrl.left then
self.vz = self.vz+math.cos(self.driver:get_look_yaw())*0.1
self.vx = self.vx+math.sin(math.pi+self.driver:get_look_yaw())*0.1
self.vz = self.vz+math.cos(self.driver:get_look_horizontal())*0.1
self.vx = self.vx+math.sin(math.pi+self.driver:get_look_horizontal())*0.1
end
if ctrl.right and ctrl.aux1 then -- use key + right key switches places with the right passenger
self:setpas2(self.driver,"swap")
elseif ctrl.right then
self.vz = self.vz-math.cos(self.driver:get_look_yaw())*0.1
self.vx = self.vx-math.sin(math.pi+self.driver:get_look_yaw())*0.1
self.vz = self.vz-math.cos(self.driver:get_look_horizontal())*0.1
self.vx = self.vx-math.sin(math.pi+self.driver:get_look_horizontal())*0.1
end
--up/down
if ctrl.jump then