Vehicle facing angle is bugged
#1

I don't think the command is bugged
PHP код:
SetVehicleZAngle(rentableVehicleInfo[rentable][vAngle]);
            
SetVehiclePos(rentableVehicleInfo[rentable][vX], VehicleInfo[rentable][vY], VehicleInfo[rentable][vZ]); 
because the vehicle respawns with the right angle and pos.

If a player pushes the vehicle and uses the respawn command, the vehicle is respawning correctly with the right pos and angle, but if the player leaves the area, goes far away and comes back, the vehicle facing angle is the one how the vehicle was pushed by the player.

Still, data inside the variable and database are the correct one and again if the vehicle gets respawned it spawns with the correct positions.

So it sounds like a desync bug? But what causes it...

So if the player touches or enters the vehicle while facing a way, thats how the vehicle will show for that player
Reply
#2

public OnVehicleSpawn(...
DestroyVehicle
CreateVehicle
then it should be right angle for vehicle
Reply
#3

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
public OnVehicleSpawn(...
DestroyVehicle
CreateVehicle
then it should be right angle for vehicle
Thanks.
Reply
#4

Or you can set the Z-Angle under OnVehicleStreamIn (with a slight delay of ~300ms). Note that you must set the angle only 1 time after spawn, not at every OnVehicleStreamIn call.

But the destroy/create procedure is known to be the best.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)