[Bug] Don't enough worlds

Started by EK.IceFlake, May 11, 2017, 03:50 PM

Previous topic - Next topic

EK.IceFlake

Description
I can't set a player's world to a value higher than 65535. Doing so would be the equivalent of <specified value> % 65536. On the VCMP blog is advertised 2^32/2-1.

Reproducible
Always

What you were doing when the bug happened
Testing worlds

What you think caused the bug
Using uint16 somewhere instead of int32 and int32 elsewhere.

Note
Summoning @. because this was on his plugin. It might be an integer overflow due to him using uint16 instead of an issue with the actual server.

.

#1
I'm actually using a 32 bit integer because using a 16 bit integer would make no sense at all since there are no performance gains: https://github.com/iSLC/VCMP-SqMod/blob/master/source/Entity/Player.cpp#L399 Actually, it would worsen the performance because it would have to perform integer overflow tests more often. And in fact, it'll be a 32 bit integer on the register and then converted to a 16 bit one. Thus making no sense. The only time using a smaller unit actually makes sense is when you want to save memory on bulks of such values.

So the limitation shouldn't be from the plugin itself.
.