Forum

> > CS2D > Scripts > reqcld reliability
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch reqcld reliability

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt reqcld reliability

Banaan
User Off Offline

Zitieren
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 )

alt Re: reqcld reliability

DC
Admin Off Offline

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

alt Re: reqcld reliability

Banaan
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht