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

Commit 9da51be

Browse files
committed
Minor changes
1 parent 478a316 commit 9da51be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+154
-171
lines changed

Base.rte/AI/HumanBehaviors.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ end
3232

3333
-- spot targets by casting a ray in a random direction
3434
function HumanBehaviors.LookForTargets(AI, Owner, Skill)
35-
local viewAngDeg = RangeRand(50, 120) * Owner.Perceptiveness * (0.5 + Skill / 200)
35+
local viewAngDeg = RangeRand(50, 120) * Owner.Perceptiveness * (0.5 + Skill/200)
3636
if AI.deviceState == AHuman.AIMING then
3737
AI.Ctrl:SetState(Controller.AIM_SHARP, true) -- reinforce sharp aim controller state to enable SharpLength in LookForMOs
38-
viewAngDeg = 15 * Owner.Perceptiveness + (Skill / 10)
38+
viewAngDeg = 15 * Owner.Perceptiveness + (Skill/10)
3939
end
4040

4141
local FoundMO = Owner:LookForMOs(viewAngDeg, rte.grassID, false)
@@ -2143,13 +2143,13 @@ function HumanBehaviors.GetProjectileData(Owner)
21432143
-- find muzzle velocity
21442144
PrjDat.vel = Weapon:GetAIFireVel()
21452145
-- half of the theoretical upper limit for the total amount of material strength this weapon can destroy in 250ms
2146-
PrjDat.pen = Weapon:GetAIPenetration() * math.max((Weapon.RateOfFire / 240), 1)
21472146

21482147
PrjDat.g = SceneMan.GlobalAcc.Y * 0.67 * Weapon:GetBulletAccScalar() -- underestimate gravity
21492148
PrjDat.vsq = PrjDat.vel^2 -- muzzle velocity squared
21502149
PrjDat.vqu = PrjDat.vsq^2 -- muzzle velocity quad
21512150
PrjDat.drg = 1 - Projectile.AirResistance * TimerMan.DeltaTimeSecs -- AirResistance is stored as the ini-value times 60
21522151
PrjDat.thr = math.min(Projectile.AirThreshold, PrjDat.vel)
2152+
PrjDat.pen = (Projectile.Mass * Projectile.Sharpness * PrjDat.vel) * PrjDat.drg
21532153

21542154
-- estimate theoretical max range with ...
21552155
local lifeTime = Weapon:GetAIBulletLifeTime()

Base.rte/AI/HumanFunctions.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ function HumanFunctions.DoVisibleInventory(actor, showAll)
116116
for i = 1, actor.InventorySize do
117117
local item = actor:Inventory();
118118
if item then
119-
local fixNum = actor.HFlipped and -1 or 0; --Fix offsets slightly when facing left
120119
if item.ClassName == "TDExplosive" then
121120
thrownCount = thrownCount + 1;
122121
elseif item.ClassName == "HDFirearm" or item.ClassName == "HeldDevice" then
@@ -127,7 +126,7 @@ function HumanFunctions.DoVisibleInventory(actor, showAll)
127126
local isFirearm = item.ClassName == "HeldDevice" and 0 or 1;
128127
local actorSize, itemSize = math.sqrt(actor.Radius), math.sqrt(item.Radius + math.abs(item.Mass));
129128

130-
fixNum = fixNum + item.Radius * 0.2 + math.sqrt(heldCount);
129+
local fixNum = item.Radius * 0.2 + math.sqrt(heldCount);
131130

132131
--Bigger actors carry weapons higher up, smaller weapons are carried lower down
133132
local drawPos = actor.Pos + Vector((-actorSize - fixNum) * actor.FlipFactor, -actorSize - itemSize + 1 + isFirearm * 3):RadRotate(actor.RotAngle);

Base.rte/AI/NativeHumanAI.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ function NativeHumanAI:Update(Owner)
543543
end
544544
elseif not self.Target and not self.UnseenTarget then
545545
-- use medikit if not engaging enemy
546-
if Owner.Health < (Owner.MaxHealth / 2) then
546+
if Owner.Health < (Owner.MaxHealth/2) then
547547
if Owner:HasObject("Medikit") then
548548

549549
self.useMedikit = Owner:EquipNamedDevice("Medikit", true)

Base.rte/Actors/Infantry/GreenDummy/GreenDummy.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -832,10 +832,10 @@ AddActor = AHuman
832832
WalkLimbPath = LimbPath
833833
CopyOf = Human Walk Path
834834
PresetName = Green Dummy Walk Path
835-
SlowTravelSpeed = 1.5
836-
NormalTravelSpeed = 3.5
837-
FastTravelSpeed = 4.5
838-
PushForce = 8000
835+
StartOffset = Vector
836+
X = 6
837+
Y = -3
838+
NormalTravelSpeed = 3.4
839839
CrouchLimbPath = LimbPath
840840
CopyOf = Human Crouch Path
841841
CrawlLimbPath = LimbPath

Base.rte/Actors/Mecha/AIBox/AIBox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ AddActor = ACrab
219219
Health = 100
220220
ImpulseDamageThreshold = 5000
221221
AimAngle = 0
222-
AimRange = 1.5
222+
AimRange = 1.57
223223
AimDistance = 30
224224
Perceptiveness = 0.1
225225
CharHeight = 100

Base.rte/Actors/Mecha/Medic/MedicDrone.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ AddActor = ACrab
218218
Health = 100
219219
ImpulseDamageThreshold = 5000
220220
AimAngle = 0
221-
AimRange = 1.5
221+
AimRange = 1.57
222222
AimDistance = 30
223223
Perceptiveness = 0.1
224224
CharHeight = 100

Base.rte/Craft/DropShips/DropshipMK1.ini

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ AddEffect = MOSRotating
788788

789789
AddEffect = AEmitter
790790
PresetName = Dropship Engine A Left
791-
Mass = 600
791+
Mass = 300
792792
HitsMOs = 1
793793
GetsHitByMOs = 1
794794
SpriteFile = ContentFile
@@ -830,13 +830,13 @@ AddEffect = AEmitter
830830
EmittedParticle = MOPixel
831831
CopyOf = Jet Air Blast
832832
Spread = 0.15
833-
MaxVelocity = 45
833+
MaxVelocity = 40
834834
MinVelocity = 30
835835
AddEmission = Emission
836836
EmittedParticle = MOPixel
837837
CopyOf = Jet Air Blast 2
838838
Spread = 0.25
839-
MaxVelocity = 45
839+
MaxVelocity = 40
840840
MinVelocity = 30
841841
EmissionSound = SoundContainer
842842
AddSound = ContentFile
@@ -1028,7 +1028,7 @@ AddEffect = AEmitter
10281028

10291029
AddEffect = AEmitter
10301030
PresetName = Dropship Engine A Right
1031-
Mass = 600
1031+
Mass = 300
10321032
HitsMOs = 1
10331033
GetsHitByMOs = 1
10341034
SpriteFile = ContentFile
@@ -1067,13 +1067,13 @@ AddEffect = AEmitter
10671067
EmittedParticle = MOPixel
10681068
CopyOf = Jet Air Blast
10691069
Spread = 0.15
1070-
MaxVelocity = 45
1070+
MaxVelocity = 40
10711071
MinVelocity = 30
10721072
AddEmission = Emission
10731073
EmittedParticle = MOPixel
10741074
CopyOf = Jet Air Blast 2
10751075
Spread = 0.25
1076-
MaxVelocity = 45
1076+
MaxVelocity = 40
10771077
MinVelocity = 30
10781078
EmissionSound = SoundContainer
10791079
AddSound = ContentFile
@@ -1437,7 +1437,7 @@ AddActor = ACDropShip
14371437
Description = Trade Star's reliable and safe dropship. Its tough armor can withstand numerous hits while delivering or transporting troops to the field. Its powerful thrusters allow it to carry even very heavy loads. Equipped with two underslung machine gun turrets.
14381438
AddToGroup = Craft
14391439
Mass = 2400
1440-
MaxMass = 3600
1440+
MaxMass = 3700
14411441
MaxPassengers = 3
14421442
HitsMOs = 1
14431443
GetsHitByMOs = 1
@@ -1493,13 +1493,13 @@ AddActor = ACDropShip
14931493
ParentOffset = Vector
14941494
X = -49
14951495
Y = -3
1496-
Mass = 100
1496+
// Mass = 100
14971497
RThruster = AEmitter
14981498
CopyOf = Dropship Engine A Right
14991499
ParentOffset = Vector
15001500
X = 49
15011501
Y = -3
1502-
Mass = 100
1502+
// Mass = 100
15031503
URThruster = AEmitter
15041504
CopyOf = Dropship Retro Thruster
15051505
ParentOffset = Vector

Base.rte/Craft/StorageCrate/Crate.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ AddActor = ACRocket
238238
CopyOf = Crate
239239
PresetName = Drop Crate
240240
ScriptPath = Base.rte/Craft/StorageCrate/DropCrate.lua
241-
Description = Quick drop from an orbiting station in a strong metal crate and amazing cushions to preserve the contents that would usually never survive an orbital drop. Organic contents may suffer mild bruising.
241+
Description = Quick drop from an orbiting station in a strong metal crate and amazing cushions to preserve the contents that would usually never survive an orbital drop. Organic contents may suffer from mild blunt trauma.
242242
AddToGroup = Craft - Crates
243243
Velocity = Vector
244244
X = 0

