mirror of
https://github.com/wiremod/advdupe2.git
synced 2025-03-04 03:03:05 -05:00
Make sure Constraints table exist (#418)
* Make sure Constraints table exist * Use tab indentation * Use AdvDupe2.CheckValidDupe instead
This commit is contained in:
parent
3b969bac9f
commit
f1de4bf087
@ -423,6 +423,7 @@ end
|
||||
function AdvDupe2.CheckValidDupe(dupe, info)
|
||||
if not dupe.HeadEnt then return false, "Missing HeadEnt table" end
|
||||
if not dupe.Entities then return false, "Missing Entities table" end
|
||||
if not dupe.Constraints then return false, "Missing Constraints table" end
|
||||
if not dupe.HeadEnt.Z then return false, "Missing HeadEnt.Z" end
|
||||
if not dupe.HeadEnt.Pos then return false, "Missing HeadEnt.Pos" end
|
||||
if not dupe.HeadEnt.Index then return false, "Missing HeadEnt.Index" end
|
||||
|
@ -1061,7 +1061,7 @@ local function CreateEntityFromTable(EntTable, Player)
|
||||
for _, CreatedEntity in pairs(CreatedEntities) do
|
||||
SafeRemoveEntity(CreatedEntity)
|
||||
end
|
||||
ErrorNoHaltWithStack(valid)
|
||||
ErrorNoHaltWithStack(valid)
|
||||
end
|
||||
|
||||
if (valid == false) then
|
||||
@ -1555,10 +1555,12 @@ end
|
||||
function AdvDupe2.InitPastingQueue(Player, PositionOffset, AngleOffset, OrigPos, Constrs, Parenting, DisableParents, DisableProtection)
|
||||
local i = #AdvDupe2.JobManager.Queue + 1
|
||||
AdvDupe2.JobManager.Queue[i] = {}
|
||||
|
||||
local Queue = AdvDupe2.JobManager.Queue[i]
|
||||
Queue.Player = Player
|
||||
Queue.SortedEntities = {}
|
||||
Queue.EntityList = table.Copy(Player.AdvDupe2.Entities)
|
||||
|
||||
if (Constrs) then
|
||||
Queue.ConstraintList = table.Copy(Player.AdvDupe2.Constraints)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user