LaihoE / demoparser

Counter-Strike 2 replay parser for Python and JavaScript
MIT License
289 stars 30 forks source link

`weapon_paint_seed` should be an integer #158

Closed thwonghin closed 1 month ago

thwonghin commented 6 months ago

For some reason weapon_paint_seed prop has floating points in the output of parse_ticks, while it should be an integer. I don't know if I should round up or round down to have the correct value.

LaihoE commented 6 months ago

Its a bit wonky atm, but it should not have any decimal values if it works correctly. ie value should be 370.0 --> 370

LaihoE commented 5 months ago

ah I was mixing it up with another thing. Are you sure it really is an integer? I think its really a float but people just round it?

thwonghin commented 5 months ago

ah I was mixing it up with another thing. Are you sure it really is an integer? I think its really a float but people just round it?

Honesly I don't really know what's the internal data representation of a paint seed.

It looks like people always see it as an integer (between 0-1000). I googled a bit and find this article about seed distrubution, the values it plots do not have decimal places.

And there are many skin sites also display it as an integer.

LaihoE commented 5 months ago

I think you are right. Maybe it should be an int after all. I just find it odd how the parser works without failing even with incorrect decoding of the value. I'll have to take a look at it.

LaihoE commented 1 month ago

https://github.com/LaihoE/demoparser/pull/200

Fixed here.