X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fweapons%2Fprojectile.qc;h=ecdcd436d8f388cb1395937cd5ed1183c86f387c;hb=17d9558bff4fa8c1d7f558897b7830cb0cf4dca6;hp=3d2d32d9af16bff4eeb0c6ca89d1e7951c71e1c5;hpb=7e474d576080259e21690de30778b17029b5c0f2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index 3d2d32d9a..ecdcd436d 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -3,7 +3,7 @@ #include "../autocvars.qh" #include "../defs.qh" #include "../main.qh" -#include "../mutators/events.qh" +#include #include #include @@ -11,6 +11,8 @@ #include #include +#include + #include #include @@ -50,8 +52,6 @@ void Projectile_DrawTrail(entity this, vector to) } } -bool Projectile_isnade(int proj); // TODO: remove - void Projectile_Draw(entity this) { vector rot; @@ -171,7 +171,7 @@ void Projectile_Draw(entity this) void loopsound(entity e, int ch, Sound samp, float vol, float attn) { - TC(int, ch); + TC(int, ch); if (e.silent) return; @@ -236,15 +236,11 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) if (f & 1) { - this.origin_x = ReadCoord(); - this.origin_y = ReadCoord(); - this.origin_z = ReadCoord(); + this.origin = ReadVector(); setorigin(this, this.origin); if (this.count & 0x80) { - this.velocity_x = ReadCoord(); - this.velocity_y = ReadCoord(); - this.velocity_z = ReadCoord(); + this.velocity = ReadVector(); if (f & 0x10) this.gravity = ReadCoord(); else @@ -269,19 +265,19 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) this.fade_rate = 0; } - int myteam = ReadByte(); - this.team = myteam - 1; + int proj_team = ReadByte(); + this.team = proj_team - 1; if(teamplay) { - if(myteam) + if(proj_team) this.colormap = (this.team) * 0x11; // note: team - 1 on server (client uses different numbers) else this.colormap = 0x00; this.colormap |= BIT(10); // RENDER_COLORMAPPED } else - this.colormap = myteam; + this.colormap = proj_team; // TODO: projectiles use glowmaps for their color, not teams #if 0 if(this.colormap > 0) @@ -326,7 +322,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) HANDLE(SEEKER) this.traileffect = EFFECT_SEEKER_TRAIL.m_id; break; HANDLE(MAGE_SPIKE) this.traileffect = EFFECT_TR_VORESPIKE.m_id; break; - HANDLE(SHAMBLER_LIGHTNING) this.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break; + HANDLE(GOLEM_LIGHTNING) this.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break; HANDLE(RAPTORBOMB) this.gravity = 1; this.avelocity = '0 0 180'; this.traileffect = EFFECT_Null.m_id; break; HANDLE(RAPTORBOMBLET) this.gravity = 1; this.avelocity = '0 0 180'; this.traileffect = EFFECT_Null.m_id; break; @@ -388,7 +384,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) this.bouncefactor = WEP_CVAR(mortar, bouncefactor); this.bouncestop = WEP_CVAR(mortar, bouncestop); break; - case PROJECTILE_SHAMBLER_LIGHTNING: + case PROJECTILE_GOLEM_LIGHTNING: this.mins = '-8 -8 -8'; this.maxs = '8 8 8'; this.scale = 2.5;