The online racing simulator
JRR for reseting
Hello.

I'm trying to reset player's car with no repairing in same location and I have trouble doing it.
Can someone show how to use JRR packet for reseting player in same location?

I think it should look something like this:
IS_JRR()->PLID($client->PLID)->JRRAction(JRR_RESET_NO_REPAIR)->StartPos()->Send();

I would think that you'd also need to populate the `ObjectInfo::$Flags` to be `0` as well within the JRR packet. (Not that I have any idea, I haven't used the JRR packet, ever.)
#3 - Racon
I'm not sure how this (or any other) library handles coordinates, but relative to what you receive in the MCI packets, the X and Y coords need to be divided by 4096, the Z by 16384 and the heading both divided by 256 and then rotated 180 degrees (add 128). And rounded/modded as appropriate, of course Wink

I can't find where I got the flags as 0x80 from, my notes have failed me Frown


$p = new IS_JRR();
$p->PLID = $PLID;
$p->UCID = 0;
$p->JRRAction = ($repair)
? JRR_RESET
: JRR_RESET_NO_REPAIR;
$p->X = round($MCI['X'] / 4096);
$p->Y = round($MCI['Y'] / 4096);
$p->Zbyte = round($MCI['Z'] / 16384)+1;
$p->Flags = 0x80;
$p->Index = 0;
$p->Heading = (round($MCI['Heading'] / 256) + 128 + $rotate) % 256;
send($p);

Quote from Racon :I'm not sure how this (or any other) library handles coordinates, but relative to what you receive in the MCI packets, the X and Y coords need to be divided by 4096, the Z by 16384 and the heading both divided by 256 and then rotated 180 degrees (add 128). And rounded/modded as appropriate, of course Wink

I can't find where I got the flags as 0x80 from, my notes have failed me Frown


$p = new IS_JRR();
$p->PLID = $PLID;
$p->UCID = 0;
$p->JRRAction = ($repair)
? JRR_RESET
: JRR_RESET_NO_REPAIR;
$p->X = round($MCI['X'] / 4096);
$p->Y = round($MCI['Y'] / 4096);
$p->Zbyte = round($MCI['Z'] / 16384)+1;
$p->Flags = 0x80;
$p->Index = 0;
$p->Heading = (round($MCI['Heading'] / 256) + 128 + $rotate) % 256;
send($p);


Thanks, Racon. Will try. Smile

JRR for reseting
(4 posts, started )
FGED GREDG RDFGDR GSFDG