Skip to content

Fix regression added in #99 that prevented enemies from spawning. #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

- Fixed Constructor auto-cancelling build mode if you actively selected the "Order Construction" pie menu option.

- Fixed regression introduced in v6.2.0 preventing Massacre, One-Man Army, One-Man Army (Diggers Only), and Survival from spawning enemies at all.

</details>

## [Release v6.2.0] - 2024/02/19
Expand Down
2 changes: 1 addition & 1 deletion Data/Base.rte/Activities/Massacre.lua
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ function Massacre:UpdateActivity()
for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
if self:PlayerActive(player) and self:PlayerHuman(player) then
local sceneChunk = SceneMan.SceneWidth / 3;
local checkPos = self:GetPlayerBrain(i - 1).Pos.X + (SceneMan.SceneWidth/2) + ( (sceneChunk/2) - (math.random()*sceneChunk) );
local checkPos = self:GetPlayerBrain(player).Pos.X + (SceneMan.SceneWidth/2) + ( (sceneChunk/2) - (math.random()*sceneChunk) );
if checkPos > SceneMan.SceneWidth then
checkPos = checkPos - SceneMan.SceneWidth;
elseif checkPos < 0 then
Expand Down
2 changes: 1 addition & 1 deletion Data/Base.rte/Activities/OneManArmy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ function OneManArmy:UpdateActivity()
for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
if self:PlayerActive(player) and self:PlayerHuman(player) then
local sceneChunk = SceneMan.SceneWidth * 0.3;
local checkPos = self:GetPlayerBrain(i - 1).Pos.X + (SceneMan.SceneWidth * 0.5) + ((sceneChunk * 0.5) - (math.random() * sceneChunk));
local checkPos = self:GetPlayerBrain(player).Pos.X + (SceneMan.SceneWidth * 0.5) + ((sceneChunk * 0.5) - (math.random() * sceneChunk));
if checkPos > SceneMan.SceneWidth then
checkPos = checkPos - SceneMan.SceneWidth;
elseif checkPos < 0 then
Expand Down
2 changes: 1 addition & 1 deletion Data/Base.rte/Activities/OneManArmyDiggers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ function OneManArmy:UpdateActivity()
for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
if self:PlayerActive(player) and self:PlayerHuman(player) then
local sceneChunk = SceneMan.SceneWidth / 3;
local checkPos = self:GetPlayerBrain(i - 1).Pos.X + (SceneMan.SceneWidth/2) + ( (sceneChunk/2) - (math.random()*sceneChunk) );
local checkPos = self:GetPlayerBrain(player).Pos.X + (SceneMan.SceneWidth/2) + ( (sceneChunk/2) - (math.random()*sceneChunk) );
if checkPos > SceneMan.SceneWidth then
checkPos = checkPos - SceneMan.SceneWidth;
elseif checkPos < 0 then
Expand Down
2 changes: 1 addition & 1 deletion Data/Base.rte/Activities/Survival.lua
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function Survival:UpdateActivity()
for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
if self:PlayerActive(player) and self:PlayerHuman(player) then
local sceneChunk = SceneMan.SceneWidth / 3;
local checkPos = self:GetPlayerBrain(i - 1).Pos.X + (SceneMan.SceneWidth/2) + ( (sceneChunk/2) - (math.random()*sceneChunk) );
local checkPos = self:GetPlayerBrain(player).Pos.X + (SceneMan.SceneWidth/2) + ( (sceneChunk/2) - (math.random()*sceneChunk) );
if checkPos > SceneMan.SceneWidth then
checkPos = checkPos - SceneMan.SceneWidth;
elseif checkPos < 0 then
Expand Down