Base.rte/Devices/Explosives/AntiPersonnelMine/AntiPersonnelMine.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ AddEffect = MOSRotating
158158
AddDevice = TDExplosive
159159
PresetName = Anti Personnel Mine
160160
AddToGroup = Bombs
161-
Description = A plantable mine that detonates when enemy movement interrupts its laser. Disarm with the Disarmer. This mine must be activated before it can detect enemies!
161+
Description = A plantable explosive that detonates when enemy movement interrupts its laser. Disarm with the Disarmer. This mine must be activated before it can detect enemies!
162162
Mass = 3
163163
RestThreshold = -500
164164
HitsMOs = 0
@@ -190,13 +190,13 @@ AddDevice = TDExplosive
190190
DeepCheck = 0
191191
JointStrength = 40
192192
JointStiffness = 0.5
193-
DrawAfterParent = 1
193+
DrawAfterParent = 0
194194
StanceOffset = Vector
195195
X = 4
196196
Y = 4
197197
StartThrowOffset = Vector
198-
X = 7
199-
Y = 2
198+
X = 9
199+
Y = -2
200200
EndThrowOffset = Vector
201201
X = 4
202202
Y = 4

Base.rte/Devices/Explosives/AntiPersonnelMine/MineSet.lua

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ function Update(self)
4747

4848
local trace = Vector(self.Vel.X, self.Vel.Y):SetMagnitude(self.Radius + self.Vel.Magnitude);
4949
local rayHitPos = Vector();
50-
local terrainRaycast = SceneMan:CastStrengthRay(self.Pos, trace, 5, rayHitPos, 0, 0, SceneMan.SceneWrapsX);
50+
local terrainRaycast = SceneMan:CastStrengthRay(self.Pos, trace, 5, rayHitPos, 0, rte.airID, SceneMan.SceneWrapsX);
5151

5252
if terrainRaycast == true then
5353

5454
trace = Vector(trace.X, trace.Y):SetMagnitude(trace.Magnitude + 5);
5555
local rayHitPosA = Vector();
56-
local terrainRaycastA = SceneMan:CastStrengthRay(self.Pos + Vector(0, 3):RadRotate(Vector(self.Vel.X,self.Vel.Y).AbsRadAngle), trace, 5, rayHitPosA, 0, 0, SceneMan.SceneWrapsX);
56+
local terrainRaycastA = SceneMan:CastStrengthRay(self.Pos + Vector(0, 3):RadRotate(Vector(self.Vel.X,self.Vel.Y).AbsRadAngle), trace, 5, rayHitPosA, 0, rte.airID, SceneMan.SceneWrapsX);
5757

5858
local rayHitPosB = Vector();
59-
local terrainRaycastB = SceneMan:CastStrengthRay(self.Pos + Vector(0, -3):RadRotate(Vector(self.Vel.X,self.Vel.Y).AbsRadAngle), trace, 5, rayHitPosB, 0, 0, SceneMan.SceneWrapsX);
59+
local terrainRaycastB = SceneMan:CastStrengthRay(self.Pos + Vector(0, -3):RadRotate(Vector(self.Vel.X,self.Vel.Y).AbsRadAngle), trace, 5, rayHitPosB, 0, rte.airID, SceneMan.SceneWrapsX);
6060

6161
if terrainRaycastA == true and terrainRaycastB == true then
6262
self.faceDirection = SceneMan:ShortestDistance(rayHitPosA, rayHitPosB, SceneMan.SceneWrapsX).AbsRadAngle + (math.pi/2);
@@ -99,17 +99,16 @@ function Update(self)
9999

100100
local rayHitPos = Vector();
101101
local startPos = self.Pos + Vector(self.Radius, 0):RadRotate(detectionAngle);
102-
local terrainRaycast = SceneMan:CastStrengthRay(startPos, Vector(self.laserLength, 0):RadRotate(detectionAngle), 10, rayHitPos, 1, 0, SceneMan.SceneWrapsX);
102+
local terrainRaycast = SceneMan:CastStrengthRay(startPos, Vector(self.laserLength, 0):RadRotate(detectionAngle), 10, rayHitPos, 1, rte.airID, SceneMan.SceneWrapsX);
103103

104104
if terrainRaycast == true then
105105
self.tempLaserLength = SceneMan:ShortestDistance(startPos,rayHitPos,SceneMan.SceneWrapsX).Magnitude;
106106
else
107107
self.tempLaserLength = self.laserLength;
108108
end
109-
local raycast = SceneMan:CastMORay(startPos,Vector(self.tempLaserLength, 0):RadRotate(detectionAngle),self.ID,self.alliedTeam, 0, true, 4);
109+
local raycast = SceneMan:CastMORay(startPos,Vector(self.tempLaserLength, 0):RadRotate(detectionAngle), self.ID, self.alliedTeam, rte.airID, true, 4);
110110
if raycast ~= rte.NoMOID then
111-
local targetpart = ToMOSRotating(MovableMan:GetMOFromID(raycast));
112-
local target = ToMOSRotating(MovableMan:GetMOFromID(targetpart.RootID));
111+
local target = ToMOSRotating(MovableMan:GetMOFromID(raycast)):GetRootParent();
113112
if not (target.Team == self.alliedTeam and IsActor(target)) and (target.Vel.Magnitude * (1 + math.abs(target.AngularVel) + math.sqrt(target.Radius))) > self.detonateThreshold then
114113
self.actionPhase = 2;
115114
self.blink = false;

0 commit comments

Comments
 (0)