Code:
sh_set_hero_speed(gHeroID, pcvarGrav)
change to
Code:
sh_set_hero_grav(gHeroID, pcvarGrav)
everything that jelle mentioned was optimization issues, this is the culprit for the actual problem
__________________
If at first you don't succeed, then skydiving isn't for you.