English reqcld reliability

2 replies
Goto Page
To the start Previous 1 Next To the start
14.01.12 07:52:59 pm
Up
Banaan
User
Offline Off
Is it safe to presume that I receive client data every time I request it, or do I have to check for packet loss myself?

Furthermore, how is it possible that sometimes the cursor is at a distance of for instance 2413 or 4186 pixels from the player? I strongly doubt it's because of this simple calculation in which nothing should go wrong:

Code:
1
math.floor( math.sqrt(((player(id, "x") - x) ^ 2) + ((player(id, "y") - y) ^ 2)) + 0.5 )
14.01.12 08:44:26 pm
Up
DC
Admin
Offline Off
yeah, reqcld uses a safe transfer mode. CS2D ensures that the requested data will arrive. so you don't have to care about packet loss.

about the second thing: I don't really know. maybe you didn't request the absolute cursor position? you can request the cursor position with the current map scrolling offset included (absolute cursor position) or just the offset or the position without offset.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
14.01.12 09:18:19 pm
Up
Banaan
User
Offline Off
Code:
1
reqcld(id, 2)

fetches the absolute cursor position right?

Well, maybe I should just try
Code:
1
math.floor( math.sqrt(((320 - x) ^ 2) + ((240 - y) ^ 2)) + 0.5 )

along with mode 0
To the start Previous 1 Next To the start