Game Development Community

T3D 1.1 Beta 3 - Inventory "use" not functioning correctly in multiplayer because of dependence on client variables - RESOLVED

by Guy Allard · in Torque 3D Professional · 10/06/2010 (3:47 pm) · 5 replies

** editied for clarity

This one has been present in pretty much every T3D version. It's most noticeable when using a dedicated server, but is also an issue in any multiplayer situation.

Calling something like commandToServer('use', "RocketLauncher");
will not cause the rocket launcher to be used. This also affects the weapon cycling code.

The reason:
In inventory.cs
ShapeBase::use
checks to see if $zoomOn is false before calling the data.onUse function.

However, $zoomOn is a client side variable, and so will not exist on a dedicated server. The result is that data.onUse will not get called, and the item/weapon will not get used/mounted.
For a 'listen server', the $zoomOn variable will take the value of the hosting players zoom state, and will prevent onUse from firing for remote clients if the host is zoomed. Not pretty.

The ideal solution would be to implement some system for server side authority and monitoring of the zoom status of clients.

A quick hack would be to remove the $zoomOn check.

#1
10/07/2010 (2:16 pm)
Logged as TQA-1168 for the QA Team to verify.
#2
10/08/2010 (7:06 am)
Here's another report:

http://www.torquepowered.com/community/forums/viewthread/118617

and another:

http://www.torquepowered.com/community/forums/viewthread/120819/
#3
11/10/2010 (6:02 pm)
Bug confirmed.
#4
11/12/2010 (1:37 am)
i have same problem..

and i solved make custom value into shapebaseimagedata.

'isAim = false;'

and i replace '$ZoomOn' to '%this.getMountedImage($WeaponSlot).isAim'.
#5
04/24/2011 (6:20 pm)
Fixed in 1.1 Final and Preview.