mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-22 16:06:43 +00:00
syncing cars when joining works now
This commit is contained in:
@@ -454,10 +454,11 @@ impl Server {
|
|||||||
for client in &self.clients {
|
for client in &self.clients {
|
||||||
let pid = client.id as usize;
|
let pid = client.id as usize;
|
||||||
if pid != client_idx {
|
if pid != client_idx {
|
||||||
|
let role = client.get_roles();
|
||||||
for (vid, car) in &client.cars {
|
for (vid, car) in &client.cars {
|
||||||
self.clients[client_idx]
|
self.clients[client_idx]
|
||||||
.queue_packet(Packet::Raw(RawPacket::from_str(&format!(
|
.queue_packet(Packet::Raw(RawPacket::from_str(&format!(
|
||||||
"Os:{}:{pid}-{vid}:{}",
|
"Os:{role}:{}:{pid}-{vid}:{}",
|
||||||
client.get_name(),
|
client.get_name(),
|
||||||
car.car_json,
|
car.car_json,
|
||||||
))))
|
))))
|
||||||
|
|||||||
Reference in New Issue
Block a user