289 dx.isNegative:= GetRandom(2) = 0; |
289 dx.isNegative:= GetRandom(2) = 0; |
290 dx.QWordValue:= QWord($40DA) * GetRandom(10000) * 8; |
290 dx.QWordValue:= QWord($40DA) * GetRandom(10000) * 8; |
291 dy.isNegative:= false; |
291 dy.isNegative:= false; |
292 dy.QWordValue:= QWord($3AD3) * GetRandom(7000) * 8; |
292 dy.QWordValue:= QWord($3AD3) * GetRandom(7000) * 8; |
293 if GetRandom(2) = 0 then |
293 if GetRandom(2) = 0 then |
294 dx := -dx |
294 dx := -dx; |
295 end; |
295 Tint:= $FFFFFFFF |
|
296 end |
|
297 else |
|
298 Tint:= (ExplosionBorderColor shr RShift and $FF shl 24) or |
|
299 (ExplosionBorderColor shr GShift and $FF shl 16) or |
|
300 (ExplosionBorderColor shr BShift and $FF shl 8) or $FF; |
296 State:= State or gstInvisible; |
301 State:= State or gstInvisible; |
297 // use health field to store current frameticks |
302 // use health field to store current frameticks |
298 if vobFrameTicks > 0 then |
303 if vobFrameTicks > 0 then |
299 Health:= random(vobFrameTicks) |
304 Health:= random(vobFrameTicks) |
300 else |
305 else |
301 Health:= 0; |
306 Health:= 0; |
302 // use timer to store currently displayed frame index |
307 // use timer to store currently displayed frame index |
303 if gear^.Timer = 0 then Timer:= random(vobFramesCount); |
308 if gear^.Timer = 0 then Timer:= random(vobFramesCount); |
304 Damage:= (random(2) * 2 - 1) * (vobVelocity + random(vobVelocity)) * 8; |
309 Damage:= (random(2) * 2 - 1) * (vobVelocity + random(vobVelocity)) * 8 |
305 Tint:= ((ExplosionBorderColor and RMask) shl RShift) or |
|
306 ((ExplosionBorderColor and GMask) shl GShift) or |
|
307 ((ExplosionBorderColor and BMask) shl BShift) or $FF; |
|
308 end |
310 end |
309 end; |
311 end; |
310 gtGrave: begin |
312 gtGrave: begin |
311 gear^.ImpactSound:= sndGraveImpact; |
313 gear^.ImpactSound:= sndGraveImpact; |
312 gear^.nImpactSounds:= 1; |
314 gear^.nImpactSounds:= 1; |