Rhama, any data can be sent from client to server by using /i command even in current patch. What was suggested is server->client communication.
int next_node_index = (car->current_node + 1) % num_nodes;
PathNode *next_node = Nodes + next_node_index;
Vector2d rel_pos = car->pos - next_node->pos;
if (dot_product(rel_pos, next_node->dir) > 0.0f) // crossed the next node
{
car->current_node = next_node_index;
}
else // didn't cross the next node - check previous node
{
PathNode *prev_node = Nodes + car->current_node;
rel_pos = car->pos - prev_node->pos;
if (dot_product(rel_pos, prev_node->dir) < 0.0f)
{
if (car->current_node)
{
car->current_node--;
}
else
{
car->current_node = num_nodes - 1;
}
}
}
struct IS_RST // Race STart
{
byte Size; // 28
byte Type; // ISP_RST
byte ReqI; // 0 unless this is a reply to an TINY_RST request
byte Zero;
byte RaceLaps; // 0 if qualifying
byte QualMins; // 0 if race
byte NumP; // number of players in race
byte Timing; // lap timing (see below)
char Track[6]; // short track name
byte Weather;
byte Wind;
word Flags; // race flags (must pit, can reset, etc - see below)
word NumNodes; // total number of nodes in the path
word Finish; // node index - finish line
word Split1; // node index - split 1
word Split2; // node index - split 2
word Split3; // node index - split 3
};
// Lap timing info (for Timing byte)
// bits 6 and 7 (Timing & 0xc0) :
// 0x40 : standard timing
// 0x80 : custom timing
// 0xc0 : no lap timing
// bits 0 and 1 (Timing & 0x03) : number of checkpoints if lap timing is enabled
// ALLOWED CARS
// ============
// You can send a packet to limit the cars that can be used by a given connection
struct IS_PLC // PLayer Cars
{
byte Size; // 12
byte Type; // ISP_PLC
byte ReqI; // 0
byte Zero;
byte UCID; // connection's unique id
byte Sp1;
byte Sp2;
byte Sp3;
unsigned Cars; // allowed cars - see below
};
// XF GTI - 1
// XR GT - 2
// XR GT TURBO - 4
// RB4 GT - 8
// FXO TURBO - 0x10
// LX4 - 0x20
// LX6 - 0x40
// MRT5 - 0x80
// UF 1000 - 0x100
// RACEABOUT - 0x200
// FZ50 - 0x400
// FORMULA XR - 0x800
// XF GTR - 0x1000
// UF GTR - 0x2000
// FORMULA V8 - 0x4000
// FXO GTR - 0x8000
// XR GTR - 0x10000
// FZ50 GTR - 0x20000
// BMW SAUBER F1.06 - 0x40000
// FORMULA BMW FB02 - 0x80000