openplanet-nl / vehiclestate

The VehicleState dependency plugin in Openplanet.
1 stars 4 forks source link

VehicleState::GetVehicleType does not work for DesertCar #18

Closed nicoell closed 4 months ago

nicoell commented 4 months ago

VehicleState::GetVehicleType returns CarSport (1) while driving with DesertCar. CarSport, CarSnow and CarRally seem to work.

Tested with Openplanet 1.26.25

CodyNinja1 commented 4 months ago

can you provide exact map(s) that have this issue?

codecat commented 4 months ago

@ezio416

nicoell commented 4 months ago

Exact repro steps:

  1. Create a new Map in Editor
  2. Place a Desert Car gate
  3. (Optional) Place gates for other cars for reference
  4. Create a test script to output the VehicleState::GetVehicleType, e.g. log to Console
  5. Enter Test Mode, drive through the Gates

You should see that VehicleState::GetVehicleType returns CarSport (1) while driving with Desert car

Here's a screenshot showing my test setup and my Dev integration into EditorRoute plugin. The EditorRoute integration is not of question here, I tested with logging to the console, It's merely meant to showcase the test map. image

codecat commented 4 months ago

I fixed this, but it leaves me wondering whether our approach to finding the vehicle type is correct. I will do some research.

Edit: It is not. This will break again in the future. I'll re-open this issue and will fix this properly.

smalljustin commented 4 months ago

Tested today and this issue has come up again. I tried both using gates, and creating a new rally map directly (through the 'create a new map' thing). Impacts Rally and Desert.

codecat commented 4 months ago

This was fixed shortly after the latest update, so it hasn't landed in an Openplanet update yet. It should be fixed next update. I'll try to prioritize releasing an update soon.