265 if GetRandom(2) = 0 then |
265 if GetRandom(2) = 0 then |
266 dx := -dx |
266 dx := -dx |
267 end; |
267 end; |
268 State:= State or gstInvisible; |
268 State:= State or gstInvisible; |
269 Health:= random(vobFrameTicks); |
269 Health:= random(vobFrameTicks); |
270 Timer:= random(vobFramesCount); |
270 if gear^.Timer = 0 then Timer:= random(vobFramesCount); |
271 Damage:= (random(2) * 2 - 1) * (vobVelocity + random(vobVelocity)) * 8; |
271 Damage:= (random(2) * 2 - 1) * (vobVelocity + random(vobVelocity)) * 8; |
272 end |
272 end |
273 end; |
273 end; |
274 gtGrave: begin |
274 gtGrave: begin |
275 gear^.ImpactSound:= sndGraveImpact; |
275 gear^.ImpactSound:= sndGraveImpact; |
277 gear^.Radius:= 10; |
277 gear^.Radius:= 10; |
278 gear^.Elasticity:= _0_6; |
278 gear^.Elasticity:= _0_6; |
279 end; |
279 end; |
280 gtBee: begin |
280 gtBee: begin |
281 gear^.Radius:= 5; |
281 gear^.Radius:= 5; |
282 gear^.Timer:= 500; |
282 if gear^.Timer = 0 then gear^.Timer:= 500; |
283 gear^.RenderTimer:= true; |
283 gear^.RenderTimer:= true; |
284 gear^.Elasticity:= _0_9; |
284 gear^.Elasticity:= _0_9; |
285 gear^.Tag:= 0; |
285 gear^.Tag:= 0; |
286 end; |
286 end; |
287 gtSeduction: begin |
287 gtSeduction: begin |
288 gear^.Radius:= 250; |
288 gear^.Radius:= 250; |
289 end; |
289 end; |
290 gtShotgunShot: begin |
290 gtShotgunShot: begin |
291 gear^.Timer:= 900; |
291 if gear^.Timer = 0 then gear^.Timer:= 900; |
292 gear^.Radius:= 2 |
292 gear^.Radius:= 2 |
293 end; |
293 end; |
294 gtPickHammer: begin |
294 gtPickHammer: begin |
295 gear^.Radius:= 10; |
295 gear^.Radius:= 10; |
296 gear^.Timer:= 4000 |
296 if gear^.Timer = 0 then gear^.Timer:= 4000 |
297 end; |
297 end; |
298 gtHammerHit: begin |
298 gtHammerHit: begin |
299 gear^.Radius:= 8; |
299 gear^.Radius:= 8; |
300 gear^.Timer:= 125 |
300 if gear^.Timer = 0 then gear^.Timer:= 125 |
301 end; |
301 end; |
302 gtRope: begin |
302 gtRope: begin |
303 gear^.Radius:= 3; |
303 gear^.Radius:= 3; |
304 gear^.Friction:= _450 * _0_01 * cRopePercent; |
304 gear^.Friction:= _450 * _0_01 * cRopePercent; |
305 RopePoints.Count:= 0; |
305 RopePoints.Count:= 0; |
311 gear^.State:= gear^.State or gstMoving; |
311 gear^.State:= gear^.State or gstMoving; |
312 gear^.Radius:= 2; |
312 gear^.Radius:= 2; |
313 gear^.Elasticity:= _0_55; |
313 gear^.Elasticity:= _0_55; |
314 gear^.Friction:= _0_995; |
314 gear^.Friction:= _0_995; |
315 gear^.Density:= _1; |
315 gear^.Density:= _1; |
316 if cMinesTime < 0 then |
316 if gear^.Timer = 0 then |
317 gear^.Timer:= getrandom(51)*100 |
317 begin |
318 else |
318 if cMinesTime < 0 then |
319 gear^.Timer:= cMinesTime; |
319 gear^.Timer:= getrandom(51)*100 |
|
320 else |
|
321 gear^.Timer:= cMinesTime |
|
322 end |
320 end; |
323 end; |
321 gtSMine: begin |
324 gtSMine: begin |
322 gear^.Health:= 10; |
325 gear^.Health:= 10; |
323 gear^.State:= gear^.State or gstMoving; |
326 gear^.State:= gear^.State or gstMoving; |
324 gear^.Radius:= 2; |
327 gear^.Radius:= 2; |
325 gear^.Elasticity:= _0_55; |
328 gear^.Elasticity:= _0_55; |
326 gear^.Friction:= _0_995; |
329 gear^.Friction:= _0_995; |
327 gear^.Density:= _1_6; |
330 gear^.Density:= _1_6; |
328 gear^.Timer:= 500; |
331 if gear^.Timer = 0 then gear^.Timer:= 500; |
329 end; |
332 end; |
330 gtKnife: begin |
333 gtKnife: begin |
331 gear^.Density:= _4; |
334 gear^.Density:= _4; |
332 gear^.Radius:= 7 |
335 gear^.Radius:= 7 |
333 end; |
336 end; |
334 gtCase: begin |
337 gtCase: begin |
335 gear^.ImpactSound:= sndGraveImpact; |
338 gear^.ImpactSound:= sndGraveImpact; |
336 gear^.nImpactSounds:= 1; |
339 gear^.nImpactSounds:= 1; |
337 gear^.Radius:= 16; |
340 gear^.Radius:= 16; |
338 gear^.Elasticity:= _0_3; |
341 gear^.Elasticity:= _0_3; |
339 gear^.Timer:= 500 |
342 if gear^.Timer = 0 then gear^.Timer:= 500 |
340 end; |
343 end; |
341 gtExplosives: begin |
344 gtExplosives: begin |
342 gear^.ImpactSound:= sndGrenadeImpact; |
345 gear^.ImpactSound:= sndGrenadeImpact; |
343 gear^.nImpactSounds:= 1; |
346 gear^.nImpactSounds:= 1; |
344 gear^.Radius:= 16; |
347 gear^.Radius:= 16; |
389 gear^.Radius:= 5; |
392 gear^.Radius:= 5; |
390 gear^.Density:= _2; |
393 gear^.Density:= _2; |
391 end; |
394 end; |
392 gtBlowTorch: begin |
395 gtBlowTorch: begin |
393 gear^.Radius:= cHHRadius + cBlowTorchC; |
396 gear^.Radius:= cHHRadius + cBlowTorchC; |
394 gear^.Timer:= 7500 |
397 if gear^.Timer = 0 then gear^.Timer:= 7500 |
395 end; |
398 end; |
396 gtSwitcher: begin |
399 gtSwitcher: begin |
397 gear^.Z:= cCurrHHZ |
400 gear^.Z:= cCurrHHZ |
398 end; |
401 end; |
399 gtTarget: begin |
402 gtTarget: begin |
400 gear^.ImpactSound:= sndGrenadeImpact; |
403 gear^.ImpactSound:= sndGrenadeImpact; |
401 gear^.nImpactSounds:= 1; |
404 gear^.nImpactSounds:= 1; |
402 gear^.Radius:= 10; |
405 gear^.Radius:= 10; |
403 gear^.Elasticity:= _0_3; |
406 gear^.Elasticity:= _0_3; |
404 gear^.Timer:= 0 |
|
405 end; |
407 end; |
406 gtTardis: begin |
408 gtTardis: begin |
407 gear^.Timer:= 0; |
|
408 gear^.Pos:= 1; |
409 gear^.Pos:= 1; |
409 gear^.Z:= cCurrHHZ+1; |
410 gear^.Z:= cCurrHHZ+1; |
410 end; |
411 end; |
411 gtMortar: begin |
412 gtMortar: begin |
412 gear^.Radius:= 4; |
413 gear^.Radius:= 4; |
438 gear^.Radius:= 4; |
439 gear^.Radius:= 4; |
439 gear^.Elasticity:= _0_5; |
440 gear^.Elasticity:= _0_5; |
440 gear^.Friction:= _0_96; |
441 gear^.Friction:= _0_96; |
441 gear^.Density:= _1_5; |
442 gear^.Density:= _1_5; |
442 gear^.RenderTimer:= true; |
443 gear^.RenderTimer:= true; |
443 gear^.Timer:= 5000 |
444 if gear^.Timer = 0 then gear^.Timer:= 5000 |
444 end; |
445 end; |
445 gtDrill: begin |
446 gtDrill: begin |
446 if gear^.Timer = 0 then |
447 if gear^.Timer = 0 then |
447 gear^.Timer:= 5000; |
448 gear^.Timer:= 5000; |
448 // Tag for drill strike. if 1 then first impact occured already |
449 // Tag for drill strike. if 1 then first impact occured already |
454 gear^.ImpactSound:= sndGrenadeImpact; |
455 gear^.ImpactSound:= sndGrenadeImpact; |
455 gear^.nImpactSounds:= 1; |
456 gear^.nImpactSounds:= 1; |
456 gear^.AdvBounce:= 1; |
457 gear^.AdvBounce:= 1; |
457 gear^.Radius:= 5; |
458 gear^.Radius:= 5; |
458 gear^.Tag:= random(8); |
459 gear^.Tag:= random(8); |
459 gear^.Timer:= 5000; |
460 if gear^.Timer = 0 then gear^.Timer:= 5000; |
460 gear^.Elasticity:= _0_7; |
461 gear^.Elasticity:= _0_7; |
461 gear^.Friction:= _0_995; |
462 gear^.Friction:= _0_995; |
462 gear^.Density:= _1_5; |
463 gear^.Density:= _1_5; |
463 end; |
464 end; |
464 gtBallgun: begin |
465 gtBallgun: begin |
465 gear^.Timer:= 5001; |
466 if gear^.Timer = 0 then gear^.Timer:= 5001; |
466 end; |
467 end; |
467 gtRCPlane: begin |
468 gtRCPlane: begin |
468 gear^.Timer:= 15000; |
469 if gear^.Timer = 0 then gear^.Timer:= 15000; |
469 gear^.Health:= 3; |
470 gear^.Health:= 3; |
470 gear^.Radius:= 8 |
471 gear^.Radius:= 8 |
471 end; |
472 end; |
472 gtJetpack: begin |
473 gtJetpack: begin |
473 gear^.Health:= 2000; |
474 gear^.Health:= 2000; |
474 gear^.Damage:= 100; |
475 gear^.Damage:= 100; |
475 gear^.State:= gstSubmersible |
476 gear^.State:= Gear^.State or gstSubmersible |
476 end; |
477 end; |
477 gtMolotov: begin |
478 gtMolotov: begin |
478 gear^.Radius:= 6; |
479 gear^.Radius:= 6; |
479 gear^.Density:= _2; |
480 gear^.Density:= _2; |
480 end; |
481 end; |
481 gtBirdy: begin |
482 gtBirdy: begin |
482 gear^.Radius:= 16; // todo: check |
483 gear^.Radius:= 16; // todo: check |
483 gear^.Timer:= 0; |
|
484 gear^.Health := 2000; |
484 gear^.Health := 2000; |
485 gear^.FlightTime := 2; |
485 gear^.FlightTime := 2; |
486 end; |
486 end; |
487 gtEgg: begin |
487 gtEgg: begin |
488 gear^.Radius:= 4; |
488 gear^.Radius:= 4; |
511 gear^.Radius:= 5; |
511 gear^.Radius:= 5; |
512 gear^.Health:= 6000; |
512 gear^.Health:= 6000; |
513 end; |
513 end; |
514 gtFlamethrower: begin |
514 gtFlamethrower: begin |
515 gear^.Tag:= 10; |
515 gear^.Tag:= 10; |
516 gear^.Timer:= 10; |
516 if gear^.Timer = 0 then gear^.Timer:= 10; |
517 gear^.Health:= 500; |
517 gear^.Health:= 500; |
518 gear^.Damage:= 100; |
518 gear^.Damage:= 100; |
519 end; |
519 end; |
520 gtLandGun: begin |
520 gtLandGun: begin |
521 gear^.Tag:= 10; |
521 gear^.Tag:= 10; |
522 gear^.Timer:= 10; |
522 if gear^.Timer = 0 then gear^.Timer:= 10; |
523 gear^.Health:= 1000; |
523 gear^.Health:= 1000; |
524 gear^.Damage:= 100; |
524 gear^.Damage:= 100; |
525 end; |
525 end; |
526 gtPoisonCloud: begin |
526 gtPoisonCloud: begin |
527 gear^.Timer:= 5000; |
527 if gear^.Timer = 0 then gear^.Timer:= 5000; |
528 gear^.dY:= int2hwfloat(-4 + longint(getRandom(8))) / 1000; |
528 gear^.dY:= int2hwfloat(-4 + longint(getRandom(8))) / 1000; |
529 end; |
529 end; |
530 gtResurrector: begin |
530 gtResurrector: begin |
531 gear^.Radius := 100; |
531 gear^.Radius := 100; |
532 gear^.Tag := 0 |
532 gear^.Tag := 0 |
533 end; |
533 end; |
534 gtWaterUp: begin |
534 gtWaterUp: begin |
535 gear^.Tag := 47; |
535 gear^.Tag := 47; |
536 end; |
536 end; |
537 gtNapalmBomb: begin |
537 gtNapalmBomb: begin |
538 gear^.Timer:= 1000; |
538 if gear^.Timer = 0 then gear^.Timer:= 1000; |
539 gear^.Radius:= 5; |
539 gear^.Radius:= 5; |
540 gear^.Density:= _1_5; |
540 gear^.Density:= _1_5; |
541 end; |
541 end; |
542 { |
542 { |
543 gtStructure: begin |
543 gtStructure: begin |