mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-25 05:11:00 +00:00
Several Changes. New type of breakables.
This commit is contained in:
parent
c7c9efeccf
commit
4403389e04
3 changed files with 12 additions and 56 deletions
|
@ -1027,56 +1027,6 @@ void CG_ShowDebris( vec3_t srcOrigin, int count, int evType ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
===================
|
|
||||||
CG_StartEarthquake
|
|
||||||
|
|
||||||
Starts an earthquake effect
|
|
||||||
===================
|
|
||||||
*/
|
|
||||||
int flagEarthquake = qfalse;
|
|
||||||
int earthquakeIntensity = 0;
|
|
||||||
int earthquakeStoptime = 0;
|
|
||||||
|
|
||||||
void CG_StartEarthquake(int intensity, int duration)
|
|
||||||
{
|
|
||||||
flagEarthquake = qtrue;
|
|
||||||
if ( intensity < earthquakeIntensity )
|
|
||||||
return;
|
|
||||||
|
|
||||||
earthquakeIntensity = intensity;
|
|
||||||
earthquakeStoptime = cg.time + duration;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CG_Earthquake()
|
|
||||||
{
|
|
||||||
static float terremotoX, terremotoY, terremotoZ;
|
|
||||||
static terremotoTime = 0;
|
|
||||||
float realInt;
|
|
||||||
|
|
||||||
if ( !flagEarthquake )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( earthquakeStoptime < cg.time )
|
|
||||||
{
|
|
||||||
flagEarthquake = qfalse;
|
|
||||||
earthquakeIntensity = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( terremotoTime < cg.time )
|
|
||||||
{
|
|
||||||
terremotoTime = cg.time += 50;
|
|
||||||
realInt = ((float)earthquakeIntensity + 1.0) / 2.0;
|
|
||||||
terremotoX = random() * realInt - realInt / 2;
|
|
||||||
terremotoY = random() * realInt - realInt / 2;
|
|
||||||
terremotoZ = random() * realInt - realInt / 2;
|
|
||||||
}
|
|
||||||
cg.refdefViewAngles[0] += terremotoX;
|
|
||||||
cg.refdefViewAngles[1] += terremotoY;
|
|
||||||
cg.refdefViewAngles[2] += terremotoZ;
|
|
||||||
AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===================
|
===================
|
||||||
|
|
|
@ -338,6 +338,14 @@ typedef enum {
|
||||||
LETT_DEBRIS_CONCRETE, // emits a (gray) smoke trail
|
LETT_DEBRIS_CONCRETE, // emits a (gray) smoke trail
|
||||||
LETT_DEBRIS_WOOD // emits a (brown) dust trail
|
LETT_DEBRIS_WOOD // emits a (brown) dust trail
|
||||||
} leTrailType_t; // defines bounce behavior and trail on fragment local entities
|
} leTrailType_t; // defines bounce behavior and trail on fragment local entities
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
PT_GRAVITY,
|
||||||
|
PT_LINEAR_UP,
|
||||||
|
PT_LINEAR_DOWN,
|
||||||
|
PT_LINEAR_BOTH
|
||||||
|
} particleType_t;
|
||||||
|
|
||||||
typedef struct localEntity_s {
|
typedef struct localEntity_s {
|
||||||
struct localEntity_s *prev, *next;
|
struct localEntity_s *prev, *next;
|
||||||
leType_t leType;
|
leType_t leType;
|
||||||
|
@ -361,8 +369,9 @@ typedef struct localEntity_s {
|
||||||
float light;
|
float light;
|
||||||
vec3_t lightColor;
|
vec3_t lightColor;
|
||||||
|
|
||||||
leMarkType_t leMarkType; // mark to leave on fragment impact
|
leMarkType_t leMarkType; // mark to leave on fragment impact
|
||||||
leBounceSoundType_t leBounceSoundType;
|
leBounceSoundType_t leBounceSoundType; // sound to play on fragment impact
|
||||||
|
leTrailType_t leTrailType; // trail to show behind fragment
|
||||||
|
|
||||||
refEntity_t refEntity;
|
refEntity_t refEntity;
|
||||||
} localEntity_t;
|
} localEntity_t;
|
||||||
|
|
|
@ -930,9 +930,6 @@ static void CG_RegisterSounds( void ) {
|
||||||
cgs.media.protectSound = trap_S_RegisterSound("sound/items/protect3.wav", qfalse);
|
cgs.media.protectSound = trap_S_RegisterSound("sound/items/protect3.wav", qfalse);
|
||||||
// Q3Rally Code Start: use proper sound
|
// Q3Rally Code Start: use proper sound
|
||||||
cgs.media.shieldSound = trap_S_RegisterSound("sound/weapons/machinegun/ric3.wav", qfalse);
|
cgs.media.shieldSound = trap_S_RegisterSound("sound/weapons/machinegun/ric3.wav", qfalse);
|
||||||
cgs.media.glassSound = trap_S_RegisterSound("sound/breakable/glass.wav", qfalse);
|
|
||||||
cgs.media.woodSound = trap_S_RegisterSound("sound/breakable/wood.wav", qfalse);
|
|
||||||
cgs.media.metalSound = trap_S_RegisterSound("sound/breakable/metal.wav", qfalse);
|
|
||||||
// Q3Rally Code END
|
// Q3Rally Code END
|
||||||
cgs.media.n_healthSound = trap_S_RegisterSound("sound/items/n_health.wav", qfalse );
|
cgs.media.n_healthSound = trap_S_RegisterSound("sound/items/n_health.wav", qfalse );
|
||||||
cgs.media.hgrenb1aSound = trap_S_RegisterSound("sound/weapons/grenade/hgrenb1a.wav", qfalse);
|
cgs.media.hgrenb1aSound = trap_S_RegisterSound("sound/weapons/grenade/hgrenb1a.wav", qfalse);
|
||||||
|
|
Loading…
Reference in a new issue