Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit cd195df

Browse files
committed
Preliminary craft bomb rework
1 parent fc5560f commit cd195df

File tree

12 files changed

+301
-196
lines changed

12 files changed

+301
-196
lines changed
Binary file not shown.

Base.rte/Devices/Explosives/ClusterMineBomb/ClusterMineBomb.ini

Lines changed: 55 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////////////////////////////
2-
// cluster Mine Bomb Gibs
2+
// Cluster Mine Bomb Gibs
33

44

55
AddEffect = MOSRotating
@@ -14,7 +14,7 @@ AddEffect = MOSRotating
1414
FrameCount = 1
1515
SpriteOffset = Vector
1616
X = -10
17-
Y = -7
17+
Y = -6
1818
AtomGroup = AtomGroup
1919
AutoGenerate = 1
2020
Material = Material
@@ -30,44 +30,63 @@ AddEffect = MOSRotating
3030
DeepCheck = 0
3131
AddGib = Gib
3232
GibParticle = MOSParticle
33-
CopyOf = Tiny Smoke Ball 1
33+
CopyOf = Gib Metal Grey Tiny A
3434
Count = 5
35-
Spread = 3.1
36-
MaxVelocity = 3
35+
Spread = 3.14
36+
MaxVelocity = 10
3737
MinVelocity = 1
38+
InheritsVel = 0
39+
AddGib = Gib
40+
GibParticle = MOSParticle
41+
CopyOf = Grenade Smoke 1
42+
Count = 5
43+
Spread = 3.14
44+
MaxVelocity = 40
45+
MinVelocity = 20
46+
LifeVariation = 0.50
47+
InheritsVel = 0
48+
AddGib = Gib
49+
GibParticle = MOSParticle
50+
CopyOf = Grenade Smoke 2
51+
Count = 5
52+
Spread = 3.14
53+
MaxVelocity = 40
54+
MinVelocity = 20
3855
LifeVariation = 0.50
39-
InheritsVel = 1
40-
GibImpulseLimit = 2
56+
InheritsVel = 0
57+
GibImpulseLimit = 20
4158

4259

4360
AddEffect = MOSRotating
4461
CopyOf = Cluster Mine Bomb Gib A
4562
PresetName = Cluster Mine Bomb Gib B
4663
AirResistance = 0.01
4764
Mass = 3
65+
HitsMOs = 0
4866
SpriteFile = ContentFile
4967
FilePath = Base.rte/Devices/Explosives/ClusterMineBomb/Gibs/ClusterMineBombCaseA.bmp
5068
FrameCount = 1
5169
SpriteOffset = Vector
52-
X = -5
53-
Y = -4
70+
X = -6
71+
Y = -3
5472

5573

5674
AddEffect = MOSRotating
5775
CopyOf = Cluster Mine Bomb Gib A
5876
PresetName = Cluster Mine Bomb Gib C
5977
AirResistance = 0.01
6078
Mass = 3
79+
HitsMOs = 0
6180
SpriteFile = ContentFile
6281
FilePath = Base.rte/Devices/Explosives/ClusterMineBomb/Gibs/ClusterMineBombCaseB.bmp
6382
FrameCount = 1
6483
SpriteOffset = Vector
65-
X = -5
66-
Y = -4
84+
X = -6
85+
Y = -3
6786

6887

6988
///////////////////////////////////////////////////////////////////////
70-
// cluster Mine Bomb
89+
// Cluster Mine Bomb
7190

7291

