Author
|
Message
|
Junior Member
|
11-01-2023
, 09:39
Te_beamfollow
|
#1
|
The message actually works, but it shows sprite files as additives I don't want this so.
I'm wondering if this can be recreated with amxx.
I've been trying for a few days but I didn't get any results
Maybe this code (from xash3dmaster. I didn't find in hlsdk. not full code) can be recreated with amxx. If this is possible please share
PHP Code:
void CL_DrawBeamFollow( int spriteIndex, BEAM *pbeam, int frame, int rendermode, float frametime, float *color )
{
particle_t *particles;
particle_t *pnew;
float div;
vec3_t delta;
vec3_t screenLast;
vec3_t screen;
CL_FreeDeadTrails( &pbeam->particles );
particles = pbeam->particles;
pnew = NULL;
div = 0;
if( pbeam->flags & FBEAM_STARTENTITY )
{
if( particles )
{
VectorSubtract( particles->org, pbeam->source, delta );
div = VectorLength( delta );
if( div >= 32 && cl_free_trails )
{
pnew = cl_free_trails;
cl_free_trails = pnew->next;
}
}
else if( cl_free_trails )
{
pnew = cl_free_trails;
cl_free_trails = pnew->next;
div = 0;
}
}
if( pnew )
{
VectorCopy( pbeam->source, pnew->org );
pnew->die = cl.time + pbeam->amplitude;
VectorClear( pnew->vel );
pnew->next = particles;
pbeam->particles = pnew;
particles = pnew;
}
// nothing to draw
if( !particles ) return;
if( !pnew && div != 0 )
{
VectorCopy( pbeam->source, delta );
TriWorldToScreen( pbeam->source, screenLast );
TriWorldToScreen( particles->org, screen );
}
else if( particles && particles->next )
{
VectorCopy( particles->org, delta );
TriWorldToScreen( particles->org, screenLast );
TriWorldToScreen( particles->next->org, screen );
particles = particles->next;
}
else
{
return;
}
// draw it
DrawBeamFollow( spriteIndex, pbeam->particles, frame, rendermode, delta, screen, screenLast,
pbeam->die, pbeam->source, pbeam->flags, pbeam->width,
pbeam->amplitude, pbeam->freq, color );
// drift popcorn trail if there is a velocity
particles = pbeam->particles;
while( particles )
{
VectorMA( particles->org, frametime, particles->vel, particles->org );
particles = particles->next;
}
}
Or it is done by creating beams as in the link below.
https://forums.alliedmods.net/showthread.php?t=184780
I know this is very specific and this is so complicated but I need it
SFMBE
|
|
|
|