Skip to content

AltAsync.CreateVehicle stopped working properly in dev15 #752

@vanlueckn

Description

@vanlueckn

We use the following code to create a vehicle:

  public static async Task<VehicleEntity> CreateAsync(PlusVehicle plusVehicle)
    {
        var vehicle = (VehicleEntity)await AltAsync.CreateVehicle(plusVehicle.Info.Model, (Vector3)plusVehicle.Position,
            plusVehicle.Rotation);

        if (vehicle is not { Exists: true }) return null;

        await vehicle.LoadAsync(plusVehicle);

        return vehicle;
    }

In v14 the vehicle gets created properly, in dev224 of v15 the server stops at AltAsync.CreateVehicle forever. The error only appears if we try to create the vehicles in the constructor of a class with the IScript interface implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions