by edh » Fri Feb 15, 2008 4:22 pm
Ok, that one deserves some explanation...
This tests to see if the collision actors name is not the same (!=) as ground_actor...
strcmp (collides.clonename, ground_actor) != 0
strcmp returns zero if the two strings match.
In this case, we're trying to enable/disable jumping. Since, in my example, jumping increases with each jump action to simulate falling I set the jump to the max jump number. Effectively, that is supposed to disable jumping from midair when you fall off a platform.
There is some unexpected bahavior which keeps it from really working in practice (you can't always jump when you are on a platform because of the flip/flop between collision and collision end with the platform).
So you have it right; it's disabling jump by setting that number, not allowing jump.