Game Development Community

Ironsights Resource Not Networked.

by CSMP · in Torque 3D Professional · 01/30/2012 (2:26 pm) · 3 replies

Hey all,
I've tested the Ironsights resource (www.garagegames.com/community/resources/view/21418) and noticed that it is not networked, everything seems to be setup for it yet on a Dedicated server (since there is no player host) nothing happens and the call is never sent to the correct client.

I have a similiar function for zooming a sniper rifle and it has the same exact problem, there is something I'm missing about the networking and I have not been able to figure it out.

Has anyone been able to get the Ironsights Resource networked?

#1
01/31/2012 (12:41 am)
From what I understand of the resource, the call that actually makes iron sights work is the client command. Have you tried echoing out all the appropriate variables to see what is and isn't being called? I can't see anything in the resource that seems to be going wrong. Have you tried connecting to a non-dedicated host?

Also, for the record, this resource works by modifying the weapon image datablocks, which is NOT a good idea. While it may work, especially in single-player games, it defies the entire purpose of the datablock design paradigm and is likely to break when you introduce multiple clients.
#2
01/31/2012 (1:04 am)
I've been looking into this as well, I'm working on network stuff at the moment.
I run multiple instances on this pc and on a slave pc for testing, and on any clients, it fails.
on the server(host) game it seems to work.

@Daniel,
your second paragraph,
what would you suggest to get and change those values without source changes?

#3
02/01/2012 (12:40 am)
I know it's not particularly helpful to point out problems without offering a solution of my own, but this is a case where I really see no 'proper' solution without source edits. My best suggestion would be to make iron-sights arm animations and play those when aiming, but that'd take significantly more work and provide an inferior effect. You might also be able to do something with the new FP arm animations, but I really don't know how those work.

I think the reason why you only see this o the host is all those data block values you're modifying in the servercmd. These changes are only applied to the server data block object. Clients have no way of knowing about these changes unless you send them to the appropriate client, like you do in the clientcmd... But you only send one change to the client, it looks like.