mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-21 11:21:41 +00:00
Sand surfaceparm
This commit is contained in:
parent
d3572b7d57
commit
846070951c
8 changed files with 112 additions and 54 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.55 2002/05/11 19:13:42 makro
|
||||||
|
// Sand surfaceparm
|
||||||
|
//
|
||||||
// Revision 1.54 2002/05/09 20:58:30 jbravo
|
// Revision 1.54 2002/05/09 20:58:30 jbravo
|
||||||
// New Obit system and a warning cleanup in zcam
|
// New Obit system and a warning cleanup in zcam
|
||||||
//
|
//
|
||||||
|
@ -1659,6 +1662,13 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||||
cgs.media.footsteps[ FOOTSTEP_HARDSTEPS ][rand()&3] );
|
cgs.media.footsteps[ FOOTSTEP_HARDSTEPS ][rand()&3] );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case EV_FOOTSTEP_SAND:
|
||||||
|
DEBUGNAME("EV_FOOTSTEP_SAND");
|
||||||
|
if (cg_footsteps.integer) {
|
||||||
|
trap_S_StartSound (NULL, es->number, CHAN_BODY,
|
||||||
|
cgs.media.footsteps[ FOOTSTEP_SAND ][rand()&3] );
|
||||||
|
}
|
||||||
|
break;
|
||||||
// Makro - end new sounds
|
// Makro - end new sounds
|
||||||
case EV_FOOTSTEP_METAL2:
|
case EV_FOOTSTEP_METAL2:
|
||||||
DEBUGNAME("EV_FOOTSTEP_METAL2");
|
DEBUGNAME("EV_FOOTSTEP_METAL2");
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.72 2002/05/11 19:13:42 makro
|
||||||
|
// Sand surfaceparm
|
||||||
|
//
|
||||||
// Revision 1.71 2002/05/11 15:40:41 slicer
|
// Revision 1.71 2002/05/11 15:40:41 slicer
|
||||||
// Changed cg_RQ3_<team count> cvars to ui_RQ3_ and added a synch system for these
|
// Changed cg_RQ3_<team count> cvars to ui_RQ3_ and added a synch system for these
|
||||||
//
|
//
|
||||||
|
@ -243,6 +246,7 @@ typedef enum {
|
||||||
FOOTSTEP_MARBLE,
|
FOOTSTEP_MARBLE,
|
||||||
FOOTSTEP_SNOW2,
|
FOOTSTEP_SNOW2,
|
||||||
FOOTSTEP_HARDSTEPS,
|
FOOTSTEP_HARDSTEPS,
|
||||||
|
FOOTSTEP_SAND,
|
||||||
|
|
||||||
|
|
||||||
FOOTSTEP_TOTAL
|
FOOTSTEP_TOTAL
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.62 2002/05/11 19:13:42 makro
|
||||||
|
// Sand surfaceparm
|
||||||
|
//
|
||||||
// Revision 1.61 2002/05/11 15:40:41 slicer
|
// Revision 1.61 2002/05/11 15:40:41 slicer
|
||||||
// Changed cg_RQ3_<team count> cvars to ui_RQ3_ and added a synch system for these
|
// Changed cg_RQ3_<team count> cvars to ui_RQ3_ and added a synch system for these
|
||||||
//
|
//
|
||||||
|
@ -1010,6 +1013,9 @@ static void CG_RegisterSounds( void ) {
|
||||||
Com_sprintf (name, sizeof(name), "sound/player/footsteps/hardstep%i.wav", i+1);
|
Com_sprintf (name, sizeof(name), "sound/player/footsteps/hardstep%i.wav", i+1);
|
||||||
cgs.media.footsteps[FOOTSTEP_HARDSTEPS][i] = trap_S_RegisterSound (name, qfalse);
|
cgs.media.footsteps[FOOTSTEP_HARDSTEPS][i] = trap_S_RegisterSound (name, qfalse);
|
||||||
|
|
||||||
|
Com_sprintf (name, sizeof(name), "sound/player/footsteps/sand%i.wav", i+1);
|
||||||
|
cgs.media.footsteps[FOOTSTEP_SAND][i] = trap_S_RegisterSound (name, qfalse);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// only register the items that the server says we need
|
// only register the items that the server says we need
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.33 2002/05/11 19:18:20 makro
|
||||||
|
// Sand surfaceparm
|
||||||
|
//
|
||||||
// Revision 1.32 2002/05/11 14:22:06 makro
|
// Revision 1.32 2002/05/11 14:22:06 makro
|
||||||
// Func_statics now reset at the beginning of each round
|
// Func_statics now reset at the beginning of each round
|
||||||
//
|
//
|
||||||
|
@ -3237,7 +3240,7 @@ bot_moveresult_t BotAttackMove(bot_state_t *bs, int tfl) {
|
||||||
dist = VectorNormalize(forward);
|
dist = VectorNormalize(forward);
|
||||||
//Makro - for long range attacks the bots should crouch more often
|
//Makro - for long range attacks the bots should crouch more often
|
||||||
if (dist > 512) {
|
if (dist > 512) {
|
||||||
croucher = Com_Clamp(0, 1, croucher * 2.0f);
|
croucher = Com_Clamp(0.1f, 1, croucher * 2.0f);
|
||||||
jumper = Com_Clamp(0, 1, jumper / 2.0f);
|
jumper = Com_Clamp(0, 1, jumper / 2.0f);
|
||||||
}
|
}
|
||||||
VectorNegate(forward, backward);
|
VectorNegate(forward, backward);
|
||||||
|
@ -5820,6 +5823,7 @@ void BotCheckEvents(bot_state_t *bs, entityState_t *state) {
|
||||||
case EV_FOOTSTEP_MARBLE:
|
case EV_FOOTSTEP_MARBLE:
|
||||||
case EV_FOOTSTEP_SNOW2:
|
case EV_FOOTSTEP_SNOW2:
|
||||||
case EV_FOOTSTEP_HARDSTEPS:
|
case EV_FOOTSTEP_HARDSTEPS:
|
||||||
|
case EV_FOOTSTEP_SAND:
|
||||||
case EV_FOOTSPLASH:
|
case EV_FOOTSPLASH:
|
||||||
case EV_FOOTWADE:
|
case EV_FOOTWADE:
|
||||||
case EV_SWIM:
|
case EV_SWIM:
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.37 2002/05/11 19:18:20 makro
|
||||||
|
// Sand surfaceparm
|
||||||
|
//
|
||||||
// Revision 1.36 2002/05/11 14:22:06 makro
|
// Revision 1.36 2002/05/11 14:22:06 makro
|
||||||
// Func_statics now reset at the beginning of each round
|
// Func_statics now reset at the beginning of each round
|
||||||
//
|
//
|
||||||
|
@ -1327,6 +1330,7 @@ char *eventnames[] = {
|
||||||
"EV_FOOTSTEP_MARBLE",
|
"EV_FOOTSTEP_MARBLE",
|
||||||
"EV_FOOTSTEP_SNOW2",
|
"EV_FOOTSTEP_SNOW2",
|
||||||
"EV_FOOTSTEP_HARDSTEPS",
|
"EV_FOOTSTEP_HARDSTEPS",
|
||||||
|
"EV_FOOTSTEP_SAND",
|
||||||
|
|
||||||
"EV_FOOTSPLASH",
|
"EV_FOOTSPLASH",
|
||||||
"EV_FOOTWADE",
|
"EV_FOOTWADE",
|
||||||
|
@ -1769,3 +1773,63 @@ holdable_t CharToItem ( char *name, holdable_t defitem ) {
|
||||||
return defitem;
|
return defitem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
=====================
|
||||||
|
Surfaceparm stuff
|
||||||
|
=====================
|
||||||
|
*/
|
||||||
|
|
||||||
|
int MatFlags[] =
|
||||||
|
{
|
||||||
|
SURF_METALSTEPS,
|
||||||
|
SURF_GRAVEL,
|
||||||
|
SURF_WOOD,
|
||||||
|
SURF_CARPET,
|
||||||
|
SURF_METAL2,
|
||||||
|
SURF_GLASS,
|
||||||
|
SURF_GRASS,
|
||||||
|
SURF_SNOW,
|
||||||
|
SURF_MUD,
|
||||||
|
SURF_WOOD2,
|
||||||
|
SURF_HARDMETAL
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MatFlagCount 5
|
||||||
|
|
||||||
|
int GetMaterialFromFlag( int flag ) {
|
||||||
|
int Material = 0;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < MatFlagCount; i++) {
|
||||||
|
if ( (flag & MatFlags[i]) ) {
|
||||||
|
Material += (1 << i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Material;
|
||||||
|
}
|
||||||
|
|
||||||
|
//metal
|
||||||
|
qboolean IsMetalMat( int Material ) {
|
||||||
|
if (Material == MAT_METALSTEPS || Material == MAT_METAL2 || Material == MAT_HARDMETAL) {
|
||||||
|
return qtrue;
|
||||||
|
}
|
||||||
|
return qfalse;
|
||||||
|
}
|
||||||
|
|
||||||
|
qboolean IsMetalFlag( int flag ) {
|
||||||
|
return IsMetalMat(GetMaterialFromFlag(flag));
|
||||||
|
}
|
||||||
|
|
||||||
|
//wood
|
||||||
|
qboolean IsWoodMat( int Material ) {
|
||||||
|
if (Material == MAT_WOOD || Material == MAT_WOOD2) {
|
||||||
|
return qtrue;
|
||||||
|
}
|
||||||
|
return qfalse;
|
||||||
|
}
|
||||||
|
|
||||||
|
qboolean IsWoodFlag( int flag ) {
|
||||||
|
return IsWoodMat(GetMaterialFromFlag(flag));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.73 2002/05/11 19:18:20 makro
|
||||||
|
// Sand surfaceparm
|
||||||
|
//
|
||||||
// Revision 1.72 2002/05/11 18:47:09 niceass
|
// Revision 1.72 2002/05/11 18:47:09 niceass
|
||||||
// last fire animation fixed
|
// last fire animation fixed
|
||||||
//
|
//
|
||||||
|
@ -1011,6 +1014,10 @@ static int PM_FootstepForSurface( void ) {
|
||||||
if ( Material == MAT_HARDSTEPS ) {
|
if ( Material == MAT_HARDSTEPS ) {
|
||||||
return EV_FOOTSTEP_HARDSTEPS;
|
return EV_FOOTSTEP_HARDSTEPS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( Material == MAT_SAND ) {
|
||||||
|
return EV_FOOTSTEP_SAND;
|
||||||
|
}
|
||||||
// Makro - end new sounds
|
// Makro - end new sounds
|
||||||
|
|
||||||
return EV_FOOTSTEP;
|
return EV_FOOTSTEP;
|
||||||
|
@ -3200,50 +3207,4 @@ void Pmove (pmove_t *pmove) {
|
||||||
//PM_CheckStuck();
|
//PM_CheckStuck();
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
=====================
|
|
||||||
SURFACEPARM STUFF
|
|
||||||
=====================
|
|
||||||
*/
|
|
||||||
|
|
||||||
int MatFlags[] =
|
|
||||||
{
|
|
||||||
SURF_METALSTEPS,
|
|
||||||
SURF_GRAVEL,
|
|
||||||
SURF_WOOD,
|
|
||||||
SURF_CARPET,
|
|
||||||
SURF_METAL2,
|
|
||||||
SURF_GLASS,
|
|
||||||
SURF_GRASS,
|
|
||||||
SURF_SNOW,
|
|
||||||
SURF_MUD,
|
|
||||||
SURF_WOOD2,
|
|
||||||
SURF_HARDMETAL
|
|
||||||
};
|
|
||||||
|
|
||||||
#define MatFlagCount 5
|
|
||||||
|
|
||||||
int GetMaterialFromFlag( int flag ) {
|
|
||||||
int Material = 0;
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < MatFlagCount; i++) {
|
|
||||||
if ( (flag & MatFlags[i]) ) {
|
|
||||||
Material += (1 << i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Material;
|
|
||||||
}
|
|
||||||
|
|
||||||
qboolean IsMetalMat( int Material ) {
|
|
||||||
if (Material == MAT_METALSTEPS || Material == MAT_METAL2 || Material == MAT_HARDMETAL) {
|
|
||||||
return qtrue;
|
|
||||||
}
|
|
||||||
return qfalse;
|
|
||||||
}
|
|
||||||
|
|
||||||
qboolean IsMetalFlag( int flag ) {
|
|
||||||
return IsMetalMat(GetMaterialFromFlag(flag));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.62 2002/05/11 19:18:20 makro
|
||||||
|
// Sand surfaceparm
|
||||||
|
//
|
||||||
// Revision 1.61 2002/05/06 21:41:01 slicer
|
// Revision 1.61 2002/05/06 21:41:01 slicer
|
||||||
// Added rq3_cmd
|
// Added rq3_cmd
|
||||||
//
|
//
|
||||||
|
@ -918,6 +921,7 @@ typedef enum {
|
||||||
EV_FOOTSTEP_MARBLE,
|
EV_FOOTSTEP_MARBLE,
|
||||||
EV_FOOTSTEP_SNOW2,
|
EV_FOOTSTEP_SNOW2,
|
||||||
EV_FOOTSTEP_HARDSTEPS,
|
EV_FOOTSTEP_HARDSTEPS,
|
||||||
|
EV_FOOTSTEP_SAND,
|
||||||
EV_FOOTSPLASH,
|
EV_FOOTSPLASH,
|
||||||
EV_FOOTWADE,
|
EV_FOOTWADE,
|
||||||
EV_SWIM,
|
EV_SWIM,
|
||||||
|
@ -1397,11 +1401,14 @@ qboolean BG_PlayerTouchesItem( playerState_t *ps, entityState_t *item, int atTim
|
||||||
#define MAT_MARBLE 14
|
#define MAT_MARBLE 14
|
||||||
#define MAT_SNOW2 15
|
#define MAT_SNOW2 15
|
||||||
#define MAT_HARDSTEPS 16
|
#define MAT_HARDSTEPS 16
|
||||||
|
#define MAT_SAND 17
|
||||||
|
|
||||||
int GetMaterialFromFlag( int flag );
|
int GetMaterialFromFlag( int flag );
|
||||||
qboolean IsMetalMat( int Material );
|
qboolean IsMetalMat( int Material );
|
||||||
qboolean IsMetalFlag( int flag );
|
qboolean IsMetalFlag( int flag );
|
||||||
|
qboolean IsWoodMat( int Material );
|
||||||
|
qboolean IsWoodFlag( int flag );
|
||||||
|
|
||||||
|
|
||||||
holdable_t CharToItem ( char *name, holdable_t defitem );
|
holdable_t CharToItem ( char *name, holdable_t defitem );
|
||||||
weapon_t CharToWeapon ( char *name, weapon_t defweapon );
|
weapon_t CharToWeapon ( char *name, weapon_t defweapon );
|
||||||
|
|
|
@ -6,13 +6,14 @@
|
||||||
--------------------Configuration: game - Win32 Release--------------------
|
--------------------Configuration: game - Win32 Release--------------------
|
||||||
</h3>
|
</h3>
|
||||||
<h3>Command Lines</h3>
|
<h3>Command Lines</h3>
|
||||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP29F.tmp" with contents
|
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2DD.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 /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
|
||||||
"C:\Games\Quake3\rq3source\reaction\game\ai_dmnet.c"
|
"C:\Games\Quake3\rq3source\reaction\game\bg_misc.c"
|
||||||
|
"C:\Games\Quake3\rq3source\reaction\game\bg_pmove.c"
|
||||||
]
|
]
|
||||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP29F.tmp"
|
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2DD.tmp"
|
||||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2A0.tmp" with contents
|
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2DE.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: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"
|
||||||
\reactionoutput\ai_chat.obj
|
\reactionoutput\ai_chat.obj
|
||||||
|
@ -55,10 +56,11 @@ 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\RSP2A0.tmp"
|
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2DE.tmp"
|
||||||
<h3>Output Window</h3>
|
<h3>Output Window</h3>
|
||||||
Compiling...
|
Compiling...
|
||||||
ai_dmnet.c
|
bg_misc.c
|
||||||
|
bg_pmove.c
|
||||||
Linking...
|
Linking...
|
||||||
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
|
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue