Fixed bug where duplicating effects would run unintentinal PlayerSpawnSENT hook (#290)

This commit is contained in:
Erik Nystø Rahka 2020-05-07 22:21:12 +02:00 committed by GitHub
parent 0176469c43
commit adb66ad128
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -910,7 +910,7 @@ local function CreateEntityFromTable(EntTable, Player)
//Create sents using their spawn function with the arguments we stored earlier
sent = true
if(not EntTable.BuildDupeInfo.IsVehicle and not EntTable.BuildDupeInfo.IsNPC and EntTable.Class~="prop_ragdoll")then //These three are auto done
if(not EntTable.BuildDupeInfo.IsVehicle and not EntTable.BuildDupeInfo.IsNPC and EntTable.Class ~= "prop_ragdoll" and EntTable.Class ~= "prop_effect") then //These four are auto done
sent = hook.Call("PlayerSpawnSENT", nil, Player, EntTable.Class)
end