Metastruct/outfitter

Inconsistent behavior with viewmodel overrides

sr229 opened this issue · 5 comments

sr229 commented

There are times that Outfitter can use the workshop model's viewmodel arms but it's mostly a hit or miss with the viewmodel arms overrides.

This was tested with two workshop models, both have viewmodels:

I'm having the same issue. Both of my listed addons have viewmodels with the first link working but the second one does not.

https://steamcommunity.com/sharedfiles/filedetails/?id=2852693758
https://steamcommunity.com/sharedfiles/filedetails/?id=2908317736

Since we can't use the lua that tells which viewmodel is for which outfit it makes a guess. I could try running the lua to safely extract the mapping in the future. This should really have been handled inside the mdl but I don't think we have any place to store such information easily.

(Alternatively I could make a GUI to let you choose the viewmodel, but that gets strange for players to use.)

For now I can try improving the guessing system because at least the mapping should be easy if you name things correctly:
models/raptors/producer_raptor.mdl
models/weapons/arms/producer_raptor_arms.mdl

sr229 commented

Since we can't use the lua that tells which viewmodel is for which outfit it makes a guess. I could try running the lua to safely extract the mapping in the future. This should really have been handled inside the mdl but I don't think we have any place to store such information easily.

(Alternatively I could make a GUI to let you choose the viewmodel, but that gets strange for players to use.)

For now I can try improving the guessing system because at least the mapping should be easy if you name things correctly: models/raptors/producer_raptor.mdl models/weapons/arms/producer_raptor_arms.mdl

You could go for a greedy search to look for *_arms.mdl or models containing in a c_arms/* folder but that's probably too expensive and slow.