File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,11 @@ int can_move_x()
48
48
int i ;
49
49
for (i = 0 ; i < 20 ; ++ i )
50
50
{
51
- if (map1_data [(player_point .y + i ) / 8 ][player_point .x / 8 ] != 20 )
51
+ if (map1_data [(player_point .y + i ) / 8 ][player_point .x / 8 ] > 20 )
52
52
{
53
53
return 0 ;
54
54
}
55
- if (map1_data [(player_point .y + i ) / 8 ][(player_point .x + 9 ) / 8 ] != 20 )
55
+ if (map1_data [(player_point .y + i ) / 8 ][(player_point .x + 9 ) / 8 ] > 20 )
56
56
{
57
57
return 0 ;
58
58
}
@@ -65,12 +65,12 @@ int can_move_y()
65
65
int i ;
66
66
for (i = 0 ; i < 10 ; ++ i )
67
67
{
68
- if (map1_data [player_point .y / 8 ][(player_point .x + i ) / 8 ] != 20 )
68
+ if (map1_data [player_point .y / 8 ][(player_point .x + i ) / 8 ] > 20 )
69
69
{
70
70
is_in_air = 0 ;
71
71
return 0 ;
72
72
}
73
- if (map1_data [(player_point .y + 19 ) / 8 ][(player_point .x + i ) / 8 ] != 20 )
73
+ if (map1_data [(player_point .y + 19 ) / 8 ][(player_point .x + i ) / 8 ] > 20 )
74
74
{
75
75
is_in_air = 0 ;
76
76
return 0 ;
@@ -113,13 +113,16 @@ int detect_flip()
113
113
int i ;
114
114
for (i = 0 ; i < 21 ; ++ i )
115
115
{
116
- if (( map1_data [( player_point . y + i ) / 8 ][ player_point . x / 8 ] == 4 ) && !( is_in_flip ))
116
+ if (( i < 17 ) && ( i > 2 ))
117
117
{
118
- return 1 ;
119
- }
120
- if ((map1_data [(player_point .y + i ) / 8 ][(player_point .x + 9 ) / 8 ] == 4 ) && !(is_in_flip ))
121
- {
122
- return 1 ;
118
+ if ((map1_data [(player_point .y + i ) / 8 ][player_point .x / 8 ] == 4 ) && !(is_in_flip ))
119
+ {
120
+ return 1 ;
121
+ }
122
+ if ((map1_data [(player_point .y + i ) / 8 ][(player_point .x + 9 ) / 8 ] == 4 ) && !(is_in_flip ))
123
+ {
124
+ return 1 ;
125
+ }
123
126
}
124
127
if (i < 10 )
125
128
{
You can’t perform that action at this time.
0 commit comments