7392
AddDevice = TDExplosive
@@ -86,7 +105,7 @@ AddDevice = TDExplosive
86105
FrameCount = 1
87106
SpriteOffset = Vector
88107
X = -10
89-
Y = -7
108+
Y = -6
90109
EntryWound = AEmitter
91110
CopyOf = Dent Metal
92111
ExitWound = AEmitter
@@ -112,15 +131,15 @@ AddDevice = TDExplosive
112131
AddSample = ContentFile
113132
Path = Base.rte/Devices/Explosives/NapalmBomb/Sounds/NapalmBombExplode.wav
114133
StanceOffset = Vector
115-
X = -12
116-
Y = -5
134+
X = 4
135+
Y = 4
117136
StartThrowOffset = Vector
118-
X = -12
119-
Y = -5
137+
X = 5
138+
Y = 1
120139
EndThrowOffset = Vector
121-
X = -12
122-
Y = -5
123-
MinThrowVel = 5
140+
X = 4
141+
Y = 4
142+
MinThrowVel = 1
124143
MaxThrowVel = 10
125144
TriggerDelay = 5000
126145
ActivatesWhenReleased = 1
@@ -134,12 +153,21 @@ AddDevice = TDExplosive
134153
InheritsVel = 0
135154
AddGib = Gib
136155
GibParticle = MOSParticle
137-
CopyOf = Explosion Smoke 2
138-
Count = 3
139-
Spread = 3.1
140-
MaxVelocity = 5
141-
MinVelocity = 1
156+
CopyOf = Grenade Smoke 1
157+
Count = 10
158+
Spread = 3.14
159+
MaxVelocity = 60
160+
MinVelocity = 30
161+
LifeVariation = 0.50
162+
InheritsVel = 0
163+
AddGib = Gib
164+
GibParticle = MOSParticle
165+
CopyOf = Grenade Smoke 2
166+
Count = 10
167+
Spread = 3.14
168+
MaxVelocity = 60
169+
MinVelocity = 30
142170
LifeVariation = 0.50
143-
InheritsVel = 1
144-
GibImpulseLimit = 5
171+
InheritsVel = 0
172+
GibImpulseLimit = 10
145173
GibWoundLimit = 8

Base.rte/Devices/Explosives/ClusterMineBomb/ClusterMineBomb.lua

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ function Create(self)
33
self.alliedTeam = -1;
44
self.lastAngle = self.RotAngle;
55
self.lastVel = Vector(self.Vel.X,self.Vel.Y);
6-
6+
7+
self.deployRange = 100;
8+
9+
self.mineCount = 4;
710
end
811

912
function Update(self)
@@ -22,20 +25,20 @@ function Update(self)
2225
end
2326
end
2427

25-
local rayHitPos = Vector(0,0);
26-
local terrainRaycast = SceneMan:CastStrengthRay(self.Pos,Vector(self.Vel.X,self.Vel.Y):SetMagnitude(150),0,rayHitPos,0,0,SceneMan.SceneWrapsX);
28+
local rayHitPos = Vector();
29+
local terrainRaycast = SceneMan:CastStrengthRay(self.Pos, Vector(self.Vel.X,self.Vel.Y):SetMagnitude(self.Radius + self.deployRange + self.Vel.Magnitude),0,rayHitPos,0,0,SceneMan.SceneWrapsX);
2730

2831
if terrainRaycast == true then
29-
for i = 1, 5 do
30-
local mine = CreateMOSRotating("Particle Mine");
32+
local spread = 3;
33+
for i = 1, self.mineCount do
34+
local mine = CreateMOSRotating("Anti Personnel Mine Active");
3135
mine.Pos = self.Pos;
32-
mine.Vel = self.Vel + Vector((math.random()*15)+5,0):RadRotate(math.random()*(math.pi*2));
36+
mine.Vel = self.Vel /2 + Vector(self.Vel.X, self.Vel.Y):RadRotate(spread * 0.6 - (spread * (i / self.mineCount)) + RangeRand(-0.1, 0.1)):SetMagnitude(20);
3337
mine.Sharpness = self.alliedTeam;
3438
MovableMan:AddParticle(mine);
3539
self:GibThis();
3640
end
3741
end
38-
3942
end
4043

4144
function Destroy(self)
@@ -49,14 +52,14 @@ function Destroy(self)
4952
local gibB = CreateMOSRotating("Cluster Mine Bomb Gib B");
5053
gibB.Pos = self.Pos + Vector(1,-3):RadRotate(self.lastAngle);
5154
gibB.Vel = self.Vel + Vector(0,20):RadRotate(self.lastAngle);
52-
gibB.AngularVel = 20;
55+
gibB.AngularVel = 10;
5356
gibB.RotAngle = self.lastAngle;
5457
MovableMan:AddParticle(gibB);
5558

5659
local gibC = CreateMOSRotating("Cluster Mine Bomb Gib C");
57-
gibC.Pos = self.Pos + Vector(1,4):RadRotate(self.lastAngle);
60+
gibC.Pos = self.Pos + Vector(1,3):RadRotate(self.lastAngle);
5861
gibC.Vel = self.Vel + Vector(0,-20):RadRotate(self.lastAngle);
59-
gibC.AngularVel = -20;
62+
gibC.AngularVel = -10;
6063
gibC.RotAngle = self.lastAngle;
6164
MovableMan:AddParticle(gibC);
6265

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)