Ranking
Original Post
[lua] Bug?
This code:
    
for k = 0, 1 do
        for i=0, 19 do
                x, y, z = get_joint_pos(k, i)
                Info = get_joint_info(k, i)
                State = Info.state
                if(State == 1) then
                set_color(1, 0, 0, 1)
                elseif(State == 2) then
                set_color(0, 0, 1, 1)
                elseif(State == 3) then
                set_color(1, 0, 1, 1)
                elseif(State == 4) then
                set_color(0, 1, 0, 1)
                end
                Radius = get_joint_radius(k, i)
                --x = x/2
                --y = y/2
                --z = z/2+1
                draw_sphere(x, y, z, Radius+0.01)
        end
    end
This code draws spheres of different colour on the players joints.
If all are set to extend, the bottom half go blue and the top half go red.
Suggesting that for the lower joints the get_joint_info(p,j).state's are set up differently.
:D