ent_bonerotate in multiplayer

Posted By: molotov

ent_bonerotate in multiplayer - 06/06/10 22:22

I'm working on a multiplayer game and I've got it working great except the bone rotation. I use ent_bonerotate but somehow the changed angles isn't send to the clients. I had a test run with the sever/client and two clients. The server showed the right angles in his view but not on both clients. Client1 had correct angles on the server side and on it's own side but not on client2. Client2 had the right angles on the server and on it's own side but not on the client1 side.
Hope someone knows how to solve this. Many thanks in advance.
Posted By: Quad

Re: ent_bonerotate in multiplayer - 06/06/10 22:59

you need to send the angle of the bone from server to the other clients, and rotate the bones client-side.
Posted By: molotov

Re: ent_bonerotate in multiplayer - 06/07/10 08:07

Thanks Quadraxas for your fast reply. I did make a function on the client side to rotate the bones, that works great on that particular client. But the problem is that the changes angles on the server aren't send to other clients.
Posted By: molotov

Re: ent_bonerotate in multiplayer - 06/08/10 13:07

Can anyone help me, it would really be appreciated.
Posted By: Razoron

Re: ent_bonerotate in multiplayer - 06/08/10 14:30

I don't use the Network functions of Gamestudio, but maybe you can store the angles in skills and send them with send_skill.
Some parts of the code would be nice.
Posted By: Dark_samurai

Re: ent_bonerotate in multiplayer - 06/08/10 14:32

Use a skill to store the new angle of the bone and then send the skill to all clients. On the clients you can now change the bone.
Posted By: molotov

Re: ent_bonerotate in multiplayer - 06/08/10 15:06

Hey Razoron and Dark_samurai, I'll post a demo of my project, so you could see the code and how it works in action.
Posted By: molotov

Re: ent_bonerotate in multiplayer - 06/08/10 15:12

Here's the link, controls are "wasd" + the cursor keys:
http://rapidshare.com/files/396709458/multiplayer.rar.html
Posted By: molotov

Re: ent_bonerotate in multiplayer - 06/08/10 16:57

The link above can only be downloaded 10 times, so to make sure it could be proper downloaded, here's a new link:
http://rapidshare.com/files/396742917/multiplayer.rar

Also you can use the server.bat and the client.bat files to test run.
Posted By: molotov

Re: ent_bonerotate in multiplayer - 06/10/10 09:50

No reply sofar, can nobody help me with this?
Posted By: Dark_samurai

Re: ent_bonerotate in multiplayer - 06/10/10 13:34

What shall we do with your code? We already told you how you can do this:

Quote:
Use a skill to store the new angle of the bone and then send the skill to all clients. On the clients you can now change the bone.


After reading the multiplayer workshop you should be able to do this.
Posted By: molotov

Re: ent_bonerotate in multiplayer - 06/10/10 14:36

Hey Dark_samurai, I've tryed it but still it doesn't work. The angles of the bone are send to all clients and server. I've a rotorblade attach to my player, this one rotates according to the bone angle. In every client and the server it rotates nicely. But the problem is that the player model has vertices attached to the bone and they do not rotate with the bone.
Posted By: Rackscha

Re: ent_bonerotate in multiplayer - 06/10/10 15:07

So, its a mesh problem?
Posted By: molotov

Re: ent_bonerotate in multiplayer - 06/10/10 17:22

I don't know, because on every client that connects the angles are nice on that client and on the server. But when a new client connects the angles of the previous client aren't displayed.
Posted By: Quad

Re: ent_bonerotate in multiplayer - 06/10/10 19:08

once again, YOU have to MANUALLY send the angles to newly connected client AND use ent_bonerotate client-side.
Posted By: EvilSOB

Re: ent_bonerotate in multiplayer - 06/10/10 20:50

in other words, you need to manually sycronise the new clients bones to the same state
that everyone else is currently at, before you can start recieving "new" updated positions...
Posted By: molotov

Re: ent_bonerotate in multiplayer - 06/10/10 22:23

Thanks everybody sofar for the answers. Sofar no solution yet. To Quadraxas and EvilSOB, the bone rotates in every client and server, that's not the problem. What happens is that the angle of the bone rotates but the attached vertices do not follow. This only happens on every client that connects after this client. While on the client that created the model it turns good but on the sametime it doesn't turn on every other client that connects after. It does turn however on every client that was connected before this particular client.
© 2024 lite-C Forums