MantisBT - Zandronum
View Issue Details
0002671Zandronum[All Projects] Bugpublic2016-03-07 04:512018-09-30 22:02
throwaway 
Torr Samaho 
normalmajoralways
closedfixed 
 
3.03.0 
0002671: TIDs only sent to client as short - huge issues when combined with UniqueTID()
UniqueTID() can return any TID in the range [1, 0x7FFFFFFF].

Only TIDs in the range [1, 32767] will be sent properly to the client, since the TID is sent as a signed short.

This causes quite a few issues with using UniqueTID() and newly-spawned actors as a way to send position data to the client (presumably you could also send angle/pitch data this way, but I haven't messed with that), namely that the client only gets a correct TID about 1/65536 of the time.

Right now, almost no Zandronum mods use UniqueTID(), but as mods get developed for Zandronum 3.0, this could very easily become an issue.
No tags attached.
Issue History
2016-03-07 04:51throwawayNew Issue
2016-03-07 09:54ZzZomboNote Added: 0014566
2016-03-20 14:45Torr SamahoNote Added: 0014588
2016-03-20 16:14cobaltAssigned To => Torr Samaho
2016-03-20 16:14cobaltStatusnew => needs testing
2016-03-20 16:14cobaltTarget Version => 3.0
2016-03-20 16:14cobaltDescription Updatedbug_revision_view_page.php?rev_id=8838#r8838
2016-03-20 16:14cobaltNote Added: 0014597
2016-06-04 17:36Ru5tK1ngNote Added: 0015008
2016-06-04 17:36Ru5tK1ngStatusneeds testing => resolved
2016-06-04 17:36Ru5tK1ngResolutionopen => fixed
2016-06-04 17:36Ru5tK1ngFixed in Version => 3.0
2016-06-04 17:36Ru5tK1ngDescription Updatedbug_revision_view_page.php?rev_id=9047#r9047
2018-09-30 22:02Blzut3Statusresolved => closed

Notes
(0014566)
ZzZombo   
2016-03-07 09:54   
That might explain quite a few things, but, actually negative TIDs are valid too, and can be returned by specifying a negative starting TID.
(0014588)
Torr Samaho   
2016-03-20 14:45   
SERVERCOMMANDS_SetThingTID now sends the TID as long.
(0014597)
cobalt   
2016-03-20 16:14   
Issue addressed by commit f928a926b864: SERVERCOMMANDS_SetThingTID now sends the TID as long (addresses 2671).
Committed by Benjamin Berkels [Torr Samaho] on Wednesday 31 December 1969 23:59:57

Changes in files:

 src/cl_main.cpp | 4 ++--
 src/sv_commands.cpp | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

(0015008)
Ru5tK1ng   
2016-06-04 17:36   
Tested this online with r160519-2047 and UniqueTID successfully returned values +/-0x7FFFFFFF and values in between.