File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -74,16 +74,25 @@ package {
74
74
if (! Global. base . settings . particles) break ;
75
75
for (var k: int = 0 ; k < 4 ; k++ )
76
76
spawnCoinPatricle(cx, cy, current == ItemId. COIN_BLUE );
77
- } else {
78
- if ((current == ItemId. COIN_GOLD || current == 110 ) && (gx. indexOf (cx) == - 1 || gy. indexOf (cy) == - 1 )) {
79
- coins++;
80
- gx. push (cx)
81
- gy. push (cy);
77
+ } else if (! isme){
78
+ var found: Boolean = false ;
79
+ for (var i: int = 0 ; i < gx. length ; i++ ) {
80
+ if (gx[ i] == cx && gy[ i] == cy) {
81
+ found = true ;
82
+ break ;
83
+ }
82
84
}
83
- else if ((current == ItemId. COIN_BLUE || current == 111 ) && (bx. indexOf (cx) == - 1 || by. indexOf (cy) == - 1 )) {
84
- bcoins++;
85
- bx. push (cx);
86
- by. push (cy);
85
+ if (! found) {
86
+ if (current == ItemId. COIN_GOLD || current == 110 ) {
87
+ coins++;
88
+ gx. push (cx)
89
+ gy. push (cy);
90
+ }
91
+ else if (current == ItemId. COIN_BLUE || current == 111 ) {
92
+ bcoins++;
93
+ bx. push (cx);
94
+ by. push (cy);
95
+ }
87
96
}
88
97
}
89
98
break ;
You can’t perform that action at this time.
0 commit comments