debug feature 10

[MOD] Change "BOOLEAN upward" to "int upward"
[NEW] ( upward == 0 ) ? FALSE : TRUE