1. Start the server, and connect one client. The player spawns normally and stands on the ground; the
player does not touch the car at any point.
2. How the player gets into the car: not through the get-in action. A server-side script (a test mod) spawns a fresh Offroad_02 4 m next to the player, and in the same script call starts the vehicle command
on the player, which seats the player in the driver seat:
// PlayerBase p: the connected player (found through GetGame().GetPlayers())
Transport car = Transport.Cast(GetGame().CreateObjectEx("Offroad_02", p.GetPosition() + "4 0 0", ECE_PLACE_ON_SURFACE | ECE_CREATEPHYSICS));
p.StartCommand_Vehicle(car, 0, 0); // Human.StartCommand_Vehicle(transport, position index 0 = driver, seat 0)
This runs only on the server; no script tells the client. On the server, p.IsInTransport() is then true and car.CrewMember(0) is the player (we did not check what the client shows). The car is bare (no wheels or other parts attached) and its engine is off.
3. About 6 s later the car is moved 60 m on the server, with the player inside:
car.SetPosition(Vector(x, surfaceY + 1.0, z));
car.SetOrientation(Vector(yaw, 0, 0));
car.GetPhysics().SetVelocity("0 0 0");
dBodySetAngularVelocity(car, "0 0 0");
dBodyActive(car, ActiveState.ACTIVE);
car.Synchronize();
The player and the car have SetAllowDamage(false) for 3 s around the move. The player stays seated and
unhurt.
4. About 10 s after the move, the car is deleted on the server, while the player is still seated:
GetGame().ObjectDelete(car);
5. The car disappears. The player is no longer in a vehicle IsInTransport() is false at the next check, 2 s later). The client keeps running.
6. About 19 s after the delete, the server crashes.
Reproduced 2 out of 2 runs. With the same sequence without the delete, the server runs on normally (this
test suite passes with 113 checks).
Not yet tried: getting into the car through the normal get-in action ActionGetInTransport) instead of
StartCommand_Vehicle, a car with wheels and a running engine, and a delete without the move before it.