X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fweapons%2Fprojectile.qc;h=1f88bc8d60ae01519f0f13774d0f81191e35e279;hp=4015828e555fc6a41db87329254197072e3d9d58;hb=b0a563c3658ec620ddb9037b9417b743a47002a5;hpb=a4bcbda7a1eb2367fae1c2514d474d426803a673 diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index 4015828e55..1f88bc8d60 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -6,6 +6,7 @@ #include "../mutators/events.qh" #include +#include #include #include @@ -19,7 +20,7 @@ void SUB_Stop(entity this, entity toucher) { this.velocity = this.avelocity = '0 0 0'; - this.move_movetype = MOVETYPE_NONE; + set_movetype(this, MOVETYPE_NONE); } void Projectile_ResetTrail(entity this, vector to) @@ -330,7 +331,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) this.maxs = '0 0 0'; this.colormod = '0 0 0'; settouch(this, SUB_Stop); - this.move_movetype = MOVETYPE_TOSS; + set_movetype(this, MOVETYPE_TOSS); this.alphamod = 1; switch (this.cnt) @@ -340,7 +341,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) loopsound(this, CH_SHOTS_SINGLE, SND(ELECTRO_FLY), VOL_BASE, ATTEN_NORM); this.mins = '-4 -4 -4'; this.maxs = '4 4 4'; - this.move_movetype = MOVETYPE_BOUNCE; + set_movetype(this, MOVETYPE_BOUNCE); settouch(this, func_null); this.bouncefactor = WEP_CVAR_SEC(electro, bouncefactor); this.bouncestop = WEP_CVAR_SEC(electro, bouncestop); @@ -358,7 +359,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) case PROJECTILE_GRENADE_BOUNCING: this.mins = '-3 -3 -3'; this.maxs = '3 3 3'; - this.move_movetype = MOVETYPE_BOUNCE; + set_movetype(this, MOVETYPE_BOUNCE); settouch(this, func_null); this.bouncefactor = WEP_CVAR(mortar, bouncefactor); this.bouncestop = WEP_CVAR(mortar, bouncestop); @@ -376,21 +377,21 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) case PROJECTILE_PORTO_RED: this.colormod = '2 1 1'; this.alphamod = 0.5; - this.move_movetype = MOVETYPE_BOUNCE; + set_movetype(this, MOVETYPE_BOUNCE); settouch(this, func_null); break; case PROJECTILE_PORTO_BLUE: this.colormod = '1 1 2'; this.alphamod = 0.5; - this.move_movetype = MOVETYPE_BOUNCE; + set_movetype(this, MOVETYPE_BOUNCE); settouch(this, func_null); break; case PROJECTILE_HAGAR_BOUNCING: - this.move_movetype = MOVETYPE_BOUNCE; + set_movetype(this, MOVETYPE_BOUNCE); settouch(this, func_null); break; case PROJECTILE_CRYLINK_BOUNCING: - this.move_movetype = MOVETYPE_BOUNCE; + set_movetype(this, MOVETYPE_BOUNCE); settouch(this, func_null); break; case PROJECTILE_FIREBALL: @@ -400,7 +401,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) break; case PROJECTILE_FIREMINE: loopsound(this, CH_SHOTS_SINGLE, SND(FIREBALL_FLY), VOL_BASE, ATTEN_NORM); - this.move_movetype = MOVETYPE_BOUNCE; + set_movetype(this, MOVETYPE_BOUNCE); settouch(this, func_null); this.mins = '-4 -4 -4'; this.maxs = '4 4 4'; @@ -460,16 +461,16 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) if (this.gravity) { if (this.move_movetype == MOVETYPE_FLY) - this.move_movetype = MOVETYPE_TOSS; + set_movetype(this, MOVETYPE_TOSS); if (this.move_movetype == MOVETYPE_BOUNCEMISSILE) - this.move_movetype = MOVETYPE_BOUNCE; + set_movetype(this, MOVETYPE_BOUNCE); } else { if (this.move_movetype == MOVETYPE_TOSS) - this.move_movetype = MOVETYPE_FLY; + set_movetype(this, MOVETYPE_FLY); if (this.move_movetype == MOVETYPE_BOUNCE) - this.move_movetype = MOVETYPE_BOUNCEMISSILE; + set_movetype(this, MOVETYPE_BOUNCEMISSILE); } if (!(this.count & 0x80))