SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
83 stars 17 forks source link

Explosion_Min_Force vector3 requires legacy _Y key #4399

Open MoltonMontro opened 1 month ago

MoltonMontro commented 1 month ago

For example, this is the legacy parsing currently used by the Bicycle:

Explosion_Min_Force_X -16
Explosion_Min_Force_Y 128
Explosion_Min_Force_Z -16
Explosion_Max_Force_X 16
Explosion_Max_Force_Y 128
Explosion_Max_Force_Z 16

This property should support vector3 parsing, which could look like this:

Explosion_Min_Force (-16, 128, -16)
Explosion_Max_Force_X (16, 128, 16)

That does not work. Instead, you have to first specify the legacy _Y key. This looks like:

Explosion_Min_Force_Y 128
Explosion_Min_Force (-16, 128, -16)
Explosion_Max_Force_Y 128
Explosion_Max_Force (16, 128, 16)

This applies to Explosion_Max_Force as well. LOD_Center, LOD_Size, and Override_Center_Of_Mass are fine.

SDGNelson commented 1 month ago

You're right - it's checking for the _Y key to decide whether to assign the default value or not (very old). I'll fix this on the vehicles branch.

SDGNelson commented 1 month ago

Thanks by the way! This should be fixed in the next private branch version.

SDGNelson commented 1 month ago

Note to anyone who comes across this: It's not marked as "resolved on the preview branch" yet because this fix was made in a separate branch with the WIP vehicle changes.