FabianTerhorst / coreclr-module

Old alt:V CoreClr (.NET Core Common Language Runtime) community made module. New: https://github.com/altmp/coreclr-module
MIT License
72 stars 67 forks source link

AltAsync.CreateVehicle stopped working properly in dev15 #752

Open vanlueckn opened 1 year ago

vanlueckn commented 1 year ago

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.

Doxoh commented 9 months ago

can u retest with latest nuget version 16.0.1