mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-27 14:30:30 +00:00
syncing cars when joining works now
This commit is contained in:
1 parent
ad15846625
commit
ebc0dba4ef
1 file changed
+2
-1
+2
-1
@@ -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