X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fcrylink.qc;h=a69f43fbd3f7afbdd01bca9d88707ee5255c5729;hp=2a42f475b4cd1e094f15c931af5e21ff941fabe9;hb=8298414706b35c6726479437b0775aed4ac9b55d;hpb=a98dd9ddfc5de8bbd5937e7937bb9a43b1d67501 diff --git a/qcsrc/common/weapons/weapon/crylink.qc b/qcsrc/common/weapons/weapon/crylink.qc index 2a42f475b4..a69f43fbd3 100644 --- a/qcsrc/common/weapons/weapon/crylink.qc +++ b/qcsrc/common/weapons/weapon/crylink.qc @@ -43,9 +43,15 @@ void W_Crylink_Dequeue(entity e) W_Crylink_Dequeue_Raw(e.crylink_owner, e.queueprev, e, e.queuenext); } +void W_Crylink_DeleteLink(entity this) +{ + if(this.classname != "spike_oktoremove") + W_Crylink_Dequeue(this); + delete_fn(this); +} + void W_Crylink_Reset(entity this) { - W_Crylink_Dequeue(this); delete(this); } @@ -263,7 +269,6 @@ void W_Crylink_Touch(entity this, entity toucher) else if(finalhit) { // just unlink - W_Crylink_Dequeue(this); delete(this); return; } @@ -278,7 +283,6 @@ void W_Crylink_Touch(entity this, entity toucher) void W_Crylink_Fadethink(entity this) { - W_Crylink_Dequeue(this); delete(this); } @@ -308,6 +312,7 @@ void W_Crylink_Attack(Weapon thiswep, entity actor, .entity weaponentity) for(counter = 0; counter < shots; ++counter) { proj = new(spike); + proj.dtor = W_Crylink_DeleteLink; proj.reset = W_Crylink_Reset; proj.realowner = proj.owner = actor; proj.crylink_owner = actor; @@ -420,6 +425,7 @@ void W_Crylink_Attack2(Weapon thiswep, entity actor, .entity weaponentity) for(counter = 0; counter < shots; ++counter) { proj = new(spike); + proj.dtor = W_Crylink_DeleteLink; proj.weaponentity_fld = weaponentity; proj.reset = W_Crylink_Reset; proj.realowner = proj.owner = actor;