Skip to content

Commit 91590b0

Browse files
committed
Fix a weird bug
1 parent 417e548 commit 91590b0

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

gamemode/sv_transition.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -921,14 +921,13 @@ function GM:CreateTransitionObjects()
921921
DbgPrint("Using global entity!")
922922
else
923923
ent = ents.Create(data.Class)
924+
if not IsValid(ent) then
925+
DbgPrint("Failed to create entity of class: " .. data.Class)
926+
continue
927+
end
924928
ent.CreatedByLevelTransition = true
925929
end
926930

927-
if not IsValid(ent) then
928-
DbgPrint("Attempted to create bogus entity: " .. data.Class)
929-
continue
930-
end
931-
932931
ent.SourceMap = data.SourceMap
933932
ent.ShouldDispatchSpawn = dispatchSpawn
934933
-- Do key values first because we might override a few things with setters.

0 commit comments

Comments
 (0)