Add missing material/impact definition for sand. Document some other ids
of interest that are used in L4D and GO.
This commit is contained in:
parent
147969e8a8
commit
d283c309cd
6 changed files with 55 additions and 13 deletions
32
src/server/footsteps.h
Executable file → Normal file
32
src/server/footsteps.h
Executable file → Normal file
|
@ -15,21 +15,39 @@
|
|||
*/
|
||||
|
||||
/* HLBSP materials.txt character id's */
|
||||
#define MATID_ALIEN 'H'
|
||||
#define MATID_BLOODYFLESH 'B'
|
||||
#define MATID_COMPUTER 'P'
|
||||
#define MATID_CONCRETE 'C'
|
||||
//#define MATID_UNUSED1 'A'
|
||||
#define MATID_BLOODYFLESH 'B'
|
||||
#define MATID_CONCRETE 'C'
|
||||
#define MATID_DIRT 'D'
|
||||
//#define MATID_UNUSED2 'E'
|
||||
#define MATID_FLESH 'F'
|
||||
#define MATID_FOLIAGE 'O'
|
||||
#define MATID_GLASS 'Y'
|
||||
#define MATID_GRATE 'G'
|
||||
#define MATID_ALIEN 'H'
|
||||
//#define MATID_UNUSED3 'I'
|
||||
//#define MATID_GRASS 'J'
|
||||
//#define MATID_PLASTIC 'L'
|
||||
#define MATID_METAL 'M'
|
||||
#define MATID_FOLIAGE 'O'
|
||||
#define MATID_COMPUTER 'P'
|
||||
//#define MATID_ASPHALT 'Q'
|
||||
//#define MATID_BRICK 'R'
|
||||
#define MATID_SLOSH 'S'
|
||||
#define MATID_SNOW 'N'
|
||||
#define MATID_TILE 'T'
|
||||
#define MATID_CARDBOARD 'U'
|
||||
#define MATID_VENT 'V'
|
||||
#define MATID_WOOD 'W'
|
||||
//#define MATID_UNUSED4 'X'
|
||||
#define MATID_GLASS 'Y'
|
||||
//#define MATID_UNUSED5 'Z'
|
||||
|
||||
/* CS defines snow as 'N' on GoldSrc, whereas in Source it's reserved for sand */
|
||||
#ifdef CSTRIKE
|
||||
#define MATID_SNOW 'N'
|
||||
#define MATID_SAND 'K'
|
||||
#else
|
||||
#define MATID_SNOW 'K'
|
||||
#define MATID_SAND 'N'
|
||||
#endif
|
||||
|
||||
void Footsteps_Init(void);
|
||||
void Footsteps_HLBSP(base_player target);
|
||||
|
|
|
@ -126,6 +126,9 @@ TraceAttack_FireSingle(vector vecPos, vector vAngle, int iDamage, int iWeapon)
|
|||
case MATID_METAL:
|
||||
FX_Impact(IMPACT_METAL, trace_endpos, trace_plane_normal);
|
||||
break;
|
||||
case MATID_SAND:
|
||||
FX_Impact(IMPACT_SAND, trace_endpos, trace_plane_normal);
|
||||
break;
|
||||
case MATID_SLOSH:
|
||||
FX_Impact(IMPACT_SLOSH, trace_endpos, trace_plane_normal);
|
||||
break;
|
||||
|
@ -177,6 +180,9 @@ TraceAttack_FireSingle(vector vecPos, vector vAngle, int iDamage, int iWeapon)
|
|||
case SURF_METAL:
|
||||
FX_Impact(IMPACT_METAL, trace_endpos, trace_plane_normal);
|
||||
break;
|
||||
case SURF_SAND:
|
||||
FX_Impact(IMPACT_SAND, trace_endpos, trace_plane_normal);
|
||||
break;
|
||||
case SURF_SLOSH:
|
||||
FX_Impact(IMPACT_SLOSH, trace_endpos, trace_plane_normal);
|
||||
break;
|
||||
|
|
|
@ -29,6 +29,7 @@ typedef enum
|
|||
IMPACT_GLASS,
|
||||
IMPACT_GRATE,
|
||||
IMPACT_METAL,
|
||||
IMPACT_SAND,
|
||||
IMPACT_SLOSH,
|
||||
IMPACT_SNOW,
|
||||
IMPACT_TILE,
|
||||
|
|
|
@ -20,3 +20,4 @@ float Math_LerpAngle(float fStart, float fEnd, float fAmount);
|
|||
float Math_Lerp(float fA, float fB, float fPercent);
|
||||
float Math_FixDelta(float fDelta);
|
||||
vector Math_Reflect(vector v1, vector v2);
|
||||
vector Math_RandomVector(float flyup);
|
|
@ -43,3 +43,19 @@ Math_Reflect(vector v1, vector v2)
|
|||
{
|
||||
return v1 - 2 * dotproduct(v1, v2) * v2;
|
||||
}
|
||||
|
||||
vector
|
||||
Math_RandomVector(float fFlyUp)
|
||||
{
|
||||
vector tmp;
|
||||
tmp[0] = random() - 0.5f;
|
||||
tmp[1] = random() - 0.5f;
|
||||
|
||||
if ( fFlyUp == TRUE ) {
|
||||
tmp[2] = random();
|
||||
} else {
|
||||
tmp[2] = random() - 0.5f;
|
||||
}
|
||||
|
||||
return tmp * 2.0f;
|
||||
}
|
|
@ -115,7 +115,7 @@ var float autocvar_sv_maxspeed = PMOVE_MAXSPEED;
|
|||
void
|
||||
PMove_Init(void)
|
||||
{
|
||||
#ifdef SERVER
|
||||
#ifdef SERVER
|
||||
cvar_set("sv_stepheight", ftos(PMOVE_STEPHEIGHT));
|
||||
cvar_set("sv_airstepheight", ftos(PMOVE_AIRSTEPHEIGHT));
|
||||
cvar_set("sv_friction", ftos(PMOVE_FRICTION));
|
||||
|
@ -126,20 +126,20 @@ PMove_Init(void)
|
|||
cvar_set("sv_wateraccelerate", ftos(PMOVE_WATERACCELERATE));
|
||||
cvar_set("sv_accelerat", ftos(PMOVE_ACCELERATE));
|
||||
cvar_set("sv_maxspeed", ftos(PMOVE_MAXSPEED));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CUSTOMPLAYERPHYSICS
|
||||
#ifdef CUSTOMPLAYERPHYSICS
|
||||
PMoveCustom_Init();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SERVER
|
||||
void
|
||||
PMove_StartFrame(void)
|
||||
{
|
||||
#ifdef CUSTOMPLAYERPHYSICS
|
||||
#ifdef CUSTOMPLAYERPHYSICS
|
||||
PMoveCustom_StartFrame();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue