Added one more direction into collision checks

* Added direction XM_XP
* Improved performance, thanks STR and xoft
Begin implementing ascending rails