mirror of
https://github.com/UberGames/RPG-X2.git
synced 2025-02-15 16:11:05 +00:00
Merge branch 'master' of https://github.com/UberGames/RPG-X2
This commit is contained in:
commit
b940920c32
9 changed files with 1433 additions and 101 deletions
105
cgame/cg_env.c
105
cgame/cg_env.c
|
@ -1086,9 +1086,9 @@ qboolean ParticleFire_Think(localEntity_t *le) {
|
||||||
return qtrue;
|
return qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG_ParticleFire(vec3_t origin, int size) {
|
void CG_ParticleFire(vec3_t origin, int killtime, int size) {
|
||||||
localEntity_t *le;
|
localEntity_t *le;
|
||||||
le = FX_AddSpawner(origin, NULL, NULL, NULL, qfalse, 0, 0, 10000, ParticleFire_Think, 10);
|
le = FX_AddSpawner(origin, NULL, NULL, NULL, qfalse, 0, 0, killtime, ParticleFire_Think, 10);
|
||||||
//le->data.spawner.data1 = size;
|
//le->data.spawner.data1 = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1328,7 +1328,7 @@ void CG_FireLaser( vec3_t start, vec3_t end, vec3_t normal, vec3_t laserRGB, flo
|
||||||
alpha, 0.0f,
|
alpha, 0.0f,
|
||||||
laserRGB, laserRGB,
|
laserRGB, laserRGB,
|
||||||
125,
|
125,
|
||||||
cgs.media.whiteLaserShader ); /* FIXME: FX_AddLine3 not defined */
|
cgs.media.whiteLaserShader );
|
||||||
|
|
||||||
FX_AddLine( start, end,
|
FX_AddLine( start, end,
|
||||||
1.0f,
|
1.0f,
|
||||||
|
@ -1407,7 +1407,7 @@ void CG_AimLaser( vec3_t start, vec3_t end, vec3_t normal )
|
||||||
random() * 0.2 + 0.2, 0.1f,
|
random() * 0.2 + 0.2, 0.1f,
|
||||||
lRGB, lRGB,
|
lRGB, lRGB,
|
||||||
150,
|
150,
|
||||||
cgs.media.whiteLaserShader ); /* FIXME: FX_AddLine3 not defined */
|
cgs.media.whiteLaserShader );
|
||||||
|
|
||||||
FX_AddLine( start, end,
|
FX_AddLine( start, end,
|
||||||
1.0f,
|
1.0f,
|
||||||
|
@ -1450,7 +1450,7 @@ CG_CookingSteam
|
||||||
Creates a basic cooking steam effect
|
Creates a basic cooking steam effect
|
||||||
======================
|
======================
|
||||||
*/
|
*/
|
||||||
/*void CG_CookingSteam( vec3_t origin, float radius )
|
void CG_CookingSteam( vec3_t origin, float radius )
|
||||||
{
|
{
|
||||||
vec3_t dir;
|
vec3_t dir;
|
||||||
|
|
||||||
|
@ -1458,7 +1458,8 @@ Creates a basic cooking steam effect
|
||||||
VectorScale( dir, random() * 5 + 2, dir );
|
VectorScale( dir, random() * 5 + 2, dir );
|
||||||
|
|
||||||
FX_AddSprite( origin, dir, qfalse, radius, radius * 2, 0.4F, 0.0, 0, 0, 1000, cgs.media.steamShader );
|
FX_AddSprite( origin, dir, qfalse, radius, radius * 2, 0.4F, 0.0, 0, 0, 1000, cgs.media.steamShader );
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
======================
|
======================
|
||||||
CG_ElectricFire
|
CG_ElectricFire
|
||||||
|
@ -1467,23 +1468,23 @@ Creates an electric fire effect
|
||||||
======================
|
======================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*void CG_ElectricFire( vec3_t origin, vec3_t normal )
|
void CG_ElectricFire( vec3_t origin, vec3_t normal )
|
||||||
{
|
{
|
||||||
FXTrail *particle;
|
void *particle;
|
||||||
vec3_t dir, direction, start, end;
|
vec3_t dir, direction, start, end;
|
||||||
vec3_t velocity, accel;
|
vec3_t velocity;
|
||||||
float scale, alpha;
|
float scale, alpha;
|
||||||
int numSparks;
|
int numSparks, i, j;
|
||||||
|
|
||||||
AngleVectors( normal, normal, NULL, NULL);
|
AngleVectors( normal, normal, NULL, NULL);
|
||||||
|
|
||||||
numSparks = 4 + (random() * 8.0f);
|
numSparks = 4 + (random() * 8.0f);
|
||||||
|
|
||||||
for ( int i = 0; i < numSparks; i++ )
|
for ( i = 0; i < numSparks; i++ )
|
||||||
{
|
{
|
||||||
scale = 0.3f + (random() *0.4);
|
scale = 0.3f + (random() *0.4);
|
||||||
|
|
||||||
for ( int j = 0; j < 3; j ++ )
|
for ( j = 0; j < 3; j ++ )
|
||||||
dir[j] = normal[j] + (0.4f * crandom());
|
dir[j] = normal[j] + (0.4f * crandom());
|
||||||
|
|
||||||
VectorNormalize(dir);
|
VectorNormalize(dir);
|
||||||
|
@ -1505,11 +1506,10 @@ Creates an electric fire effect
|
||||||
scale = 0.5f + (random() * 0.5f);
|
scale = 0.5f + (random() * 0.5f);
|
||||||
|
|
||||||
VectorScale( normal, 300, velocity );
|
VectorScale( normal, 300, velocity );
|
||||||
VectorSet( accel, 0, 0, -600 );
|
|
||||||
|
|
||||||
particle = FX_AddTrail( start,
|
particle = FX_AddTrail( start,
|
||||||
velocity,
|
velocity,
|
||||||
accel,
|
qtrue,
|
||||||
6.0f,
|
6.0f,
|
||||||
-24.0f,
|
-24.0f,
|
||||||
scale,
|
scale,
|
||||||
|
@ -1518,13 +1518,15 @@ Creates an electric fire effect
|
||||||
0.5f,
|
0.5f,
|
||||||
0.0f,
|
0.0f,
|
||||||
200.0f,
|
200.0f,
|
||||||
cgs.media.sparkShader,
|
cgs.media.sparkShader);
|
||||||
FXF_BOUNCE );
|
|
||||||
|
|
||||||
if ( particle == NULL )
|
if ( particle == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FXE_Spray( dir, 200, 200, 0.2f, 300, (FXPrimitive *) particle );
|
VectorMA( origin, 1, normal, direction );
|
||||||
|
VectorSet( velocity, 0, 0, 8 );
|
||||||
|
|
||||||
|
FXE_Spray( dir, 200, 200, 0.2f, velocity);
|
||||||
|
|
||||||
VectorMA( origin, 1, normal, direction );
|
VectorMA( origin, 1, normal, direction );
|
||||||
VectorSet( velocity, 0, 0, 8 );
|
VectorSet( velocity, 0, 0, 8 );
|
||||||
|
@ -1536,7 +1538,7 @@ Creates an electric fire effect
|
||||||
|
|
||||||
FX_AddSprite( direction,
|
FX_AddSprite( direction,
|
||||||
velocity,
|
velocity,
|
||||||
NULL,
|
qfalse,
|
||||||
scale,
|
scale,
|
||||||
scale,
|
scale,
|
||||||
alpha,
|
alpha,
|
||||||
|
@ -1612,7 +1614,7 @@ bool ForgeBoltPulse( FXPrimitive *fx, centity_t *ent )
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------
|
//-----------------------------
|
||||||
void CG_ForgeBolt( centity_t *cent )
|
/*void CG_ForgeBolt( centity_t *cent )
|
||||||
{
|
{
|
||||||
qboolean pulse;
|
qboolean pulse;
|
||||||
int effects;
|
int effects;
|
||||||
|
@ -1799,12 +1801,12 @@ The particles will accelerate up to the half-way point of the cylinder, then dec
|
||||||
{
|
{
|
||||||
vec3_t vel, accel, dir, pos, right, up;
|
vec3_t vel, accel, dir, pos, right, up;
|
||||||
float len, time, acceleration, scale, dis, vf;
|
float len, time, acceleration, scale, dis, vf;
|
||||||
|
int t;
|
||||||
VectorSubtract( cent->currentState.origin2, cent->lerpOrigin, dir );
|
VectorSubtract( cent->currentState.origin2, cent->lerpOrigin, dir );
|
||||||
len = VectorNormalize( dir );
|
len = VectorNormalize( dir );
|
||||||
MakeNormalVectors( dir, right, up );
|
MakeNormalVectors( dir, right, up );
|
||||||
|
|
||||||
for ( int t=0; t < 3; t++ )
|
for ( t=0; t < 3; t++ )
|
||||||
{
|
{
|
||||||
// Create start offset within a circular radius
|
// Create start offset within a circular radius
|
||||||
VectorMA( cent->lerpOrigin, 8 * crandom(), right, pos );
|
VectorMA( cent->lerpOrigin, 8 * crandom(), right, pos );
|
||||||
|
@ -1824,7 +1826,7 @@ The particles will accelerate up to the half-way point of the cylinder, then dec
|
||||||
// These will spawn at the base and accelerate towards the middle
|
// These will spawn at the base and accelerate towards the middle
|
||||||
if ( rand() & 1 )
|
if ( rand() & 1 )
|
||||||
{
|
{
|
||||||
FX_AddSprite( pos, vel, accel,
|
FX_AddSprite3( pos, vel, accel,
|
||||||
scale, 0.0f,
|
scale, 0.0f,
|
||||||
1.0f, 0.0f,
|
1.0f, 0.0f,
|
||||||
0.0f,
|
0.0f,
|
||||||
|
@ -1834,7 +1836,7 @@ The particles will accelerate up to the half-way point of the cylinder, then dec
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FX_AddSprite( pos, vel, accel,
|
FX_AddSprite3( pos, vel, accel,
|
||||||
scale, 0.0f,
|
scale, 0.0f,
|
||||||
1.0f, 0.0f,
|
1.0f, 0.0f,
|
||||||
0.0f,
|
0.0f,
|
||||||
|
@ -1852,7 +1854,7 @@ The particles will accelerate up to the half-way point of the cylinder, then dec
|
||||||
|
|
||||||
if ( rand() & 1 )
|
if ( rand() & 1 )
|
||||||
{
|
{
|
||||||
FX_AddSprite( pos, vel, accel,
|
FX_AddSprite3( pos, vel, accel,
|
||||||
scale, 0.0f,
|
scale, 0.0f,
|
||||||
0.0f, 1.0f,
|
0.0f, 1.0f,
|
||||||
0.0f,
|
0.0f,
|
||||||
|
@ -1862,7 +1864,7 @@ The particles will accelerate up to the half-way point of the cylinder, then dec
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FX_AddSprite( pos, vel, accel,
|
FX_AddSprite3( pos, vel, accel,
|
||||||
scale, 0.0f,
|
scale, 0.0f,
|
||||||
0.0f, 1.0f,
|
0.0f, 1.0f,
|
||||||
0.0f,
|
0.0f,
|
||||||
|
@ -1879,7 +1881,7 @@ CG_ExplosionTrail
|
||||||
-------------------------
|
-------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*bool explosionTrailThink( FXPrimitive *fx, centity_t *ent )
|
/*qboolean explosionTrailThink( localEntity_t *fx )
|
||||||
{
|
{
|
||||||
localEntity_t *le=0;
|
localEntity_t *le=0;
|
||||||
vec3_t direction, origin, new_org, angles, dir;
|
vec3_t direction, origin, new_org, angles, dir;
|
||||||
|
@ -1901,7 +1903,7 @@ CG_ExplosionTrail
|
||||||
// Maybe something else should be done as well...
|
// Maybe something else should be done as well...
|
||||||
remove = qtrue;
|
remove = qtrue;
|
||||||
//FIXME: FX_RemoveEffect( fx );
|
//FIXME: FX_RemoveEffect( fx );
|
||||||
return false;
|
return qfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
scale = 80 * 0.03f;
|
scale = 80 * 0.03f;
|
||||||
|
@ -1931,7 +1933,7 @@ CG_ExplosionTrail
|
||||||
CG_ExplosionEffects( origin, 3.0f, 600 );
|
CG_ExplosionEffects( origin, 3.0f, 600 );
|
||||||
G_RadiusDamage( origin, ent->gent, 150, 80, NULL, MOD_UNKNOWN );
|
G_RadiusDamage( origin, ent->gent, 150, 80, NULL, MOD_UNKNOWN );
|
||||||
|
|
||||||
return true;
|
return qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -1940,12 +1942,12 @@ void CG_ExplosionTrail( centity_t *cent )
|
||||||
vec3_t dir;
|
vec3_t dir;
|
||||||
float len;
|
float len;
|
||||||
|
|
||||||
VectorSubtract( cent->currentState.origin2, cent->lerpOrigin, dir );
|
VectorSubtract( cent->currentState.origin2, cent->currentState.origin, dir );
|
||||||
len = VectorNormalize( dir );
|
len = VectorNormalize( dir );
|
||||||
VectorScale( dir, 325, dir );
|
VectorScale( dir, 325, dir );
|
||||||
|
|
||||||
FX_AddParticle( cent, cent->lerpOrigin, dir, NULL, 16, 0.0, 1.0, 1.0,
|
FX_AddParticle( cent->currentState.origin, dir, qfalse, 16, 0.0, 1.0, 1.0,
|
||||||
0.0, 0.0, 6000, cgs.media.ltblueParticleShader, FXF_NODRAW, explosionTrailThink );
|
0.0, 0.0, 6000, cgs.media.ltblueParticleShader, explosionTrailThink );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1966,7 +1968,7 @@ A scanning type beam
|
||||||
vectoangles( normal, angles );
|
vectoangles( normal, angles );
|
||||||
alpha = Vector4to3( cent->gent->startRGBA, rgb );
|
alpha = Vector4to3( cent->gent->startRGBA, rgb );
|
||||||
|
|
||||||
/* // Code to make the thing "snap" when it's doing the beam slices
|
// Code to make the thing "snap" when it's doing the beam slices
|
||||||
if ( abs( cent->gent->pos2[0] ) >= cent->gent->radius )
|
if ( abs( cent->gent->pos2[0] ) >= cent->gent->radius )
|
||||||
{
|
{
|
||||||
// Snap back to start and move to the next slice
|
// Snap back to start and move to the next slice
|
||||||
|
@ -1982,9 +1984,9 @@ A scanning type beam
|
||||||
|
|
||||||
// Always move across the slice
|
// Always move across the slice
|
||||||
cent->gent->pos2[0] -= ( cg.frametime * 0.001 * cent->gent->speed );
|
cent->gent->pos2[0] -= ( cg.frametime * 0.001 * cent->gent->speed );
|
||||||
*/
|
|
||||||
|
|
||||||
/*if ( cent->gent->spawnflags & 2 )
|
|
||||||
|
if ( cent->gent->spawnflags & 2 )
|
||||||
{
|
{
|
||||||
// Trace a cone
|
// Trace a cone
|
||||||
angles[2] = cent->gent->angle;
|
angles[2] = cent->gent->angle;
|
||||||
|
@ -2029,32 +2031,34 @@ Kind of looks like a teleporter effect
|
||||||
----------------------
|
----------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*void CG_ShimmeryThing( vec3_t start, vec3_t end, float radius, qboolean taper )
|
void CG_ShimmeryThing( vec3_t start, vec3_t end, vec3_t content )
|
||||||
{
|
{
|
||||||
vec3_t normal, angles, base, top, dir;
|
vec3_t normal, angles, base, top, dir;
|
||||||
float len;
|
float len;
|
||||||
|
int i;
|
||||||
|
int taper = content[2];
|
||||||
|
|
||||||
VectorSubtract( end, start, normal );
|
VectorSubtract( end, start, normal );
|
||||||
len = VectorNormalize( normal );
|
len = VectorNormalize( normal );
|
||||||
vectoangles( normal, angles );
|
vectoangles( normal, angles );
|
||||||
|
|
||||||
for ( int i=0; i < 2; i++)
|
for ( i=0; i < 2; i++)
|
||||||
{
|
{
|
||||||
// Spawn the shards of light around a cylinder
|
// Spawn the shards of light around a cylinder
|
||||||
angles[2] = crandom() * 360;
|
angles[2] = crandom() * 360;
|
||||||
AngleVectors( angles, NULL, dir, NULL );
|
AngleVectors( angles, NULL, dir, NULL );
|
||||||
|
|
||||||
// See if the effect should be tapered at the top
|
// See if the effect should be tapered at the top
|
||||||
if ( taper )
|
if ( taper = 2 )
|
||||||
{
|
{
|
||||||
VectorMA( start, radius * 0.25f, dir, top );
|
VectorMA( start, content[1] * 0.25f, dir, top );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
VectorMA( start, radius, dir, top );
|
VectorMA( start, content[1], dir, top );
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorMA( end, radius, dir, base );
|
VectorMA( end, content[1], dir, base );
|
||||||
|
|
||||||
// Use a couple of different kinds to break up the monotony..
|
// Use a couple of different kinds to break up the monotony..
|
||||||
if ( rand() & 1 )
|
if ( rand() & 1 )
|
||||||
|
@ -2068,24 +2072,6 @@ Kind of looks like a teleporter effect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
-------------------------
|
|
||||||
CG_ShimmeryThing_Spawner
|
|
||||||
-------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*void CG_Shimmer( vec3_t position, vec3_t dest, vec3_t dir, vec3_t other )
|
|
||||||
{
|
|
||||||
CG_ShimmeryThing( position, dest, other[0], (qboolean) other[1] );
|
|
||||||
}
|
|
||||||
|
|
||||||
void CG_ShimmeryThing_Spawner( vec3_t start, vec3_t end, float radius, qboolean taper, int duration )
|
|
||||||
{
|
|
||||||
vec3_t packed = { radius, (float) taper, 0 };
|
|
||||||
|
|
||||||
FX_AddSpawner( start, end, NULL, packed, 100, 0, duration, (void *) CG_Shimmer, NULL, 512 );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
----------------------
|
----------------------
|
||||||
CG_Borg_Bolt
|
CG_Borg_Bolt
|
||||||
|
@ -2093,12 +2079,13 @@ CG_Borg_Bolt
|
||||||
Yellow bolts that spark when the endpoints get close together
|
Yellow bolts that spark when the endpoints get close together
|
||||||
----------------------
|
----------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*void CG_Borg_Bolt( centity_t *cent )
|
/*void CG_Borg_Bolt( centity_t *cent )
|
||||||
{
|
{
|
||||||
vec3_t diff, neworg, start, end;
|
vec3_t diff, neworg, start, end;
|
||||||
float len;
|
float len;
|
||||||
|
|
||||||
if (!cent->gent->enemy){
|
if (!cent->gent->enemy){ // need sth to trace target
|
||||||
return;//we lost him
|
return;//we lost him
|
||||||
}
|
}
|
||||||
VectorCopy( cent->gent->enemy->currentOrigin, end );
|
VectorCopy( cent->gent->enemy->currentOrigin, end );
|
||||||
|
|
|
@ -1729,7 +1729,7 @@ case EV_SHAKE_SOUND:
|
||||||
|
|
||||||
case EV_FX_PARTICLEFIRE:
|
case EV_FX_PARTICLEFIRE:
|
||||||
DEBUGNAME("EV_FX_PARTICLEFIRE");
|
DEBUGNAME("EV_FX_PARTICLEFIRE");
|
||||||
CG_ParticleFire(cent->currentState.origin, cent->currentState.eventParm);
|
CG_ParticleFire(cent->currentState.origin, cent->currentState.time2, cent->currentState.eventParm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EV_SHOOTER_SOUND:
|
case EV_SHOOTER_SOUND:
|
||||||
|
@ -1791,60 +1791,60 @@ case EV_SHAKE_SOUND:
|
||||||
|
|
||||||
// Additional ports from SP by Harry Young
|
// Additional ports from SP by Harry Young
|
||||||
|
|
||||||
/*case EV_FX_COOKING_STEAM:
|
case EV_FX_COOKING_STEAM:
|
||||||
DEBUGNAME("EV_FX_COOKING_STEAM");
|
DEBUGNAME("EV_FX_COOKING_STEAM");
|
||||||
CG_CookingSteam( cent->lerpOrigin, cent->currentState.angles[0] );
|
CG_CookingSteam( cent->currentState.origin, cent->currentState.angles[0] );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*case EV_FX_ELECFIRE:
|
case EV_FX_ELECFIRE:
|
||||||
DEBUGNAME("EV_FX_ELECFIRE");
|
DEBUGNAME("EV_FX_ELECFIRE");
|
||||||
// Don't play this sound quite so much...
|
// Don't play this sound quite so much...
|
||||||
if ( rand() & 1 )
|
if ( rand() & 1 )
|
||||||
{
|
{
|
||||||
cgi_S_StartSound (NULL, es->number, CHAN_BODY, cgi_S_RegisterSound ( va("sound/ambience/spark%d.wav", Q_irand(1,6)) ));
|
//cgi_S_StartSound (NULL, es->number, CHAN_BODY, cgi_S_RegisterSound ( va("sound/ambience/spark%d.wav", Q_irand(1,6)) ));
|
||||||
}
|
}
|
||||||
CG_ElectricFire( cent->lerpOrigin, cent->currentState.angles );
|
CG_ElectricFire( cent->currentState.origin, cent->currentState.angles );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EV_FX_FORGE_BOLT:
|
case EV_FX_FORGE_BOLT:
|
||||||
DEBUGNAME("EV_FX_FORGE_BOLT");
|
DEBUGNAME("EV_FX_FORGE_BOLT");
|
||||||
CG_ForgeBolt( cent );
|
//CG_ForgeBolt( cent );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EV_FX_PLASMA:
|
case EV_FX_PLASMA:
|
||||||
DEBUGNAME("EV_FX_PLASMA");
|
DEBUGNAME("EV_FX_PLASMA");
|
||||||
CG_Plasma( cent->lerpOrigin, cent->currentState.origin2, cent->gent->startRGBA, cent->gent->finalRGBA );
|
//CG_Plasma( cent->currentState.origin, cent->currentState.origin2, cent->currentState.angles, cent->currentState.angles2 ); // RGBA's
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EV_FX_STREAM:
|
case EV_FX_STREAM:
|
||||||
DEBUGNAME("EV_FX_STREAM");
|
DEBUGNAME("EV_FX_STREAM");
|
||||||
CG_ParticleStream( cent );
|
//CG_ParticleStream( cent );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EV_FX_TRANSPORTER_STREAM:
|
case EV_FX_TRANSPORTER_STREAM:
|
||||||
DEBUGNAME("EV_FX_TRANSPORTER_STREAM");
|
DEBUGNAME("EV_FX_TRANSPORTER_STREAM");
|
||||||
CG_TransporterStream( cent );
|
//CG_TransporterStream( cent );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EV_FX_EXPLOSION_TRAIL:
|
case EV_FX_EXPLOSION_TRAIL:
|
||||||
DEBUGNAME("EV_FX_EXPLOSION_TRAIL");
|
DEBUGNAME("EV_FX_EXPLOSION_TRAIL");
|
||||||
CG_ExplosionTrail( cent );
|
//CG_ExplosionTrail( cent );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EV_FX_BORG_ENERGY_BEAM:
|
case EV_FX_BORG_ENERGY_BEAM:
|
||||||
DEBUGNAME("EV_FX_BORG_ENERGY_BEAM");
|
DEBUGNAME("EV_FX_BORG_ENERGY_BEAM");
|
||||||
CG_BorgEnergyBeam( cent );
|
//CG_BorgEnergyBeam( cent );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EV_FX_SHIMMERY_THING:
|
case EV_FX_SHIMMERY_THING:
|
||||||
DEBUGNAME("EV_FX_SHIMMERY_THING");
|
DEBUGNAME("EV_FX_SHIMMERY_THING");
|
||||||
CG_ShimmeryThing( cent->lerpOrigin, cent->currentState.origin2, cent->gent->radius, cent->gent->spawnflags & 2 );
|
CG_ShimmeryThing( cent->currentState.origin, cent->currentState.origin2, cent->currentState.angles ); // Radius and spawnflags
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EV_FX_BORG_BOLT:
|
case EV_FX_BORG_BOLT:
|
||||||
DEBUGNAME("EV_FX_BORG_BOLT");
|
DEBUGNAME("EV_FX_BORG_BOLT");
|
||||||
CG_Borg_Bolt( cent );
|
//CG_Borg_Bolt( cent );
|
||||||
break;*/
|
break;
|
||||||
|
|
||||||
// Default
|
// Default
|
||||||
|
|
||||||
|
|
|
@ -2042,6 +2042,11 @@ void CG_Drip(centity_t *cent, int killTime );
|
||||||
void CG_Chunks( vec3_t origin, vec3_t dir, float size, material_type_t type );
|
void CG_Chunks( vec3_t origin, vec3_t dir, float size, material_type_t type );
|
||||||
void CG_FireLaser( vec3_t start, vec3_t end, vec3_t normal, vec3_t laserRGB, float alpha );
|
void CG_FireLaser( vec3_t start, vec3_t end, vec3_t normal, vec3_t laserRGB, float alpha );
|
||||||
void CG_AimLaser( vec3_t start, vec3_t end, vec3_t normal );
|
void CG_AimLaser( vec3_t start, vec3_t end, vec3_t normal );
|
||||||
|
// Stasis_door-stuff
|
||||||
|
// Stasis_door-stuff
|
||||||
|
// Stasis_door-stuff
|
||||||
|
// Stasis_door-stuff
|
||||||
|
// Stasis_door-stuff
|
||||||
|
|
||||||
//TiM
|
//TiM
|
||||||
void CG_FountainSpurt( vec3_t org, vec3_t end );
|
void CG_FountainSpurt( vec3_t org, vec3_t end );
|
||||||
|
@ -2051,11 +2056,23 @@ void CG_ElectricalExplosion( vec3_t start, vec3_t dir, float radius );
|
||||||
void CG_PhaserFX(centity_t *cent);
|
void CG_PhaserFX(centity_t *cent);
|
||||||
void CG_DisruptorFX(centity_t *cent); //RPG-X | Harry Young | 03.12.2011
|
void CG_DisruptorFX(centity_t *cent); //RPG-X | Harry Young | 03.12.2011
|
||||||
void CG_TorpedoFX(centity_t *cent);
|
void CG_TorpedoFX(centity_t *cent);
|
||||||
void CG_ParticleFire(vec3_t origin, int size);
|
void CG_ParticleFire(vec3_t origin, int killtime, int size);
|
||||||
void CG_ShowTrigger(centity_t *cent);
|
void CG_ShowTrigger(centity_t *cent);
|
||||||
|
|
||||||
// Additional ports from SP by Harry Young
|
// Additional ports from SP by Harry Young
|
||||||
//void CG_CookingSteam( vec3_t origin, float radius );
|
void CG_CookingSteam( vec3_t origin, float radius );
|
||||||
|
void CG_ElectricFire( vec3_t origin, vec3_t normal );
|
||||||
|
void ForgeBoltFireback( vec3_t start, vec3_t end, vec3_t velocity, vec3_t user );
|
||||||
|
void CG_ForgeBolt( centity_t *cent );
|
||||||
|
void CG_Plasma( vec3_t start, vec3_t end, vec4_t startRGBA, vec4_t endRGBA );
|
||||||
|
void CG_ParticleStream( centity_t *cent );
|
||||||
|
void CG_TransporterStream( centity_t *cent );
|
||||||
|
void CG_ExplosionTrail( centity_t *cent );
|
||||||
|
void CG_BorgEnergyBeam( centity_t *cent );
|
||||||
|
void CG_ShimmeryThing( vec3_t start, vec3_t end, vec3_t content );
|
||||||
|
void CG_Shimmer( vec3_t position, vec3_t dest, vec3_t dir, vec3_t other );
|
||||||
|
void CG_ShimmeryThing_Spawner( vec3_t start, vec3_t end, float radius, qboolean taper, int duration );
|
||||||
|
void CG_Borg_Bolt( centity_t *cent );
|
||||||
|
|
||||||
//
|
//
|
||||||
// cg_weapons.c
|
// cg_weapons.c
|
||||||
|
|
|
@ -536,6 +536,80 @@ localEntity_t *FX_AddSprite2(vec3_t origin, vec3_t velocity, qboolean gravity, f
|
||||||
return(le);
|
return(le);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
FX_AddSprite3
|
||||||
|
|
||||||
|
Adds a view oriented sprite to the FX wrapper render list
|
||||||
|
===============
|
||||||
|
*/
|
||||||
|
|
||||||
|
localEntity_t *FX_AddSprite3(vec3_t origin, vec3_t velocity, vec3_t acceleration, float scale, float dscale,
|
||||||
|
float startalpha, float endalpha, float roll, float elasticity,
|
||||||
|
float killTime, qhandle_t shader)
|
||||||
|
{
|
||||||
|
localEntity_t *le;
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
if (!shader)
|
||||||
|
{
|
||||||
|
Com_Printf("FX_AddSprite: NULL shader\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Glow mark
|
||||||
|
|
||||||
|
le = CG_AllocLocalEntity();
|
||||||
|
le->leType = LE_VIEWSPRITE;
|
||||||
|
le->refEntity.data.sprite.rotation = roll;
|
||||||
|
|
||||||
|
le->startTime = cg.time;
|
||||||
|
le->endTime = le->startTime + killTime;
|
||||||
|
|
||||||
|
le->data.sprite.radius = scale;
|
||||||
|
le->data.sprite.dradius = dscale;
|
||||||
|
|
||||||
|
le->alpha = startalpha;
|
||||||
|
le->dalpha = endalpha - startalpha;
|
||||||
|
VectorSet(le->data.sprite.startRGB, 1, 1, 1);
|
||||||
|
VectorSet(le->data.sprite.dRGB, 0, 0, 0);
|
||||||
|
|
||||||
|
// le->refEntity.hModel = 0;
|
||||||
|
le->refEntity.customShader = shader;
|
||||||
|
|
||||||
|
// set origin
|
||||||
|
VectorCopy ( origin, le->refEntity.origin);
|
||||||
|
VectorCopy ( origin, le->refEntity.oldorigin );
|
||||||
|
|
||||||
|
le->color[0] = 1.0;
|
||||||
|
le->color[1] = 1.0;
|
||||||
|
le->color[2] = 1.0;
|
||||||
|
le->color[3] = startalpha;
|
||||||
|
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
|
||||||
|
|
||||||
|
if (velocity)
|
||||||
|
{
|
||||||
|
le->leFlags |= LEF_MOVE;
|
||||||
|
VectorCopy (origin, le->pos.trBase);
|
||||||
|
VectorCopy (velocity, le->pos.trDelta);
|
||||||
|
if (acceleration) //how do i make this accellerate in the given direction?... lol, bee-fountain on forge3 now ^^
|
||||||
|
le->pos.trType = TR_GRAVITY;
|
||||||
|
else
|
||||||
|
le->pos.trType = TR_LINEAR;
|
||||||
|
le->pos.trTime = cg.time;
|
||||||
|
le->pos.trDuration = killTime;
|
||||||
|
|
||||||
|
if (elasticity > 0)
|
||||||
|
{
|
||||||
|
le->leFlags |= LEF_USE_COLLISION;
|
||||||
|
le->bounceFactor = elasticity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return(le);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
FX_AddBezier
|
FX_AddBezier
|
||||||
|
|
|
@ -26,6 +26,9 @@ localEntity_t *FX_AddSprite(vec3_t origin, vec3_t velocity, qboolean gravity, fl
|
||||||
localEntity_t *FX_AddSprite2(vec3_t origin, vec3_t velocity, qboolean gravity, float scale, float dscale,
|
localEntity_t *FX_AddSprite2(vec3_t origin, vec3_t velocity, qboolean gravity, float scale, float dscale,
|
||||||
float startalpha, float endalpha, vec3_t startRGB, vec3_t endRGB, float roll, float elasticity,
|
float startalpha, float endalpha, vec3_t startRGB, vec3_t endRGB, float roll, float elasticity,
|
||||||
float killTime, qhandle_t shader);
|
float killTime, qhandle_t shader);
|
||||||
|
localEntity_t *FX_AddSprite3(vec3_t origin, vec3_t velocity, vec3_t acceleration, float scale, float dscale,
|
||||||
|
float startalpha, float endalpha, float roll, float elasticity,
|
||||||
|
float killTime, qhandle_t shader);
|
||||||
localEntity_t *FX_AddBezier(vec3_t start, vec3_t end, vec3_t cpoint1, vec3_t cpoint2, vec3_t cpointvel1,
|
localEntity_t *FX_AddBezier(vec3_t start, vec3_t end, vec3_t cpoint1, vec3_t cpoint2, vec3_t cpointvel1,
|
||||||
vec3_t cpointvel2,vec3_t cpointacc1, vec3_t cpointacc2, float width,
|
vec3_t cpointvel2,vec3_t cpointacc1, vec3_t cpointacc2, float width,
|
||||||
float killTime, qhandle_t shader);
|
float killTime, qhandle_t shader);
|
||||||
|
|
|
@ -3646,15 +3646,21 @@ void Cmd_CallVote_f( gentity_t *ent ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TiM - if we're callvoting to kick an admin, deny it
|
|
||||||
if ( !Q_stricmp( arg1, "kick" ) ) {
|
if ( !Q_stricmp( arg1, "kick" ) ) {
|
||||||
int id;
|
//TiM - if we're callvoting to kick an admin, deny it
|
||||||
|
int id = ClientNumberFromString( ent, arg2 );
|
||||||
|
|
||||||
id = ClientNumberFromString( ent, arg2 );
|
//Harry Young - Check if clientnum is valid, else we get a crash
|
||||||
//TiM - only publicly broadcasted admins are checked
|
if ( id == -1 ) {
|
||||||
|
trap_SendServerCommand( ent-g_entities, "print \"Error: no such client.\n\"" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//TiM - if we're callvoting to kick an admin, deny it
|
||||||
|
//only publicly broadcasted admins are checked
|
||||||
//the hidden admin login people are not to protect their nature
|
//the hidden admin login people are not to protect their nature
|
||||||
if ( g_classData[g_entities[id].client->ps.persistant[PERS_CLASS]].isAdmin ) {
|
if ( g_classData[g_entities[id].client->ps.persistant[PERS_CLASS]].isAdmin ) {
|
||||||
trap_SendServerCommand( ent-g_entities, "print \"Error: You are not allowed to kick admins.\"" );
|
trap_SendServerCommand( ent-g_entities, "print \"Error: You are not allowed to kick admins.\n\"" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3667,7 +3673,7 @@ void Cmd_CallVote_f( gentity_t *ent ) {
|
||||||
trap_Cvar_VariableStringBuffer( "nextmap", s, sizeof(s) );
|
trap_Cvar_VariableStringBuffer( "nextmap", s, sizeof(s) );
|
||||||
if (*s)
|
if (*s)
|
||||||
{
|
{
|
||||||
Com_sprintf( level.voteString, sizeof( level.voteString ), "%s %s; set nextmap \"%s\"", arg1, arg2, s );
|
Com_sprintf( level.voteString, sizeof( level.voteString ), "%s %s; set nextmap \"%s\n\"", arg1, arg2, s );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
147
game/g_fx.c
147
game/g_fx.c
|
@ -1018,15 +1018,35 @@ void SP_fx_torpedo(gentity_t *ent) {
|
||||||
ent->nextthink = level.time + 1000;
|
ent->nextthink = level.time + 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*QUAKED fx_particle_fire (0 0 1) (-8 -8 -8) (8 8 8)
|
/*QUAKED fx_particle_fire (0 0 1) (-8 -8 -8) (8 8 8) STARTOFF
|
||||||
A particle based fire effect. Use this sparingly as it is an fps killer.
|
A particle based fire effect. Use this sparingly as it is an fps killer.
|
||||||
If you want to use a bunch of fires use fx_fire.
|
If you want to use a bunch of fires use fx_fire.
|
||||||
|
|
||||||
|
"targetname" - toggles effect on/off whenver used, requires 10x mor thinks
|
||||||
"size" how big the fire shoud be (default: 10)
|
"size" how big the fire shoud be (default: 10)
|
||||||
*/
|
*/
|
||||||
void particleFire_think(gentity_t *ent) {
|
void particleFire_think(gentity_t *ent) {
|
||||||
G_AddEvent(ent, EV_FX_PARTICLEFIRE, ent->count);
|
G_AddEvent(ent, EV_FX_PARTICLEFIRE, ent->count);
|
||||||
ent->nextthink = level.time + 10000; //refresh every 10 seconds
|
if (ent->targetname)
|
||||||
|
ent->nextthink = level.time + 1000;
|
||||||
|
else
|
||||||
|
ent->nextthink = level.time + 10000;
|
||||||
|
}
|
||||||
|
|
||||||
|
void particleFire_use( gentity_t *self, gentity_t *other, gentity_t *activator)
|
||||||
|
{
|
||||||
|
if ( self->count )
|
||||||
|
{
|
||||||
|
self->think = NULL;
|
||||||
|
self->nextthink = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self->think = particleFire_think;
|
||||||
|
self->nextthink = level.time + 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
self->count = !self->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SP_fx_particleFire(gentity_t *ent) {
|
void SP_fx_particleFire(gentity_t *ent) {
|
||||||
|
@ -1036,23 +1056,65 @@ void SP_fx_particleFire(gentity_t *ent) {
|
||||||
ent->count = 10;
|
ent->count = 10;
|
||||||
else
|
else
|
||||||
ent->count = size;
|
ent->count = size;
|
||||||
|
|
||||||
|
if (ent->targetname)
|
||||||
|
ent->s.time2 = 1000;
|
||||||
|
else
|
||||||
|
ent->s.time2 = 10000;
|
||||||
|
|
||||||
trap_LinkEntity(ent);
|
trap_LinkEntity(ent);
|
||||||
ent->nextthink = level.time + 1000;
|
|
||||||
|
if (ent->targetname)
|
||||||
|
{
|
||||||
|
ent->use = particleFire_use;
|
||||||
|
}
|
||||||
|
|
||||||
|
ent->count = !(ent->spawnflags & 1);
|
||||||
|
|
||||||
|
if (!ent->targetname || !(ent->spawnflags & 1) )
|
||||||
|
{
|
||||||
ent->think = particleFire_think;
|
ent->think = particleFire_think;
|
||||||
|
ent->nextthink = level.time + 2000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ent->think = NULL;
|
||||||
|
ent->nextthink = -1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*QUAKED fx_fire (0 0 1) (-8 -8 -8) (8 8 8)
|
/*QUAKED fx_fire (0 0 1) (-8 -8 -8) (8 8 8) STARTOFF
|
||||||
A fire affect based on the adminguns fire effect.
|
A fire affect based on the adminguns fire effect.
|
||||||
|
|
||||||
|
"targetname" - toggles effect on/off whenver used, requires 10x mor thinks
|
||||||
"size" how big the fire shoud be (default: 64)
|
"size" how big the fire shoud be (default: 64)
|
||||||
"angles" fires angles (default: 0 0 0 = UP)
|
"angles" fires angles (default: 0 0 0 = UP)
|
||||||
*/
|
*/
|
||||||
void fire_think(gentity_t *ent) {
|
void fire_think(gentity_t *ent) {
|
||||||
G_AddEvent(ent, EV_FX_FIRE, 1);
|
G_AddEvent(ent, EV_FX_FIRE, 1);
|
||||||
|
if (ent->targetname)
|
||||||
|
ent->nextthink = level.time + 1000;
|
||||||
|
else
|
||||||
ent->nextthink = level.time + 10000;
|
ent->nextthink = level.time + 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fire_use( gentity_t *self, gentity_t *other, gentity_t *activator)
|
||||||
|
{
|
||||||
|
if ( self->count )
|
||||||
|
{
|
||||||
|
self->think = NULL;
|
||||||
|
self->nextthink = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self->think = fire_think;
|
||||||
|
self->nextthink = level.time + 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
self->count = !self->count;
|
||||||
|
}
|
||||||
|
|
||||||
void SP_fx_fire(gentity_t *ent) {
|
void SP_fx_fire(gentity_t *ent) {
|
||||||
int size;
|
int size;
|
||||||
G_SpawnInt("size", "64", &size);
|
G_SpawnInt("size", "64", &size);
|
||||||
|
@ -1061,10 +1123,31 @@ void SP_fx_fire(gentity_t *ent) {
|
||||||
else
|
else
|
||||||
ent->s.time = size;
|
ent->s.time = size;
|
||||||
ent->s.angles2[2] = 1;
|
ent->s.angles2[2] = 1;
|
||||||
|
|
||||||
|
if (ent->targetname)
|
||||||
|
ent->s.time2 = 1000;
|
||||||
|
else
|
||||||
ent->s.time2 = 10000;
|
ent->s.time2 = 10000;
|
||||||
|
|
||||||
trap_LinkEntity(ent);
|
trap_LinkEntity(ent);
|
||||||
|
|
||||||
|
if (ent->targetname)
|
||||||
|
{
|
||||||
|
ent->use = fire_use;
|
||||||
|
}
|
||||||
|
|
||||||
|
ent->count = !(ent->spawnflags & 1);
|
||||||
|
|
||||||
|
if (!ent->targetname || !(ent->spawnflags & 1) )
|
||||||
|
{
|
||||||
ent->think = fire_think;
|
ent->think = fire_think;
|
||||||
ent->nextthink = level.time + 1000;
|
ent->nextthink = level.time + 2000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ent->think = NULL;
|
||||||
|
ent->nextthink = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Additional ports from SP by Harry Young
|
// Additional ports from SP by Harry Young
|
||||||
|
@ -1130,9 +1213,11 @@ void SP_fx_cooking_steam( gentity_t *ent )
|
||||||
VectorCopy( ent->s.origin, ent->s.pos.trBase );
|
VectorCopy( ent->s.origin, ent->s.pos.trBase );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*QUAKED fx_elecfire (0 0 1) (-8 -8 -8) (8 8 8)
|
/*QUAKED fx_elecfire (0 0 1) (-8 -8 -8) (8 8 8) STARTOFF
|
||||||
Emits sparks at the specified point in the specified direction
|
Emits sparks at the specified point in the specified direction
|
||||||
Spawns smoke puffs.
|
Spawns smoke puffs.
|
||||||
|
|
||||||
|
"targetname" - toggles effect on/off whenver used
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
|
@ -1142,11 +1227,43 @@ void electric_fire_think( gentity_t *ent )
|
||||||
ent->nextthink = level.time + (750 + (random() * 300));
|
ent->nextthink = level.time + (750 + (random() * 300));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//------------------------------------------
|
||||||
|
void electric_fire_use( gentity_t *self, gentity_t *other, gentity_t *activator)
|
||||||
|
{
|
||||||
|
if ( self->count )
|
||||||
|
{
|
||||||
|
self->think = NULL;
|
||||||
|
self->nextthink = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self->think = electric_fire_think;
|
||||||
|
self->nextthink = level.time + 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
self->count = !self->count;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
void SP_fx_electricfire( gentity_t *ent )
|
void SP_fx_electricfire( gentity_t *ent )
|
||||||
{
|
{
|
||||||
ent->think = electric_fire_think;
|
if (ent->targetname)
|
||||||
|
{
|
||||||
|
ent->use = electric_fire_use;
|
||||||
|
}
|
||||||
|
|
||||||
|
ent->count = !(ent->spawnflags & 1);
|
||||||
|
|
||||||
|
if (!ent->targetname || !(ent->spawnflags & 1) )
|
||||||
|
{ent->think = electric_fire_think;
|
||||||
ent->nextthink = level.time + 500;
|
ent->nextthink = level.time + 500;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ent->think = NULL;
|
||||||
|
ent->nextthink = -1;
|
||||||
|
}
|
||||||
|
|
||||||
VectorCopy( ent->s.origin, ent->s.pos.trBase );
|
VectorCopy( ent->s.origin, ent->s.pos.trBase );
|
||||||
|
|
||||||
|
@ -1803,12 +1920,11 @@ Creates a shimmering cone or cylinder of colored light that stretches between tw
|
||||||
|
|
||||||
STARTOFF - Effect turns on when used.
|
STARTOFF - Effect turns on when used.
|
||||||
TAPER - Cylinder tapers toward the top, creating a conical effect
|
TAPER - Cylinder tapers toward the top, creating a conical effect
|
||||||
NO_AUTO_SHUTOFF - Tells the effect that it should never try to shut itself off.
|
|
||||||
|
|
||||||
"radius" - radius of the cylinder or of the base of the cone. (default 10)
|
"radius" - radius of the cylinder or of the base of the cone. (default 10)
|
||||||
"target" (required) End point for stream.
|
"target" (required) End point for stream.
|
||||||
"targetname" - fires only when used
|
"targetname" - fires only when used
|
||||||
"wait" - how long to stay on before turning itself off ( default 2 seconds, -1 to disable auto shut off )
|
"wait" - how long in ms to stay on before turning itself off ( default 2 seconds (200 ms), -1 to disable auto shut off )
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1817,7 +1933,7 @@ void shimmery_thing_think( gentity_t *ent )
|
||||||
{
|
{
|
||||||
G_AddEvent( ent, EV_FX_SHIMMERY_THING, 0 );
|
G_AddEvent( ent, EV_FX_SHIMMERY_THING, 0 );
|
||||||
if ( ent->wait >= 0 )
|
if ( ent->wait >= 0 )
|
||||||
ent->nextthink = level.time + ent->wait * 1000;
|
ent->nextthink = level.time + ent->wait;
|
||||||
else
|
else
|
||||||
ent->nextthink = -1;
|
ent->nextthink = -1;
|
||||||
}
|
}
|
||||||
|
@ -1827,7 +1943,7 @@ void shimmery_thing_use( gentity_t *self, gentity_t *other, gentity_t *activator
|
||||||
{
|
{
|
||||||
if ( self->count )
|
if ( self->count )
|
||||||
{
|
{
|
||||||
self->think = borg_energy_beam_think;
|
self->think = shimmery_thing_think;
|
||||||
self->nextthink = level.time + 200;
|
self->nextthink = level.time + 200;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1862,6 +1978,7 @@ void shimmery_thing_link( gentity_t *ent )
|
||||||
}
|
}
|
||||||
|
|
||||||
ent->count = !(ent->spawnflags & 1);
|
ent->count = !(ent->spawnflags & 1);
|
||||||
|
if (ent->spawnflags & 2) ent->s.angles[2] = 2;
|
||||||
|
|
||||||
if (!ent->targetname || !(ent->spawnflags & 1) )
|
if (!ent->targetname || !(ent->spawnflags & 1) )
|
||||||
{
|
{
|
||||||
|
@ -1883,14 +2000,14 @@ void shimmery_thing_link( gentity_t *ent )
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
void SP_fx_shimmery_thing( gentity_t *ent )
|
void SP_fx_shimmery_thing( gentity_t *ent )
|
||||||
{
|
{
|
||||||
G_SpawnFloat( "radius", "10", &ent->distance );
|
G_SpawnFloat( "radius", "10", &ent->s.angles[1] );
|
||||||
if ( !ent->wait )
|
if ( !ent->wait )
|
||||||
ent->wait = 2;
|
ent->wait = 2000;
|
||||||
|
if ( ent->spawnflags & 4 ) // backwards capability for sp, keep -1 in definitions for unity
|
||||||
|
ent->wait = -1;
|
||||||
|
|
||||||
// ent->svFlags |= SVF_BROADCAST;
|
// ent->svFlags |= SVF_BROADCAST;
|
||||||
|
|
||||||
VectorCopy( ent->s.origin, ent->s.pos.trBase );
|
|
||||||
|
|
||||||
ent->think = shimmery_thing_link;
|
ent->think = shimmery_thing_link;
|
||||||
ent->nextthink = level.time + 1000;
|
ent->nextthink = level.time + 1000;
|
||||||
|
|
||||||
|
|
BIN
maps/fxtest.bsp
Normal file
BIN
maps/fxtest.bsp
Normal file
Binary file not shown.
1128
maps/fxtest.map
Normal file
1128
maps/fxtest.map
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue