Added Stone Debris.

This commit is contained in:
q3rally 2011-06-21 22:21:46 +00:00
parent 652ce63a15
commit 1830e2817f
13 changed files with 53 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1023,6 +1023,21 @@ void CG_ShowDebris( vec3_t srcOrigin, int count, int evType ) {
else if (r == 14)
CG_LaunchFragment( origin, velocity, LETT_NONE, cgs.media.debrisglasslarge5 );
}
if ( evType == EV_EMIT_DEBRIS_STONE ) {
r = rand() % 5;
if (r == 0)
CG_LaunchFragment( origin, velocity, LETT_NONE, cgs.media.debrisstone1 );
else if (r == 1)
CG_LaunchFragment( origin, velocity, LETT_NONE, cgs.media.debrisstone2 );
else if (r == 2)
CG_LaunchFragment( origin, velocity, LETT_NONE, cgs.media.debrisstone3 );
else if (r == 3)
CG_LaunchFragment( origin, velocity, LETT_NONE, cgs.media.debrisstone4 );
else if (r == 4)
CG_LaunchFragment( origin, velocity, LETT_NONE, cgs.media.debrisstone5 );
}
}
}

View file

@ -1390,6 +1390,11 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
DEBUGNAME("EV_EMIT_DEBRIS_GLASS");
CG_ShowDebris( cent->lerpOrigin, es->eventParm, EV_EMIT_DEBRIS_GLASS );
break;
case EV_EMIT_DEBRIS_STONE:
DEBUGNAME("EV_EMIT_DEBRIS_STONE");
CG_ShowDebris( cent->lerpOrigin, es->eventParm, EV_EMIT_DEBRIS_STONE );
break;
case EV_EXPLOSION:
DEBUGNAME("EV_EXPLOSION");

View file

@ -938,6 +938,12 @@ typedef struct {
qhandle_t debrisglasslarge3;
qhandle_t debrisglasslarge4;
qhandle_t debrisglasslarge5;
qhandle_t debrisstone1;
qhandle_t debrisstone2;
qhandle_t debrisstone3;
qhandle_t debrisstone4;
qhandle_t debrisstone5;
// Q3Rally Code END

View file

@ -1229,6 +1229,12 @@ static void CG_RegisterGraphics( void ) {
cgs.media.debrisglasslarge3 = trap_R_RegisterModel( "models/debris/glass_3_large.md3" );
cgs.media.debrisglasslarge4 = trap_R_RegisterModel( "models/debris/glass_4_large.md3" );
cgs.media.debrisglasslarge5 = trap_R_RegisterModel( "models/debris/glass_5_large.md3" );
cgs.media.debrisstone1 = trap_R_RegisterModel( "models/debris/stone_1.md3" );
cgs.media.debrisstone2 = trap_R_RegisterModel( "models/debris/stone_2.md3" );
cgs.media.debrisstone3 = trap_R_RegisterModel( "models/debris/stone_3.md3" );
cgs.media.debrisstone4 = trap_R_RegisterModel( "models/debris/stone_4.md3" );
cgs.media.debrisstone5 = trap_R_RegisterModel( "models/debris/stone_5.md3" );
cgs.media.fireModel = trap_R_RegisterModel( "models/rearfire/flametrail.md3" );
cgs.media.turboModel = trap_R_RegisterModel( "models/powerups/turbo/turbocar.md3" );

View file

@ -625,7 +625,8 @@ typedef enum {
EV_EMIT_DEBRIS_WOOD, // emit wooden chunks
EV_EMIT_DEBRIS_FLESH, // emit gibs
EV_EMIT_DEBRIS_GLASS, // emite shards of glass
EV_EMIT_DEBRIS_STONE,
EV_EXPLOSION,
EV_PARTICLES_GRAVITY,
EV_PARTICLES_LINEAR,

View file

@ -740,6 +740,9 @@ int PickDebrisType( int spawnflags ) {
if ( spawnflags & 64 )
return EV_EMIT_DEBRIS_GLASS;
if ( spawnflags & 128 )
return EV_EMIT_DEBRIS_STONE;
//if no compatible spawnflags supplied, return EV_EMIT_DEBRIS_LIGHT
return EV_EMIT_DEBRIS_LIGHT;

View file

@ -861,9 +861,11 @@ q3rallycode
5=engine\code\cgame\cg_localents.c
6=engine\code\cgame\cg_effects.c
7=engine\code\cgame\cg_local.h
8=engine\code\cgame\cg_main.c
9=engine\code\game\g_utils.c
[Selected Project Files]
Main=
Selected=engine\code\cgame\cg_localents.c
Selected=engine\code\game\g_utils.c
[engine\code\game\g_mover.c]
TopLine=1817
Caret=21,1827
@ -871,11 +873,11 @@ Caret=21,1827
TopLine=959
Caret=14,959
[engine\code\cgame\cg_event.c]
TopLine=738
Caret=1,752
TopLine=1372
Caret=3,1397
[engine\code\game\bg_public.h]
TopLine=615
Caret=2,628
Caret=5,629
[engine\code\game\g_spawn.c]
TopLine=164
Caret=38,177
@ -883,8 +885,14 @@ Caret=38,177
TopLine=115
Caret=11,121
[engine\code\cgame\cg_effects.c]
TopLine=95
Caret=1,95
TopLine=1011
Caret=54,1027
[engine\code\cgame\cg_local.h]
TopLine=1763
Caret=1,1763
TopLine=926
Caret=24,943
[engine\code\cgame\cg_main.c]
TopLine=1217
Caret=84,1237
[engine\code\game\g_utils.c]
TopLine=729
Caret=32,745