Horrible.
PHP Code:
//#CLIENTSIDE
if (created) {
disabledefmovement;
}
if (timeout)
{
this.mx = (keydown(0) - keydown(2))/2;
this.my = (keydown(3) - keydown(1))/2;
if (!onwall(playerx + this.mx,playery))
playerx += this.mx;
if (!onwall(playerx,playery + this.my))
playery += this.my;
playery += 0.1;
timeout = 0.05;
}
This is a lot better, but may not be what you want (I just rescripted what you did)
Try to keep it short and simple, and make sure that you don't get conditions where events should go... Use KSI-GS... Think about what you really want.
--- EDIT:
Something you might want to take in consideration is that the gravitational pull accellerates with time. Thereby, a constant for the decrease wouldn't be what you're aiming for.