X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Feffects%2Fqc%2Fgibs.qc;h=7be63e2e55c5e1056a544f23ae9bc0331ec8138a;hb=60b0e81cdaed847a7aac9d234f219937ab9462b2;hp=bc82b50d0c8e955355afaf0ed491ea0cca7e73c0;hpb=10c0e93c75ef6f408e3357bd5fb46c721e7e0576;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/effects/qc/gibs.qc b/qcsrc/common/effects/qc/gibs.qc index bc82b50d0..7be63e2e5 100644 --- a/qcsrc/common/effects/qc/gibs.qc +++ b/qcsrc/common/effects/qc/gibs.qc @@ -1,6 +1,5 @@ #include "gibs.qh" -#ifdef IMPLEMENTATION REGISTER_NET_TEMP(net_gibsplash) #ifdef SVQC @@ -46,7 +45,7 @@ void Violence_GibSplash_At(vector org, vector dir, float type, float amount, ent e.oldorigin_x = compressShortVector(e.velocity); FOREACH_CLIENT(IS_REAL_CLIENT(it), Violence_GibSplash_SendEntity(e, it, 0)); - remove(e); + delete(e); } void Violence_GibSplash(entity source, float type, float amount, entity attacker) @@ -70,7 +69,7 @@ void Violence_GibSplash(entity source, float type, float amount, entity attacker void Gib_Delete(entity this) { - remove(this); + delete(this); } string species_prefix(int specnum); @@ -111,13 +110,13 @@ void new_te_bloodshower (int ef, vector org, float explosionspeed, int howmany) __pointparticles(ef, org, randomvec() * explosionspeed, howmany / 50); } -void SUB_RemoveOnNoImpact(entity this) +void SUB_RemoveOnNoImpact(entity this, entity toucher) { if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) Gib_Delete(this); } -void Gib_Touch(entity this) +void Gib_Touch(entity this, entity toucher) { // TODO maybe bounce of walls, make more gibs, etc. @@ -170,7 +169,7 @@ void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector // TODO remove some gibs according to cl_nogibs gib = RubbleNew("gib"); - gib.move_movetype = MOVETYPE_BOUNCE; + set_movetype(gib, MOVETYPE_BOUNCE); gib.gravity = 1; gib.solid = SOLID_CORPSE; gib.cnt = specnum; @@ -180,6 +179,7 @@ void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector setsize (gib, '-8 -8 -8', '8 8 8'); gib.draw = Gib_Draw; + IL_PUSH(g_drawables, gib); if(destroyontouch) settouch(gib, Gib_Touch); else @@ -192,10 +192,9 @@ void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector org = trace_endpos; } - gib.move_origin = org; setorigin(gib, org); - gib.move_velocity = vconst * autocvar_cl_gibs_velocity_scale + vrand * autocvar_cl_gibs_velocity_random + '0 0 1' * autocvar_cl_gibs_velocity_up; - gib.move_avelocity = prandomvec() * vlen(gib.move_velocity) * autocvar_cl_gibs_avelocity_scale; + gib.velocity = vconst * autocvar_cl_gibs_velocity_scale + vrand * autocvar_cl_gibs_velocity_random + '0 0 1' * autocvar_cl_gibs_velocity_up; + gib.avelocity = prandomvec() * vlen(gib.velocity) * autocvar_cl_gibs_avelocity_scale; gib.move_time = time; gib.damageforcescale = autocvar_cl_gibs_damageforcescale; @@ -311,8 +310,6 @@ NET_HANDLE(net_gibsplash, bool isNew) // no gibs in gentle mode, sorry break; } - remove(this); + delete(this); } #endif - -#endif