New surfaceparm system

This commit is contained in:
Andrei Drexler 2002-04-06 21:43:59 +00:00
parent 90c7e3b74f
commit 79a3d2e914
5 changed files with 95 additions and 71 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.34 2002/04/06 21:43:58 makro
// New surfaceparm system
//
// Revision 1.33 2002/03/31 03:31:24 jbravo // Revision 1.33 2002/03/31 03:31:24 jbravo
// Compiler warning cleanups // Compiler warning cleanups
// //
@ -2203,7 +2206,8 @@ static void CG_DrawCrosshair(void) {
!(cg.snap->ps.stats[STAT_RQ3] & RQ3_FASTRELOADS) && !(cg.snap->ps.stats[STAT_RQ3] & RQ3_FASTRELOADS) &&
!(cg.snap->ps.stats[STAT_RQ3] & RQ3_LOCKRELOADS) { !(cg.snap->ps.stats[STAT_RQ3] & RQ3_LOCKRELOADS) {
*/ */
int zoomMag; //Makro - wasn't initialized, caused a warning in MSVC
int zoomMag = 0;
x = SCREEN_WIDTH / 2; x = SCREEN_WIDTH / 2;
y = SCREEN_HEIGHT / 2; y = SCREEN_HEIGHT / 2;

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.26 2002/04/06 21:43:58 makro
// New surfaceparm system
//
// Revision 1.25 2002/04/03 15:51:01 jbravo // Revision 1.25 2002/04/03 15:51:01 jbravo
// Small warning fixes // Small warning fixes
// //
@ -1064,7 +1067,7 @@ void CG_BreakGlass( vec3_t playerOrigin, int glassParm, int number, int type, in
glassParm = glassParm >> 6; glassParm = glassParm >> 6;
sound = cgs.media.breakables[id].sound[rand() % 3]; sound = cgs.media.breakables[id].sound[rand() % 3];
trap_S_StartSound( NULL, number, CHAN_BODY, sound ); trap_S_StartSound( NULL, number, CHAN_BODY, sound );
bounceFactor = 0.3; bounceFactor = (float) 0.3;
if ( (glassParm & RQ3_DEBRIS_MEDIUM) == RQ3_DEBRIS_MEDIUM && if ( (glassParm & RQ3_DEBRIS_MEDIUM) == RQ3_DEBRIS_MEDIUM &&
(glassParm & RQ3_DEBRIS_HIGH) == RQ3_DEBRIS_HIGH) (glassParm & RQ3_DEBRIS_HIGH) == RQ3_DEBRIS_HIGH)

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.49 2002/04/06 21:43:58 makro
// New surfaceparm system
//
// Revision 1.48 2002/04/03 03:13:48 blaze // Revision 1.48 2002/04/03 03:13:48 blaze
// NEW BREAKABLE CODE - will break all old breakables(wont appear in maps) // NEW BREAKABLE CODE - will break all old breakables(wont appear in maps)
// //
@ -489,7 +492,7 @@ static void CG_Obituary_Head( entityState_t *ent ) {
char *message, *message2; char *message, *message2;
const char *targetInfo, *attackerInfo; const char *targetInfo, *attackerInfo;
char targetName[32], attackerName[32]; char targetName[32], attackerName[32];
gender_t gender; gender_t gender = GENDER_MALE;
clientInfo_t *ci; clientInfo_t *ci;
target = ent->otherEntityNum; target = ent->otherEntityNum;
@ -884,7 +887,8 @@ static void CG_Obituary_Stomach( entityState_t *ent ) {
char *message, *message2; char *message, *message2;
const char *targetInfo, *attackerInfo; const char *targetInfo, *attackerInfo;
char targetName[32], attackerName[32]; char targetName[32], attackerName[32];
gender_t gender; //Makro - wasn't initialized, caused a warning in MSVC
gender_t gender = GENDER_MALE;
clientInfo_t *ci; clientInfo_t *ci;
target = ent->otherEntityNum; target = ent->otherEntityNum;
@ -1081,7 +1085,8 @@ static void CG_Obituary_Legs( entityState_t *ent ) {
const char *attackerInfo; const char *attackerInfo;
char targetName[32]; char targetName[32];
char attackerName[32]; char attackerName[32];
gender_t gender; //Makro - wasn't initialized, caused a warning in MSVC
gender_t gender = GENDER_MALE;
clientInfo_t *ci; clientInfo_t *ci;
target = ent->otherEntityNum; target = ent->otherEntityNum;
@ -2023,7 +2028,9 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
//Elder: removed //Elder: removed
if( es->eventParm & SURF_FLESH ) { if( es->eventParm & SURF_FLESH ) {
//trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.wstbimplSound ); //trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.wstbimplSound );
} else if( es->eventParm & SURF_METALSTEPS ) { //Makro - new surfaceparm system
//} else if( es->eventParm & SURF_METALSTEPS ) {
} else if( IsMetalFlag(es->eventParm) ) {
//trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.wstbimpmSound ); //trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.wstbimpmSound );
} else { } else {
//trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.wstbimpdSound ); //trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.wstbimpdSound );

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.65 2002/04/06 21:43:59 makro
// New surfaceparm system
//
// Revision 1.64 2002/04/05 18:53:26 jbravo // Revision 1.64 2002/04/05 18:53:26 jbravo
// Warning fixes // Warning fixes
// //
@ -76,7 +79,6 @@
#include "cg_local.h" #include "cg_local.h"
/* /*
========================== ==========================
CG_ParseWeaponSoundFile CG_ParseWeaponSoundFile
@ -1589,8 +1591,11 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
//CG_LightningBolt( nonPredictedCent, parent->lightingOrigin ); //CG_LightningBolt( nonPredictedCent, parent->lightingOrigin );
if ( ps && bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag == HI_SILENCER && if ( ps && bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag == HI_SILENCER &&
( weaponNum == WP_PISTOL || weaponNum == WP_MP5 || weaponNum == WP_SSG3000) ) { ( weaponNum == WP_PISTOL || weaponNum == WP_MP5 || weaponNum == WP_SSG3000) ) {
float scale; //Makro - wasn't initialized, caused a warning in MSVC
vec3_t angles, Offset; float scale = (float) 0.5;
vec3_t angles;
//Makro - wasn't initialized, caused a warning in MSVC
vec3_t Offset = {0, 0, 0};
if (weaponNum == WP_PISTOL) scale = (float)0.6; if (weaponNum == WP_PISTOL) scale = (float)0.6;
if (weaponNum == WP_SSG3000) scale = (float)0.9; if (weaponNum == WP_SSG3000) scale = (float)0.9;
@ -3506,6 +3511,8 @@ static void CG_ShotgunPellet( vec3_t start, vec3_t end, int skipNum, int shellWe
trace_t tr; trace_t tr;
vec3_t viewDir; vec3_t viewDir;
int sourceContentType, destContentType; int sourceContentType, destContentType;
//Makro
int Material;
CG_Trace( &tr, start, NULL, NULL, end, skipNum, MASK_SHOT ); CG_Trace( &tr, start, NULL, NULL, end, skipNum, MASK_SHOT );
@ -3550,7 +3557,10 @@ static void CG_ShotgunPellet( vec3_t start, vec3_t end, int skipNum, int shellWe
// SURF_NOIMPACT will not make a flame puff or a mark // SURF_NOIMPACT will not make a flame puff or a mark
return; return;
} }
if ( (tr.surfaceFlags & SURF_METALSTEPS) || (tr.surfaceFlags & SURF_METAL2) ) //Makro - new surfaceparm system
Material = GetMaterialFromFlag(tr.surfaceFlags);
//if ( (tr.surfaceFlags & SURF_METALSTEPS) || (tr.surfaceFlags & SURF_METAL2) )
if ( IsMetalMat(Material) )
{ {
//Blaze: Changed WP_SHOTGUN to WP_M3 //Blaze: Changed WP_SHOTGUN to WP_M3
if (shellWeapon == WP_M3) if (shellWeapon == WP_M3)
@ -3561,7 +3571,8 @@ static void CG_ShotgunPellet( vec3_t start, vec3_t end, int skipNum, int shellWe
CG_MissileHitWall( WP_HANDCANNON, 0, tr.endpos, tr.plane.normal, viewDir, IMPACTSOUND_METAL, 0 ); CG_MissileHitWall( WP_HANDCANNON, 0, tr.endpos, tr.plane.normal, viewDir, IMPACTSOUND_METAL, 0 );
} }
} }
else if ( tr.surfaceFlags & SURF_GLASS ) //else if ( tr.surfaceFlags & SURF_GLASS )
else if ( Material == MAT_GLASS )
{ {
//Blaze: Changed WP_SHOTGUN to WP_M3 //Blaze: Changed WP_SHOTGUN to WP_M3
if (shellWeapon == WP_M3) if (shellWeapon == WP_M3)

View file

@ -3,69 +3,69 @@
<pre> <pre>
<h1>Build Log</h1> <h1>Build Log</h1>
<h3> <h3>
--------------------Configuration: cgame - Win32 Debug-------------------- --------------------Configuration: cgame - Win32 Release--------------------
</h3> </h3>
<h3>Command Lines</h3> <h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPBB.tmp" with contents Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPD9E.tmp" with contents
[ [
/nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"Debug/" /Fp"Debug/cgame.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /c /nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"Release/cgame.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
"C:\Development\reaction\game\bg_misc.c" "C:\Games\Quake3\rq3source\reaction\game\bg_misc.c"
"C:\Development\reaction\game\bg_pmove.c" "C:\Games\Quake3\rq3source\reaction\game\bg_pmove.c"
"C:\Development\reaction\game\bg_slidemove.c" "C:\Games\Quake3\rq3source\reaction\game\bg_slidemove.c"
"C:\Development\reaction\cgame\cg_consolecmds.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_consolecmds.c"
"C:\Development\reaction\cgame\cg_draw.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_draw.c"
"C:\Development\reaction\cgame\cg_drawtools.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_drawtools.c"
"C:\Development\reaction\cgame\cg_effects.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_effects.c"
"C:\Development\reaction\cgame\cg_ents.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_ents.c"
"C:\Development\reaction\cgame\cg_event.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_event.c"
"C:\Development\reaction\cgame\cg_info.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_info.c"
"C:\Development\reaction\cgame\cg_localents.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_localents.c"
"C:\Development\reaction\cgame\cg_main.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_main.c"
"C:\Development\reaction\cgame\cg_marks.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_marks.c"
"C:\Development\reaction\cgame\cg_players.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_players.c"
"C:\Development\reaction\cgame\cg_playerstate.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_playerstate.c"
"C:\Development\reaction\cgame\cg_predict.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_predict.c"
"C:\Development\reaction\cgame\cg_scoreboard.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_scoreboard.c"
"C:\Development\reaction\cgame\cg_servercmds.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_servercmds.c"
"C:\Development\reaction\cgame\cg_snapshot.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_snapshot.c"
"C:\Development\reaction\cgame\cg_syscalls.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_syscalls.c"
"C:\Development\reaction\cgame\cg_view.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_view.c"
"C:\Development\reaction\cgame\cg_weapons.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_weapons.c"
"C:\Development\reaction\game\q_math.c" "C:\Games\Quake3\rq3source\reaction\game\q_math.c"
"C:\Development\reaction\game\q_shared.c" "C:\Games\Quake3\rq3source\reaction\game\q_shared.c"
"C:\Development\reaction\ui\ui_shared.c" "C:\Games\Quake3\rq3source\reaction\ui\ui_shared.c"
] ]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPBB.tmp" Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPD9E.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPBC.tmp" with contents Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPD9F.tmp" with contents
[ [
/nologo /base:"0x30000000" /subsystem:windows /dll /incremental:yes /pdb:"Debug/cgamex86.pdb" /map:"Debug/cgamex86.map" /debug /machine:I386 /def:".\cgame.def" /out:"../Debug/cgamex86.dll" /implib:"Debug/cgamex86.lib" /nologo /base:"0x30000000" /subsystem:windows /dll /incremental:no /pdb:"Release/cgamex86.pdb" /map:"Release/cgamex86.map" /machine:I386 /def:".\cgame.def" /out:"../Release/cgamex86.dll" /implib:"Release/cgamex86.lib"
.\Debug\bg_misc.obj .\Release\bg_misc.obj
.\Debug\bg_pmove.obj .\Release\bg_pmove.obj
.\Debug\bg_slidemove.obj .\Release\bg_slidemove.obj
.\Debug\cg_consolecmds.obj .\Release\cg_consolecmds.obj
.\Debug\cg_draw.obj .\Release\cg_draw.obj
.\Debug\cg_drawtools.obj .\Release\cg_drawtools.obj
.\Debug\cg_effects.obj .\Release\cg_effects.obj
.\Debug\cg_ents.obj .\Release\cg_ents.obj
.\Debug\cg_event.obj .\Release\cg_event.obj
.\Debug\cg_info.obj .\Release\cg_info.obj
.\Debug\cg_localents.obj .\Release\cg_localents.obj
.\Debug\cg_main.obj .\Release\cg_main.obj
.\Debug\cg_marks.obj .\Release\cg_marks.obj
.\Debug\cg_players.obj .\Release\cg_players.obj
.\Debug\cg_playerstate.obj .\Release\cg_playerstate.obj
.\Debug\cg_predict.obj .\Release\cg_predict.obj
.\Debug\cg_scoreboard.obj .\Release\cg_scoreboard.obj
.\Debug\cg_servercmds.obj .\Release\cg_servercmds.obj
.\Debug\cg_snapshot.obj .\Release\cg_snapshot.obj
.\Debug\cg_syscalls.obj .\Release\cg_syscalls.obj
.\Debug\cg_view.obj .\Release\cg_view.obj
.\Debug\cg_weapons.obj .\Release\cg_weapons.obj
.\Debug\q_math.obj .\Release\q_math.obj
.\Debug\q_shared.obj .\Release\q_shared.obj
.\Debug\ui_shared.obj .\Release\ui_shared.obj
] ]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPBC.tmp" Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPD9F.tmp"
<h3>Output Window</h3> <h3>Output Window</h3>
Compiling... Compiling...
bg_misc.c bg_misc.c
@ -91,16 +91,15 @@ cg_syscalls.c
cg_view.c cg_view.c
cg_weapons.c cg_weapons.c
q_math.c q_math.c
C:\Development\reaction\cgame\cg_weapons.c(1600) : warning C4700: local variable 'Offset' used without having been initialized
q_shared.c q_shared.c
ui_shared.c ui_shared.c
Linking... Linking...
Creating library Debug/cgamex86.lib and object Debug/cgamex86.exp Creating library Release/cgamex86.lib and object Release/cgamex86.exp
<h3>Results</h3> <h3>Results</h3>
cgamex86.dll - 0 error(s), 1 warning(s) cgamex86.dll - 0 error(s), 0 warning(s)
</pre> </pre>
</body> </body>
</html> </html>