Hey look, breakables explode now! :)

This commit is contained in:
Scott Brooks 2002-04-22 16:43:34 +00:00
parent d3356b10c9
commit 835d69d44d
4 changed files with 36 additions and 95 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.61 2002/04/22 16:43:34 blaze
// Hey look, breakables explode now! :)
//
// Revision 1.60 2002/04/20 23:54:55 blaze // Revision 1.60 2002/04/20 23:54:55 blaze
// opps, breabable fix // opps, breabable fix
// //
@ -1480,7 +1483,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
{ {
targ->health -= damage; targ->health -= damage;
} }
G_BreakGlass( targ, inflictor, attacker, point, mod, damage ); if (targ->exploded == qfalse) G_BreakGlass( targ, inflictor, attacker, point, mod, damage );
return; return;
} }

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.69 2002/04/22 16:43:34 blaze
// Hey look, breakables explode now! :)
//
// Revision 1.68 2002/04/22 02:27:57 jbravo // Revision 1.68 2002/04/22 02:27:57 jbravo
// Dynamic model recognition // Dynamic model recognition
// //
@ -277,6 +280,8 @@ struct gentity_s {
qboolean unbreakable; qboolean unbreakable;
//true if it's explosive //true if it's explosive
qboolean explosive; qboolean explosive;
//True if it's already been exploded
qboolean exploded;
qboolean takedamage; qboolean takedamage;
int damage; int damage;

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.31 2002/04/22 16:43:34 blaze
// Hey look, breakables explode now! :)
//
// Revision 1.30 2002/04/20 23:54:55 blaze // Revision 1.30 2002/04/20 23:54:55 blaze
// opps, breabable fix // opps, breabable fix
// //
@ -444,6 +447,7 @@ void func_breakable_explode( gentity_t *self , vec3_t pos ) {
self->s.eType = ET_INVISIBLE; self->s.eType = ET_INVISIBLE;
self->r.contents = 0; self->r.contents = 0;
self->s.solid = 0; self->s.solid = 0;
self->exploded = qtrue;
} }
// Blaze: adding for func_breakable explosions // Blaze: adding for func_breakable explosions
@ -451,10 +455,9 @@ void func_breakable_explode( gentity_t *self , vec3_t pos ) {
void func_breakable_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int meansOfDeath ) void func_breakable_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int meansOfDeath )
{ {
G_RadiusDamage(self->s.origin,attacker,self->damage,self->damage_radius,self, meansOfDeath);
func_breakable_explode( self , self->s.origin ); func_breakable_explode( self , self->s.origin );
G_ExplodeMissile(self); G_ExplodeMissile(self);
G_RadiusDamage(self->s.origin,attacker,self->damage,self->damage_radius,self, meansOfDeath);
// radius damage // radius damage
} }
@ -518,7 +521,7 @@ void SP_func_breakable( gentity_t *ent ) {
ent->damage_radius = damage_radius; ent->damage_radius = damage_radius;
ent->exploded = qfalse;
// Setup amount type // Setup amount type
G_SpawnInt( "amount", "0", &temp ); G_SpawnInt( "amount", "0", &temp );
@ -642,6 +645,7 @@ void G_BreakGlass( gentity_t *ent, gentity_t *inflictor, gentity_t *attacker, ve
//while we process it on the server-side. //while we process it on the server-side.
//Places to stuff: eventParm //Places to stuff: eventParm
eParm = ent->s.eventParm; eParm = ent->s.eventParm;
if( ent->health <= 0 ) { if( ent->health <= 0 ) {
//G_Printf("Original eParm: %i \n", ent->s.eventParm); //G_Printf("Original eParm: %i \n", ent->s.eventParm);
//Copy the first four bits and strip them out of the original //Copy the first four bits and strip them out of the original
@ -685,9 +689,10 @@ void G_BreakGlass( gentity_t *ent, gentity_t *inflictor, gentity_t *attacker, ve
break; break;
} }
if (ent->explosive && strcmp(g_entities[ENTITYNUM_WORLD].classname,"worldspawn")) if (ent->explosive)
{ {
mod = MOD_TRIGGER_HURT; mod = MOD_TRIGGER_HURT;
func_breakable_die(ent, inflictor, attacker, damage, mod); func_breakable_die(ent, inflictor, attacker, damage, mod);
} }
//G_FreeEntity( ent ); //G_FreeEntity( ent );

View file

@ -3,56 +3,18 @@
<pre> <pre>
<h1>Build Log</h1> <h1>Build Log</h1>
<h3> <h3>
--------------------Configuration: game - Win32 Release-------------------- --------------------Configuration: game - Win32 Debug--------------------
</h3> </h3>
<h3>Command Lines</h3> <h3>Command Lines</h3>
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP160E.tmp" with contents Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB32.tmp" with contents
[ [
/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "BUILDING_REF_GL" /D "DEBUG" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c
"C:\Games\Quake3\rq3source\reaction\game\ai_chat.c" "C:\Development\reaction\game\g_misc.c"
"C:\Games\Quake3\rq3source\reaction\game\ai_cmd.c"
"C:\Games\Quake3\rq3source\reaction\game\ai_dmnet.c"
"C:\Games\Quake3\rq3source\reaction\game\ai_dmq3.c"
"C:\Games\Quake3\rq3source\reaction\game\ai_main.c"
"C:\Games\Quake3\rq3source\reaction\game\ai_team.c"
"C:\Games\Quake3\rq3source\reaction\game\ai_vcmd.c"
"C:\Games\Quake3\rq3source\reaction\game\bg_misc.c"
"C:\Games\Quake3\rq3source\reaction\game\bg_pmove.c"
"C:\Games\Quake3\rq3source\reaction\game\bg_slidemove.c"
"C:\Games\Quake3\rq3source\reaction\game\g_active.c"
"C:\Games\Quake3\rq3source\reaction\game\g_arenas.c"
"C:\Games\Quake3\rq3source\reaction\game\g_bot.c"
"C:\Games\Quake3\rq3source\reaction\game\g_client.c"
"C:\Games\Quake3\rq3source\reaction\game\g_cmds.c"
"C:\Games\Quake3\rq3source\reaction\game\g_combat.c"
"C:\Games\Quake3\rq3source\reaction\game\g_fileio.c"
"C:\Games\Quake3\rq3source\reaction\game\g_items.c"
"C:\Games\Quake3\rq3source\reaction\game\g_main.c"
"C:\Games\Quake3\rq3source\reaction\game\g_matchmode.c"
"C:\Games\Quake3\rq3source\reaction\game\g_mem.c"
"C:\Games\Quake3\rq3source\reaction\game\g_misc.c"
"C:\Games\Quake3\rq3source\reaction\game\g_missile.c"
"C:\Games\Quake3\rq3source\reaction\game\g_mover.c"
"C:\Games\Quake3\rq3source\reaction\game\g_session.c"
"C:\Games\Quake3\rq3source\reaction\game\g_spawn.c"
"C:\Games\Quake3\rq3source\reaction\game\g_svcmds.c"
"C:\Games\Quake3\rq3source\reaction\game\g_syscalls.c"
"C:\Games\Quake3\rq3source\reaction\game\g_target.c"
"C:\Games\Quake3\rq3source\reaction\game\g_team.c"
"C:\Games\Quake3\rq3source\reaction\game\g_teamplay.c"
"C:\Games\Quake3\rq3source\reaction\game\g_trigger.c"
"C:\Games\Quake3\rq3source\reaction\game\g_utils.c"
"C:\Games\Quake3\rq3source\reaction\game\g_weapon.c"
"C:\Games\Quake3\rq3source\reaction\game\q_math.c"
"C:\Games\Quake3\rq3source\reaction\game\q_shared.c"
"C:\Games\Quake3\rq3source\reaction\game\rxn_game.c"
"C:\Games\Quake3\rq3source\reaction\game\zcam.c"
"C:\Games\Quake3\rq3source\reaction\game\zcam_target.c"
] ]
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP160E.tmp" Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB32.tmp"
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP160F.tmp" with contents Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB33.tmp" with contents
[ [
kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /machine:I386 /def:".\game.def" /out:"..\Release/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib" kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:yes /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /debug /machine:I386 /def:".\game.def" /out:"..\Debug/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib"
\reactionoutput\ai_chat.obj \reactionoutput\ai_chat.obj
\reactionoutput\ai_cmd.obj \reactionoutput\ai_cmd.obj
\reactionoutput\ai_dmnet.obj \reactionoutput\ai_dmnet.obj
@ -93,56 +55,22 @@ kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows
\reactionoutput\zcam.obj \reactionoutput\zcam.obj
\reactionoutput\zcam_target.obj \reactionoutput\zcam_target.obj
] ]
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP160F.tmp" Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB33.tmp"
<h3>Output Window</h3> <h3>Output Window</h3>
Compiling... Compiling...
ai_chat.c
ai_cmd.c
ai_dmnet.c
ai_dmq3.c
ai_main.c
ai_team.c
ai_vcmd.c
bg_misc.c
bg_pmove.c
bg_slidemove.c
g_active.c
g_arenas.c
g_bot.c
g_client.c
g_cmds.c
g_combat.c
g_fileio.c
g_items.c
g_main.c
g_matchmode.c
g_mem.c
g_misc.c g_misc.c
g_missile.c C:\Development\reaction\game\g_misc.c(691) : error C2107: illegal index, indirection not allowed
g_mover.c C:\Development\reaction\game\g_misc.c(691) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'char ** '
g_session.c C:\Development\reaction\game\g_misc.c(691) : warning C4024: 'strcmp' : different types for formal and actual parameter 1
g_spawn.c C:\Development\reaction\game\g_misc.c(692) : error C2107: illegal index, indirection not allowed
g_svcmds.c C:\Development\reaction\game\g_misc.c(692) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'char ** '
g_syscalls.c C:\Development\reaction\game\g_misc.c(692) : warning C4024: 'strcmp' : different types for formal and actual parameter 1
g_target.c Error executing cl.exe.
g_team.c
g_teamplay.c
g_trigger.c
g_utils.c
g_weapon.c
q_math.c
C:\Games\Quake3\rq3source\reaction\game\g_weapon.c(2558) : warning C4701: local variable 'tr' may be used without having been initialized
q_shared.c
rxn_game.c
zcam.c
zcam_target.c
Linking...
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
<h3>Results</h3> <h3>Results</h3>
qagamex86.dll - 0 error(s), 1 warning(s) qagamex86.dll - 2 error(s), 4 warning(s)
</pre> </pre>
</body> </body>
</html> </html>