b3d, you have failed me. x model format, you're in
Entries for the newly added animation features Update player script to work with the latest code Add a test case for attachments. A LUA entity is attached to the player with a specified name 10 seconds after the server starts Add a detachment test case (5 seconds after attaching) Update function names, plus add a test case for both player to player and lua-entity to player attachments
This commit is contained in:
parent
0057a87b99
commit
24781813fa
Binary file not shown.
@ -1,12 +0,0 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
newmtl Material
|
||||
Ns 96.078431
|
||||
Ka 0.000000 0.000000 0.000000
|
||||
Kd 0.640000 0.640000 0.640000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 2
|
||||
|
||||
|
@ -1,106 +0,0 @@
|
||||
# Blender v2.64 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib player.mtl
|
||||
o Cube
|
||||
v 1.000000 -1.000000 -1.000000
|
||||
v 1.000000 -1.000000 1.000000
|
||||
v -1.000000 -1.000000 1.000000
|
||||
v -1.000000 -1.000000 -1.000000
|
||||
v 1.000000 1.000000 -0.999999
|
||||
v 0.999999 1.000000 1.000001
|
||||
v -1.000000 1.000000 1.000000
|
||||
v -1.000000 1.000000 -1.000000
|
||||
v 1.194667 -1.194667 0.000000
|
||||
v 0.000000 -1.194667 -1.194667
|
||||
v 1.194667 0.000000 -1.194666
|
||||
v 0.000000 -1.194667 1.194667
|
||||
v 1.194666 0.000000 1.194667
|
||||
v -1.194667 -1.194667 -0.000000
|
||||
v -1.194667 0.000000 1.194666
|
||||
v -1.194666 0.000000 -1.194667
|
||||
v 1.194667 1.194667 0.000001
|
||||
v 0.000000 1.194667 -1.194667
|
||||
v -0.000001 1.194667 1.194667
|
||||
v -1.194667 1.194667 -0.000000
|
||||
v 0.000000 -1.543509 -0.000000
|
||||
v -0.000000 1.543509 0.000000
|
||||
v 1.543509 0.000000 0.000000
|
||||
v -0.000000 0.000000 1.543509
|
||||
v -1.543509 0.000000 -0.000000
|
||||
v 0.000000 0.000000 -1.543509
|
||||
v -1.500000 -1.500000 1.500000
|
||||
v 1.500001 1.500000 -1.499999
|
||||
v 1.792000 0.000000 -1.792000
|
||||
v -0.000000 -1.792000 1.792000
|
||||
v -1.792001 -0.000000 1.792000
|
||||
v 0.000000 1.792000 -1.792000
|
||||
v -0.000001 -0.000000 2.315264
|
||||
v 0.000001 0.000000 -2.315264
|
||||
vt 0.750000 0.750000
|
||||
vt 0.790763 0.846234
|
||||
vt 0.699682 0.874273
|
||||
vt 0.653766 0.790763
|
||||
vt 0.250000 0.250000
|
||||
vt 0.153766 0.290763
|
||||
vt 0.125727 0.199681
|
||||
vt 0.209237 0.153766
|
||||
vt 0.500000 0.144103
|
||||
vt 0.346234 0.209237
|
||||
vt 0.300318 0.125727
|
||||
vt 0.351225 0.000000
|
||||
vt 0.144103 0.000000
|
||||
vt 0.000000 0.148774
|
||||
vt 0.000000 0.355896
|
||||
vt 0.199681 0.374273
|
||||
vt 0.148774 0.500000
|
||||
vt 0.644104 0.500000
|
||||
vt 0.709237 0.653766
|
||||
vt 0.625727 0.699681
|
||||
vt 0.500000 0.648774
|
||||
vt 0.800319 0.625727
|
||||
vt 0.846234 0.709237
|
||||
vt 0.874273 0.800318
|
||||
vt 0.374273 0.300318
|
||||
vt 0.290763 0.346234
|
||||
vt 1.000000 0.644103
|
||||
vt 1.000000 0.851226
|
||||
vt 0.851226 0.500000
|
||||
vt 0.500000 0.351226
|
||||
vt 0.855897 1.000000
|
||||
vt 0.500000 0.855896
|
||||
vt 0.648774 1.000000
|
||||
vt 0.355896 0.500000
|
||||
usemtl Material
|
||||
s off
|
||||
f 21/1 12/2 3/3 14/4
|
||||
f 22/5 20/6 7/7 19/8
|
||||
f 23/9 17/10 6/11 13/12
|
||||
f 24/13 19/8 7/7 15/14
|
||||
f 25/15 20/6 8/16 16/17
|
||||
f 26/18 10/19 4/20 16/21
|
||||
f 10/19 21/1 14/4 4/20
|
||||
f 1/22 9/23 21/1 10/19
|
||||
f 9/23 2/24 12/2 21/1
|
||||
f 17/10 22/5 19/8 6/11
|
||||
f 5/25 18/26 22/5 17/10
|
||||
f 18/26 8/16 20/6 22/5
|
||||
f 9/23 23/27 13/28 2/24
|
||||
f 1/22 11/29 23/27 9/23
|
||||
f 11/30 5/25 17/10 23/9
|
||||
f 33/31 30/2 12/2 24/31
|
||||
f 2/24 13/28 24/31 12/2
|
||||
f 13/12 6/11 19/8 24/13
|
||||
f 14/4 25/32 16/21 4/20
|
||||
f 3/3 15/33 25/32 14/4
|
||||
f 15/14 7/7 20/6 25/15
|
||||
f 18/26 26/34 16/17 8/16
|
||||
f 18/26 5/25 28/25 32/26
|
||||
f 11/29 1/22 10/19 26/18
|
||||
f 30/2 33/31 31/33 27/3
|
||||
f 28/25 29/30 34/34 32/26
|
||||
f 30/2 27/3 3/3 12/2
|
||||
f 24/13 15/14 31/14 33/13
|
||||
f 29/30 28/25 5/25 11/30
|
||||
f 26/34 18/26 32/26 34/34
|
||||
f 15/33 3/3 27/3 31/33
|
||||
f 34/18 29/29 11/29 26/18
|
7988
mods/default/models/player.x
Normal file
7988
mods/default/models/player.x
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,18 +6,80 @@
|
||||
-- Set mesh for all players
|
||||
function switch_player_visual()
|
||||
prop = {
|
||||
mesh="player.b3d",
|
||||
mesh = "player.x",
|
||||
textures = {"player.png", },
|
||||
colors = {{255, 255, 255, 255}, },
|
||||
visual = "mesh",
|
||||
visual_size = {x=1, y=1},
|
||||
}
|
||||
|
||||
for _, obj in pairs(minetest.get_connected_players()) do
|
||||
obj:set_properties(prop)
|
||||
obj:set_animation({x=1, y=50}, 35, 0)
|
||||
--obj:set_bone_position("", {x=0,y=0,z=0}, {x=0,y=0,z=0})
|
||||
end
|
||||
|
||||
minetest.after(1.0, switch_player_visual)
|
||||
end
|
||||
minetest.after(1.0, switch_player_visual)
|
||||
|
||||
-- Test case for attachments: An object is spawned and attached to the player with the specified name (use your own playername there) 10 seconds after the server starts
|
||||
|
||||
test2 = {
|
||||
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
||||
visual = "cube"
|
||||
}
|
||||
|
||||
minetest.register_entity("default:test2", test2)
|
||||
|
||||
function detachments(newobject)
|
||||
newobject:set_detach()
|
||||
print ("Detached test object")
|
||||
end
|
||||
|
||||
function attachments()
|
||||
prop = {
|
||||
mesh = "player.x",
|
||||
textures = {"player.png", },
|
||||
colors = {{255, 255, 255, 255}, },
|
||||
visual = "mesh",
|
||||
visual_size = {x=1, y=1},
|
||||
}
|
||||
|
||||
local pos={x=0,y=0,z=0}
|
||||
local newobject=minetest.env:add_entity(pos, "test:test2")
|
||||
newobject:set_properties(prop)
|
||||
newobject:set_animation({x=1, y=50}, 35, 0)
|
||||
print ("Spawned test object")
|
||||
|
||||
for _, obj in pairs(minetest.get_connected_players()) do
|
||||
if(obj:get_player_name() == "MirceaKitsune") then
|
||||
newobject:set_attach(obj, "Bone.001", {x=0,y=3,z=0}, {x=0,y=45,z=0})
|
||||
print ("Attached test object to "..obj:get_player_name())
|
||||
end
|
||||
end
|
||||
|
||||
minetest.after(5.0, function() detachments(newobject) end)
|
||||
end
|
||||
minetest.after(15.0, attachments)]]
|
||||
|
||||
-- Test case for player to player attachments
|
||||
|
||||
function attachments_player()
|
||||
for _, obj in pairs(minetest.get_connected_players()) do
|
||||
if(obj:get_player_name() == "MirceaKitsune") then
|
||||
for _, obj2 in pairs(minetest.get_connected_players()) do
|
||||
if(obj2:get_player_name() == "MirceaKitsune1") then
|
||||
obj2:set_attach(obj, "Bone.001", {x=0,y=6,z=0}, {x=0,y=45,z=0})
|
||||
print ("Attached player "..obj2:get_player_name().." to player "..obj:get_player_name())
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.after(10.0, attachments_player)
|
||||
|
||||
-- Definitions made by this mod that other mods can use too
|
||||
default = {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user