mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-28 14:42:33 +00:00
Added Stone Debris.
This commit is contained in:
parent
652ce63a15
commit
1830e2817f
13 changed files with 53 additions and 9 deletions
BIN
baseq3r/models/debris/debris_stone.jpg
Normal file
BIN
baseq3r/models/debris/debris_stone.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 94 KiB |
BIN
baseq3r/models/debris/stone_1.md3
Normal file
BIN
baseq3r/models/debris/stone_1.md3
Normal file
Binary file not shown.
BIN
baseq3r/models/debris/stone_2.md3
Normal file
BIN
baseq3r/models/debris/stone_2.md3
Normal file
Binary file not shown.
BIN
baseq3r/models/debris/stone_3.md3
Normal file
BIN
baseq3r/models/debris/stone_3.md3
Normal file
Binary file not shown.
BIN
baseq3r/models/debris/stone_4.md3
Normal file
BIN
baseq3r/models/debris/stone_4.md3
Normal file
Binary file not shown.
BIN
baseq3r/models/debris/stone_5.md3
Normal file
BIN
baseq3r/models/debris/stone_5.md3
Normal file
Binary file not shown.
|
@ -1023,6 +1023,21 @@ void CG_ShowDebris( vec3_t srcOrigin, int count, int evType ) {
|
||||||
else if (r == 14)
|
else if (r == 14)
|
||||||
CG_LaunchFragment( origin, velocity, LETT_NONE, cgs.media.debrisglasslarge5 );
|
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 );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1390,6 +1390,11 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||||
DEBUGNAME("EV_EMIT_DEBRIS_GLASS");
|
DEBUGNAME("EV_EMIT_DEBRIS_GLASS");
|
||||||
CG_ShowDebris( cent->lerpOrigin, es->eventParm, EV_EMIT_DEBRIS_GLASS );
|
CG_ShowDebris( cent->lerpOrigin, es->eventParm, EV_EMIT_DEBRIS_GLASS );
|
||||||
break;
|
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:
|
case EV_EXPLOSION:
|
||||||
DEBUGNAME("EV_EXPLOSION");
|
DEBUGNAME("EV_EXPLOSION");
|
||||||
|
|
|
@ -938,6 +938,12 @@ typedef struct {
|
||||||
qhandle_t debrisglasslarge3;
|
qhandle_t debrisglasslarge3;
|
||||||
qhandle_t debrisglasslarge4;
|
qhandle_t debrisglasslarge4;
|
||||||
qhandle_t debrisglasslarge5;
|
qhandle_t debrisglasslarge5;
|
||||||
|
|
||||||
|
qhandle_t debrisstone1;
|
||||||
|
qhandle_t debrisstone2;
|
||||||
|
qhandle_t debrisstone3;
|
||||||
|
qhandle_t debrisstone4;
|
||||||
|
qhandle_t debrisstone5;
|
||||||
|
|
||||||
// Q3Rally Code END
|
// Q3Rally Code END
|
||||||
|
|
||||||
|
|
|
@ -1229,6 +1229,12 @@ static void CG_RegisterGraphics( void ) {
|
||||||
cgs.media.debrisglasslarge3 = trap_R_RegisterModel( "models/debris/glass_3_large.md3" );
|
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.debrisglasslarge4 = trap_R_RegisterModel( "models/debris/glass_4_large.md3" );
|
||||||
cgs.media.debrisglasslarge5 = trap_R_RegisterModel( "models/debris/glass_5_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.fireModel = trap_R_RegisterModel( "models/rearfire/flametrail.md3" );
|
||||||
cgs.media.turboModel = trap_R_RegisterModel( "models/powerups/turbo/turbocar.md3" );
|
cgs.media.turboModel = trap_R_RegisterModel( "models/powerups/turbo/turbocar.md3" );
|
||||||
|
|
|
@ -625,7 +625,8 @@ typedef enum {
|
||||||
EV_EMIT_DEBRIS_WOOD, // emit wooden chunks
|
EV_EMIT_DEBRIS_WOOD, // emit wooden chunks
|
||||||
EV_EMIT_DEBRIS_FLESH, // emit gibs
|
EV_EMIT_DEBRIS_FLESH, // emit gibs
|
||||||
EV_EMIT_DEBRIS_GLASS, // emite shards of glass
|
EV_EMIT_DEBRIS_GLASS, // emite shards of glass
|
||||||
|
EV_EMIT_DEBRIS_STONE,
|
||||||
|
|
||||||
EV_EXPLOSION,
|
EV_EXPLOSION,
|
||||||
EV_PARTICLES_GRAVITY,
|
EV_PARTICLES_GRAVITY,
|
||||||
EV_PARTICLES_LINEAR,
|
EV_PARTICLES_LINEAR,
|
||||||
|
|
|
@ -740,6 +740,9 @@ int PickDebrisType( int spawnflags ) {
|
||||||
|
|
||||||
if ( spawnflags & 64 )
|
if ( spawnflags & 64 )
|
||||||
return EV_EMIT_DEBRIS_GLASS;
|
return EV_EMIT_DEBRIS_GLASS;
|
||||||
|
|
||||||
|
if ( spawnflags & 128 )
|
||||||
|
return EV_EMIT_DEBRIS_STONE;
|
||||||
|
|
||||||
//if no compatible spawnflags supplied, return EV_EMIT_DEBRIS_LIGHT
|
//if no compatible spawnflags supplied, return EV_EMIT_DEBRIS_LIGHT
|
||||||
return EV_EMIT_DEBRIS_LIGHT;
|
return EV_EMIT_DEBRIS_LIGHT;
|
||||||
|
|
|
@ -861,9 +861,11 @@ q3rallycode
|
||||||
5=engine\code\cgame\cg_localents.c
|
5=engine\code\cgame\cg_localents.c
|
||||||
6=engine\code\cgame\cg_effects.c
|
6=engine\code\cgame\cg_effects.c
|
||||||
7=engine\code\cgame\cg_local.h
|
7=engine\code\cgame\cg_local.h
|
||||||
|
8=engine\code\cgame\cg_main.c
|
||||||
|
9=engine\code\game\g_utils.c
|
||||||
[Selected Project Files]
|
[Selected Project Files]
|
||||||
Main=
|
Main=
|
||||||
Selected=engine\code\cgame\cg_localents.c
|
Selected=engine\code\game\g_utils.c
|
||||||
[engine\code\game\g_mover.c]
|
[engine\code\game\g_mover.c]
|
||||||
TopLine=1817
|
TopLine=1817
|
||||||
Caret=21,1827
|
Caret=21,1827
|
||||||
|
@ -871,11 +873,11 @@ Caret=21,1827
|
||||||
TopLine=959
|
TopLine=959
|
||||||
Caret=14,959
|
Caret=14,959
|
||||||
[engine\code\cgame\cg_event.c]
|
[engine\code\cgame\cg_event.c]
|
||||||
TopLine=738
|
TopLine=1372
|
||||||
Caret=1,752
|
Caret=3,1397
|
||||||
[engine\code\game\bg_public.h]
|
[engine\code\game\bg_public.h]
|
||||||
TopLine=615
|
TopLine=615
|
||||||
Caret=2,628
|
Caret=5,629
|
||||||
[engine\code\game\g_spawn.c]
|
[engine\code\game\g_spawn.c]
|
||||||
TopLine=164
|
TopLine=164
|
||||||
Caret=38,177
|
Caret=38,177
|
||||||
|
@ -883,8 +885,14 @@ Caret=38,177
|
||||||
TopLine=115
|
TopLine=115
|
||||||
Caret=11,121
|
Caret=11,121
|
||||||
[engine\code\cgame\cg_effects.c]
|
[engine\code\cgame\cg_effects.c]
|
||||||
TopLine=95
|
TopLine=1011
|
||||||
Caret=1,95
|
Caret=54,1027
|
||||||
[engine\code\cgame\cg_local.h]
|
[engine\code\cgame\cg_local.h]
|
||||||
TopLine=1763
|
TopLine=926
|
||||||
Caret=1,1763
|
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
|
||||||
|
|
Loading…
Reference in a new issue