ParkourPenguin I post too much
Reputation: 152 Joined: 06 Jul 2014 Posts: 4690
|
Posted: Sun Aug 17, 2025 8:19 pm Post subject: |
|
|
That custom type isn't multiplying two ints. It's multiplying two floats. `mulss` means "multiply scalar single", with "single" referring to floats.
There is a problem with `cvttss2si` (convert / truncate scalar single to signed integer) if the truncated float is outside the valid range of the signed integer output type. This isn't likely to be relevant here: the float we're converting to an integer was created from an integer already in the game. If there was a chance of the float-to-int conversion overflowing, then what happens in the vanilla game when the integer wraps around is far more concerning.
Of course, users could always enter ridiculous values, but if they do that, it's their fault. _________________ I don't know where I'm going, but I'll figure it out when I get there.
|
|