Revision 8baa1fe6
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/DistortedAttachDaemon.java | ||
---|---|---|
83 | 83 |
return ( num>0 ); |
84 | 84 |
} |
85 | 85 |
|
86 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
87 |
|
|
88 |
static void cancelAttachJobs(DistortedAttacheable a, DistortedEffects e) |
|
89 |
{ |
|
90 |
int num = mJobs.size(); |
|
91 |
Job job; |
|
92 |
|
|
93 |
for(int i=0; i<num; i++) |
|
94 |
{ |
|
95 |
job = mJobs.get(i); |
|
96 |
|
|
97 |
if( job.type == ATTACH && job.attacheable==a ) |
|
98 |
{ |
|
99 |
DistortedEffects effects = job.object.getEffects(); |
|
100 |
|
|
101 |
if( effects.getID() == e.getID() ) |
|
102 |
{ |
|
103 |
mJobs.remove(i); |
|
104 |
break; |
|
105 |
} |
|
106 |
} |
|
107 |
} |
|
108 |
} |
|
109 |
|
|
86 | 110 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
87 | 111 |
|
88 | 112 |
static void attach(DistortedAttacheable a, DistortedNode n) |
Also available in: Unified diff
When detaching Nodes, do make sure we also cancel any ATTACH jobs that might be pending.