Fixes component dupe checks not actually checking if there IS a dupe component (#2501)

This commit is contained in:
CitadelStationBot
2017-08-26 21:11:03 -05:00
committed by kevinz000
parent 3254fcf535
commit 14ceaa39b4
+10 -9
View File
@@ -19,15 +19,16 @@
old = P.GetExactComponent(type)
else
old = P.GetComponent(dt)
switch(dm)
if(COMPONENT_DUPE_UNIQUE)
old.InheritComponent(src, TRUE)
parent = null //prevent COMPONENT_REMOVING signal
qdel(src)
return
if(COMPONENT_DUPE_HIGHLANDER)
InheritComponent(old, FALSE)
qdel(old)
if(old)
switch(dm)
if(COMPONENT_DUPE_UNIQUE)
old.InheritComponent(src, TRUE)
parent = null //prevent COMPONENT_REMOVING signal
qdel(src)
return
if(COMPONENT_DUPE_HIGHLANDER)
InheritComponent(old, FALSE)
qdel(old)
//let the others know
P.SendSignal(COMSIG_COMPONENT_ADDED, src)