- Change the character jumping variables and methods from int to char.
- Limit the maxJumps integer value from 0 to 255.
- Allow to set the minimum jump amount to 0.
I wonder if a value of 0 is useful since we've supported it in the past. I guess it could be used as a quick way to disable jumping from the Python API.
Whilst I recognise this might be a quick hack, I think the user code should be responsible for this, not the character wrapper.
Also, shouldn't the PY API enforce unsigned positive, between range?
I am not 100% sure what you mean here. But I try to answer you, how I think what you want to tell me.
This is an existing API. I can't remove the API without breaking existing code. Also it is necessary to get double jumps working with the LB motion actuator.
For converting Python arguments with an integer value, we use PyLong_AsLong which returns a C long representation, with LONG_MAX (2147483647L) as maximum. So we need to manually clamp the range to 255.