Forum

> > CS2D > Scripts > reqcld reliability
Forums overviewCS2D overview Scripts overviewLog in to reply

English reqcld reliability

2 replies
To the start Previous 1 Next To the start

old reqcld reliability

Banaan
User Off Offline

Quote
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:

1
math.floor( math.sqrt(((player(id, "x") - x) ^ 2) + ((player(id, "y") - y) ^ 2)) + 0.5 )

old Re: reqcld reliability

DC
Admin Off Offline

Quote
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.

old Re: reqcld reliability

Banaan
User Off Offline

Quote
1
reqcld(id, 2)
fetches the absolute cursor position right?

Well, maybe I should just try
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
Log in to reply Scripts overviewCS2D overviewForums overview