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

Commit a2acc01

Browse files
committed
More review changes
1 parent 7f8e101 commit a2acc01

File tree

4 files changed

+23
-19
lines changed

4 files changed

+23
-19
lines changed

Base.rte/AI/HumanFunctions.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function HumanFunctions.DoAlternativeGib(actor)
5858
end
5959

6060
function HumanFunctions.DoAutomaticEquip(actor)
61-
--Equip a weapon automatically if the one held by a player is destroyed
61+
--Equip a weapon automatically if the one held by a player is destroyed (To-do: move this to cpp?)
6262
if actor.EquippedItem == nil and not actor.controller:IsState(Controller.WEAPON_FIRE) and (actor:IsPlayerControlled() or actor:UnequipBGArm()) then
6363
actor:EquipFirearm(true);
6464
end

Base.rte/Constants.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
rte = {};
33

44
rte.MOIDCountMax = math.max(SettingsMan.RecommendedMOIDCount * 3, 250);
5-
rte.DefenderMOIDMax = SettingsMan.RecommendedMOIDCount;
6-
rte.AIMOIDMax = SettingsMan.RecommendedMOIDCount/2;
5+
rte.AIMOIDMax = rte.MOIDCountMax/4;
6+
rte.DefenderMOIDMax = rte.MOIDCountMax - rte.AIMOIDMax;
77
rte.NoMOID = 255;
88
rte.SpawnIntervalScale = 1.0;
99
rte.StartingFundsScale = 1.0;

Base.rte/Effects/Pyro/Flame/Flame.lua

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function Create(self)
88
self.isShort = true;
99
self.deleteDelay = self.Lifetime * RangeRand(0.1, 0.2);
1010
end
11+
self.shortFlame = CreatePEmitter("Flame Hurt Short Float", "Base.rte");
1112
end
1213
function Update(self)
1314
self.ToSettle = false;
@@ -29,23 +30,26 @@ function Update(self)
2930
if self.checkTimer:IsPastSimMS(self.checkDelay) then
3031
self.checkTimer:Reset();
3132
self.checkDelay = math.floor(self.checkDelay * 1.05 + 3); --Gradually extend the delay for optimization reasons
32-
local checkPos = Vector(self.Pos.X, self.Pos.Y - 1) + self.Vel * rte.PxTravelledPerFrame * math.random();
33-
local moCheck = SceneMan:GetMOIDPixel(checkPos.X, checkPos.Y);
34-
if moCheck ~= rte.NoMOID then
35-
local mo = MovableMan:GetMOFromID(moCheck);
36-
if mo and (self.Team == Activity.NOTEAM or mo.Team ~= self.Team) then
37-
self.target = ToMOSRotating(mo);
33+
if self.Vel.Magnitude > 1 then
34+
local checkPos = Vector(self.Pos.X, self.Pos.Y - 1) + self.Vel * rte.PxTravelledPerFrame * math.random();
35+
local moCheck = SceneMan:GetMOIDPixel(checkPos.X, checkPos.Y);
36+
if moCheck ~= rte.NoMOID then
37+
local mo = MovableMan:GetMOFromID(moCheck);
38+
if mo and (self.Team == Activity.NOTEAM or mo.Team ~= self.Team) then
39+
self.target = ToMOSRotating(mo);
3840

39-
self.isShort = true;
40-
self.deleteDelay = math.random(self.Lifetime);
41-
self.GlobalAccScalar = 0.9;
42-
43-
self.targetStickAngle = mo.RotAngle;
44-
self.stickPos = SceneMan:ShortestDistance(mo.Pos, self.Pos, SceneMan.SceneWrapsX) * 0.8;
41+
self.isShort = true;
42+
self.deleteDelay = math.random(self.Lifetime);
43+
self.GlobalAccScalar = 0.9;
44+
45+
self.targetStickAngle = mo.RotAngle;
46+
self.stickPos = SceneMan:ShortestDistance(mo.Pos, self.Pos, SceneMan.SceneWrapsX) * 0.8;
47+
end
4548
end
46-
elseif not self.isShort and math.random() < 0.1 then
49+
end
50+
if not self.isShort and math.random() < 0.1 then
4751
--Spawn another, shorter flame particle occasionally
48-
local particle = CreatePEmitter("Flame Hurt Short Float");
52+
local particle = self.shortFlame:Clone();
4953
particle.Lifetime = particle.Lifetime * RangeRand(0.6, 0.9);
5054
particle.Vel = self.Vel + Vector(0, -3) + Vector(math.random(), 0):RadRotate(math.random() * math.pi * 2);
5155
particle.Pos = Vector(self.Pos.X, self.Pos.Y - 1);

Missions.rte/Activities/Doainar.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,12 @@ function DoainarMission:UpdateActivity()
279279
for actor in MovableMan.Actors do
280280
if self.aggress == false then
281281
if not self.caveAreaA:IsInside(actor.Pos) and not self.caveAreaB:IsInside(actor.Pos) and actor.PresetName == "Crab" then
282-
self:AddObjectivePoint("Kill!", actor.Pos + Vector(0, -actor.Radius), Activity.TEAM_1, GameActivity.ARROWDOWN);
282+
self:AddObjectivePoint("Kill!", actor.AboveHUDPos, Activity.TEAM_1, GameActivity.ARROWDOWN);
283283
end
284284
end
285285
if self.mamadead == true then
286286
if actor.PresetName == "Crab" then
287-
self:AddObjectivePoint("Kill!", actor.Pos + Vector(0, -actor.Radius), Activity.TEAM_1, GameActivity.ARROWDOWN);
287+
self:AddObjectivePoint("Kill!", actor.AboveHUDPos, Activity.TEAM_1, GameActivity.ARROWDOWN);
288288
end
289289
end
290290
end

0 commit comments

Comments
 (0)