2 Commits e941d27971 ... 2627b4efbe

Autore SHA1 Messaggio Data
  BlueBird51 2627b4efbe Meow 1 anno fa
  BlueBird51 d599f75fdc Attempting to give an opinion: initializing opinion-finder.exe. Processing. Please stand by. Transmitting. *ERROR* 'opinion-finder.exe has requested the runtime to terminate it in an unusual way. Contact the developer team for more information.' SIGKILL at 0xDEADF00D (socket select): bad opcode: ACCESS DENIED. Failed. Could not transmit opinion. Opinion not given. 1 anno fa
3 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. 1 1
      mods/3d_armor/armor.lua
  2. 4 3
      mods/throwing/functions.lua
  3. 1 0
      mods/tooldata/init.lua

+ 1 - 1
mods/3d_armor/armor.lua

@@ -378,7 +378,7 @@ function armor.get_valid_player(self, player, msg)
 		-- another mod (XP) before the armor inv is set up. This is normal.
 		-- Can't figure out why this happens even when the XP change happens *after*
 		-- the joinplayer callbacks inside minetest.after()!?
-		minetest.log("error", "3d_armor: Detached armor inventory is nil "..msg)
+		minetest.log("warning", "3d_armor: Detached armor inventory is nil "..msg)
 		return
 	end
 

+ 4 - 3
mods/throwing/functions.lua

@@ -71,12 +71,12 @@ local function get_shoot_position(player)
 	local yaw = player:get_look_horizontal()
 	local pos = player:get_pos()
 
-	local off = {x=0.24, y=0}
+	local off = {x=0.3, y=0}
 	--local off = {x=0, y=0}
 	off = rotate_point_2d(off, yaw)
 
 	pos.x = pos.x + off.x
-	pos.y = pos.y + 1.3
+	pos.y = pos.y + 1.5
 	pos.z = pos.z + off.y
 	return pos
 end
@@ -133,11 +133,12 @@ function throwing_shoot_arrow(itemstack, player, stiffness, is_cross)
 	imeta:set_string("ar_desc", nil)
 	toolranks.apply_description(imeta, itemstack:get_definition())
 
+	local accuracy = math.rad(math.random(-300, 300)/300)
 	local dir = player:get_look_dir()
 	local vel = stiffness * 2
 	obj:set_velocity({x=dir.x*vel, y=dir.y*vel, z=dir.z*vel})
 	obj:set_acceleration({x=0, y=-5, z=0})
-	obj:set_yaw(player:get_look_horizontal() - (math.pi / 2))
+	obj:set_yaw(player:get_look_horizontal() - (math.pi / 2) + accuracy)
 
 	if is_cross then
 		minetest.sound_play("throwing_crossbow_sound", {pos=playerpos}, true)

+ 1 - 0
mods/tooldata/init.lua

@@ -970,6 +970,7 @@ function td_api.arrow_toolcaps(name, damage)
 		damage_groups = {
 			arrow = damage,
 			from_arrow = 0,
+			knockback = 400,
 		},
 	}
 	-- This table gets sent through the engine, so only builtin parameters work.