205 while t <> nil do |
205 while t <> nil do |
206 begin |
206 begin |
207 curHandledGear:= t; |
207 curHandledGear:= t; |
208 t:= curHandledGear^.NextGear; |
208 t:= curHandledGear^.NextGear; |
209 |
209 |
210 if curHandledGear^.Message and gmRemoveFromList <> 0 then |
210 if curHandledGear^.Message and gmDelete <> 0 then |
211 begin |
211 DeleteGear(curHandledGear) |
212 RemoveGearFromList(curHandledGear); |
212 else |
213 // since I can't think of any good reason this would ever be separate from a remove from list, going to keep it inside this block |
213 begin |
214 if curHandledGear^.Message and gmAddToList <> 0 then InsertGearToList(curHandledGear); |
214 if curHandledGear^.Message and gmRemoveFromList <> 0 then |
215 curHandledGear^.Message:= curHandledGear^.Message and (not (gmRemoveFromList or gmAddToList)) |
215 begin |
216 end; |
216 RemoveGearFromList(curHandledGear); |
217 if curHandledGear^.Active then |
217 // since I can't think of any good reason this would ever be separate from a remove from list, going to keep it inside this block |
218 begin |
218 if curHandledGear^.Message and gmAddToList <> 0 then InsertGearToList(curHandledGear); |
219 if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then |
219 curHandledGear^.Message:= curHandledGear^.Message and (not (gmRemoveFromList or gmAddToList)) |
220 begin |
220 end; |
221 FreeTexture(curHandledGear^.Tex); |
221 if curHandledGear^.Active then |
222 curHandledGear^.Tex:= RenderStringTex(inttostr(curHandledGear^.Timer div 1000), cWhiteColor, fntSmall); |
222 begin |
223 end; |
223 if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then |
224 curHandledGear^.doStep(curHandledGear); |
224 begin |
225 // might be useful later |
225 FreeTexture(curHandledGear^.Tex); |
226 //ScriptCall('onGearStep', Gear^.uid); |
226 curHandledGear^.Tex:= RenderStringTex(inttostr(curHandledGear^.Timer div 1000), cWhiteColor, fntSmall); |
|
227 end; |
|
228 curHandledGear^.doStep(curHandledGear); |
|
229 // might be useful later |
|
230 //ScriptCall('onGearStep', Gear^.uid); |
|
231 end |
227 end |
232 end |
228 end; |
233 end; |
229 curHandledGear:= nil; |
234 curHandledGear:= nil; |
230 |
235 |
231 if AllInactive then |
236 if AllInactive then |