45 |
45 |
46 |
46 |
47 implementation |
47 implementation |
48 uses uStore, uSound, uTeams, uRandom, uCollisions, uIO, uLandGraphics, |
48 uses uStore, uSound, uTeams, uRandom, uCollisions, uIO, uLandGraphics, |
49 uAIMisc, uLocale, uAI, uAmmos, uStats, uVisualGears, uScript, GLunit, uMobile, uVariables, |
49 uAIMisc, uLocale, uAI, uAmmos, uStats, uVisualGears, uScript, GLunit, uMobile, uVariables, |
50 uCommands, uUtils, uTextures, uRenderUtils, uGearsRender, uCaptions, uDebug; |
50 uCommands, uUtils, uTextures, uRenderUtils, uGearsRender, uCaptions, uDebug, uLandTexture; |
51 |
51 |
52 |
52 |
53 procedure doMakeExplosion(X, Y, Radius: LongInt; Mask: LongWord); forward; |
53 procedure doMakeExplosion(X, Y, Radius: LongInt; Mask: LongWord); forward; |
54 procedure doMakeExplosion(X, Y, Radius: LongInt; Mask, Tint: LongWord); forward; |
54 procedure doMakeExplosion(X, Y, Radius: LongInt; Mask, Tint: LongWord); forward; |
55 procedure AmmoShove(Ammo: PGear; Damage, Power: LongInt); forward; |
55 procedure AmmoShove(Ammo: PGear; Damage, Power: LongInt); forward; |
256 gtSnowball: begin |
257 gtSnowball: begin |
257 gear^.Radius:= 4; |
258 gear^.Radius:= 4; |
258 gear^.Elasticity:= _1; |
259 gear^.Elasticity:= _1; |
259 gear^.Friction:= _1; |
260 gear^.Friction:= _1; |
260 gear^.Density:= _0_5; |
261 gear^.Density:= _0_5; |
|
262 end; |
|
263 |
|
264 gtFlake: begin |
|
265 with Gear^ do |
|
266 begin |
|
267 DirAngle:= random * 360; |
|
268 dx.isNegative:= GetRandom(2) = 0; |
|
269 dx.QWordValue:= GetRandom(100000000); |
|
270 dy.isNegative:= false; |
|
271 dy.QWordValue:= GetRandom(70000000); |
|
272 if GetRandom(2) = 0 then dx := -dx; |
|
273 Health:= random(vobFrameTicks); |
|
274 Timer:= random(vobFramesCount); |
|
275 Angle:= (random(2) * 2 - 1) * (1 + random(10000)) * vobVelocity |
|
276 end |
261 end; |
277 end; |
262 gtGrave: begin |
278 gtGrave: begin |
263 gear^.ImpactSound:= sndGraveImpact; |
279 gear^.ImpactSound:= sndGraveImpact; |
264 gear^.nImpactSounds:= 1; |
280 gear^.nImpactSounds:= 1; |
265 gear^.Radius:= 10; |
281 gear^.Radius:= 10; |
1093 |
1109 |
1094 if (GameFlags and gfLaserSight) <> 0 then |
1110 if (GameFlags and gfLaserSight) <> 0 then |
1095 cLaserSighting:= true; |
1111 cLaserSighting:= true; |
1096 |
1112 |
1097 if (GameFlags and gfArtillery) <> 0 then |
1113 if (GameFlags and gfArtillery) <> 0 then |
1098 cArtillery:= true |
1114 cArtillery:= true; |
|
1115 |
|
1116 if (Theme = 'Snow') or (Theme = 'Hell') then |
|
1117 for i:= 0 to Pred(vobCount) do |
|
1118 AddGear(GetRandom(LAND_WIDTH+1024)-512, LAND_HEIGHT - GetRandom(1024), gtFlake, 0, _0, _0, 0); |
1099 end; |
1119 end; |
1100 |
1120 |
1101 procedure doMakeExplosion(X, Y, Radius: LongInt; Mask: LongWord); |
1121 procedure doMakeExplosion(X, Y, Radius: LongInt; Mask: LongWord); |
1102 begin |
1122 begin |
1103 doMakeExplosion(X, Y, Radius, Mask, $FFFFFFFF); |
1123 doMakeExplosion(X, Y, Radius, Mask, $FFFFFFFF); |