client.cpp
find this: Code:
static void playerRenderOptions(cl_entity_s* ent)
add following: Code:
if (cvar.barrel)//&& aim)
{
vec3_t vecEnd, up, right, forward, EntViewOrg;
VectorCopy(ent->origin,EntViewOrg);
if (ent->curstate.usehull) { EntViewOrg[2] += 12; }
else { EntViewOrg[2] += 17; }
gEngfuncs.pfnAngleVectors (ent->angles, forward, right, up);
forward[2] = -forward[2];
vec3_t vecBegin(EntViewOrg);
vecBegin[0]+=forward[0]*22;
vecBegin[1]+=forward[1]*22;
vecBegin[2]+=forward[2]*22;
vecEnd = vecBegin + forward * cvar.barrel;
drawLine(vecBegin,vecEnd,color);
}
if (cvar.spiked)//&& aim)
{
vec3_t vecEnd, up, right, forward, EntViewOrg;
VectorCopy(ent->origin,EntViewOrg);
gEngfuncs.pfnAngleVectors (ent->angles, forward, right, up);
forward[2] = -forward[2];
vec3_t vecBegin(EntViewOrg);
vecEnd = vecBegin + forward * cvar.spiked;
vecBegin = vecBegin - forward * cvar.spiked;
drawLine(vecBegin,vecEnd,color);
vecBegin = EntViewOrg;
vecEnd = vecBegin + right *cvar.spiked;
vecBegin = vecBegin - right *cvar.spiked;
drawLine(vecBegin,vecEnd,color);
vecBegin = EntViewOrg;
vecEnd = vecBegin + up * cvar.spiked;
vecBegin = vecBegin - up *cvar.spiked;
drawLine(vecBegin,vecEnd,color);
}
}
Register cvars!