getting number of sprite frames on server Created 5 years ago2018-12-29 01:53:25 UTC by tschumann tschumann

Created 5 years ago2018-12-29 01:53:25 UTC by tschumann tschumann

Posted 5 years ago2018-12-29 01:53:25 UTC Post #341515
It seems like MODEL_FRAMES in the method that should return that information (based on its usage in the server code) but I've used it on some sprites and it returns some massive number (>1 billion I think).
Is there a way to do this? Without opening the sprite and parsing it myself?
Posted 5 years ago2018-12-29 09:17:11 UTC Post #341520
Can you provide a piece of example code? It would save whoever decides to look into this some time
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-12-29 09:36:38 UTC Post #341521
Are you sure it's actually a sprite? If it's a studio model it will return what looks like the largest valid value for pev->body for that model.
Posted 5 years ago2018-12-30 04:45:00 UTC Post #341523
Alright I tried it again and now it's returning the right number - not sure what was happening before - might have passed the wrong pev somewhere.
MODEL_FRAMES( pForward->pev->modelindex ) works (I assume modelindex gets populated by the engine).
You must be logged in to post a response.