Browse Source

Merge original "Echoes" source code.

echoes
Night Owl 6 years ago
parent
commit
161b9ed9bd
  1. 38
      dlls/agrunt.cpp
  2. 4
      dlls/hgrunt.cpp
  3. 2
      dlls/tripmine.cpp
  4. 50
      dlls/weapons.h

38
dlls/agrunt.cpp

@ -115,6 +115,8 @@ public: @@ -115,6 +115,8 @@ public:
static const char *pPainSounds[];
static const char *pIdleSounds[];
static const char *pAlertSounds[];
static const char *pStepSounds[];
static const char *pFireSounds[];
BOOL m_fCanHornetAttack;
float m_flNextHornetAttackCheck;
@ -193,6 +195,21 @@ const char *CAGrunt::pAlertSounds[] = @@ -193,6 +195,21 @@ const char *CAGrunt::pAlertSounds[] =
"agrunt/ag_alert5.wav",
};
const char *CAGrunt::pStepSounds[] =
{
"agrunt/ag_step1.wav",
"agrunt/ag_step2.wav",
"agrunt/ag_step3.wav",
"agrunt/ag_step4.wav",
};
const char *CAGrunt::pFireSounds[] =
{
"agrunt/ag_fire1.wav",
"agrunt/ag_fire2.wav",
"agrunt/ag_fire3.wav",
};
//=========================================================
// IRelationship - overridden because Human Grunts are
// Alien Grunt's nemesis.
@ -472,6 +489,13 @@ void CAGrunt::HandleAnimEvent( MonsterEvent_t *pEvent ) @@ -472,6 +489,13 @@ void CAGrunt::HandleAnimEvent( MonsterEvent_t *pEvent )
UTIL_MakeVectors ( pHornet->pev->angles );
pHornet->pev->velocity = gpGlobals->v_forward * 300;
switch ( RANDOM_LONG ( 0 , 2 ) )
{
case 0: EMIT_SOUND_DYN ( ENT(pev), CHAN_WEAPON, "agrunt/ag_fire1.wav", 1.0, ATTN_NORM, 0, 100 ); break;
case 1: EMIT_SOUND_DYN ( ENT(pev), CHAN_WEAPON, "agrunt/ag_fire2.wav", 1.0, ATTN_NORM, 0, 100 ); break;
case 2: EMIT_SOUND_DYN ( ENT(pev), CHAN_WEAPON, "agrunt/ag_fire3.wav", 1.0, ATTN_NORM, 0, 100 ); break;
}
CBaseMonster *pHornetMonster = pHornet->MyMonsterPointer();
//LRC - hornets have the same allegiance as their creators
@ -494,10 +518,10 @@ void CAGrunt::HandleAnimEvent( MonsterEvent_t *pEvent ) @@ -494,10 +518,10 @@ void CAGrunt::HandleAnimEvent( MonsterEvent_t *pEvent )
{
// left foot
case 0:
EMIT_SOUND_DYN( ENT( pev ), CHAN_BODY, "player/pl_ladder2.wav", 1, ATTN_NORM, 0, 70 );
EMIT_SOUND_DYN( ENT( pev ), CHAN_BODY, "agrunt/ag_step2.wav", 1, ATTN_NORM, 0, 70 );
break;
case 1:
EMIT_SOUND_DYN( ENT( pev ), CHAN_BODY, "player/pl_ladder4.wav", 1, ATTN_NORM, 0, 70 );
EMIT_SOUND_DYN( ENT( pev ), CHAN_BODY, "agrunt/ag_step4.wav", 1, ATTN_NORM, 0, 70 );
break;
}
break;
@ -506,10 +530,10 @@ void CAGrunt::HandleAnimEvent( MonsterEvent_t *pEvent ) @@ -506,10 +530,10 @@ void CAGrunt::HandleAnimEvent( MonsterEvent_t *pEvent )
switch( RANDOM_LONG( 0, 1 ) )
{
case 0:
EMIT_SOUND_DYN( ENT( pev ), CHAN_BODY, "player/pl_ladder1.wav", 1, ATTN_NORM, 0, 70 );
EMIT_SOUND_DYN( ENT( pev ), CHAN_BODY, "agrunt/ag_step1.wav", 1, ATTN_NORM, 0, 70 );
break;
case 1:
EMIT_SOUND_DYN( ENT( pev ), CHAN_BODY, "player/pl_ladder3.wav", 1, ATTN_NORM, 0 ,70);
EMIT_SOUND_DYN( ENT( pev ), CHAN_BODY, "agrunt/ag_step3.wav", 1, ATTN_NORM, 0 ,70);
break;
}
break;
@ -642,6 +666,12 @@ void CAGrunt::Precache() @@ -642,6 +666,12 @@ void CAGrunt::Precache()
for( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ )
PRECACHE_SOUND( pAlertSounds[i] );
for( i = 0; i < ARRAYSIZE( pFireSounds ); i++ )
PRECACHE_SOUND( pFireSounds[i] );
for( i = 0; i < ARRAYSIZE( pStepSounds ); i++ )
PRECACHE_SOUND( pStepSounds[i] );
PRECACHE_SOUND( "hassault/hw_shoot1.wav" );
iAgruntMuzzleFlash = PRECACHE_MODEL( "sprites/muz4.spr" );

4
dlls/hgrunt.cpp

@ -49,7 +49,7 @@ extern DLL_GLOBAL int g_iSkillLevel; @@ -49,7 +49,7 @@ extern DLL_GLOBAL int g_iSkillLevel;
//=========================================================
// monster-specific DEFINE's
//=========================================================
#define GRUNT_CLIP_SIZE 36 // how many bullets in a clip? - NOTE: 3 round burst sound, so keep as 3 * x!
#define GRUNT_CLIP_SIZE 30 // how many bullets in a clip? - NOTE: 3 round burst sound, so keep as 3 * x!
#define GRUNT_VOL 0.35 // volume of grunt sounds
#define GRUNT_ATTN ATTN_NORM // attenutation of grunt sentences
#define HGRUNT_LIMP_HEALTH 20
@ -1053,7 +1053,7 @@ void CHGrunt::Spawn() @@ -1053,7 +1053,7 @@ void CHGrunt::Spawn()
if( FBitSet( pev->weapons, HGRUNT_SHOTGUN ) )
{
SetBodygroup( GUN_GROUP, GUN_SHOTGUN );
m_cClipSize = 8;
m_cClipSize = 6;
}
else
{

2
dlls/tripmine.cpp

@ -257,7 +257,7 @@ void CTripmineGrenade::MakeBeam( void ) @@ -257,7 +257,7 @@ void CTripmineGrenade::MakeBeam( void )
m_pBeam = CBeam::BeamCreate( g_pModelNameLaser, 10 );
m_pBeam->PointEntInit( vecTmpEnd, entindex() );
m_pBeam->SetColor( 0, 214, 198 );
m_pBeam->SetColor( 255, 0, 0 );
m_pBeam->SetScrollRate( 255 );
m_pBeam->SetBrightness( 64 );
}

50
dlls/weapons.h

@ -94,9 +94,9 @@ public: @@ -94,9 +94,9 @@ public:
#define MP5_WEIGHT 15
#define SHOTGUN_WEIGHT 15
#define CROSSBOW_WEIGHT 10
#define RPG_WEIGHT 20
#define GAUSS_WEIGHT 20
#define EGON_WEIGHT 20
#define RPG_WEIGHT 70
#define GAUSS_WEIGHT 50
#define EGON_WEIGHT 70
#define HORNETGUN_WEIGHT 10
#define HANDGRENADE_WEIGHT 5
#define SNARK_WEIGHT 5
@ -105,27 +105,27 @@ public: @@ -105,27 +105,27 @@ public:
// weapon clip/carry ammo capacities
#define URANIUM_MAX_CARRY 100
#define _9MM_MAX_CARRY 250
#define _357_MAX_CARRY 36
#define BUCKSHOT_MAX_CARRY 125
#define BOLT_MAX_CARRY 50
#define ROCKET_MAX_CARRY 5
#define HANDGRENADE_MAX_CARRY 10
#define SATCHEL_MAX_CARRY 5
#define TRIPMINE_MAX_CARRY 5
#define SNARK_MAX_CARRY 15
#define HORNET_MAX_CARRY 8
#define M203_GRENADE_MAX_CARRY 10
#define _9MM_MAX_CARRY 200
#define _357_MAX_CARRY 24
#define BUCKSHOT_MAX_CARRY 90
#define BOLT_MAX_CARRY 15
#define ROCKET_MAX_CARRY 3
#define HANDGRENADE_MAX_CARRY 5
#define SATCHEL_MAX_CARRY 3
#define TRIPMINE_MAX_CARRY 4
#define SNARK_MAX_CARRY 20
#define HORNET_MAX_CARRY 10
#define M203_GRENADE_MAX_CARRY 4
// the maximum amount of ammo each weapon's clip can hold
#define WEAPON_NOCLIP -1
//#define CROWBAR_MAX_CLIP WEAPON_NOCLIP
#define GLOCK_MAX_CLIP 17
#define GLOCK_MAX_CLIP 15
#define PYTHON_MAX_CLIP 6
#define MP5_MAX_CLIP 50
#define MP5_DEFAULT_AMMO 25
#define SHOTGUN_MAX_CLIP 8
#define MP5_MAX_CLIP 30
#define MP5_DEFAULT_AMMO 30
#define SHOTGUN_MAX_CLIP 6
#define CROSSBOW_MAX_CLIP 5
#define RPG_MAX_CLIP 1
#define GAUSS_MAX_CLIP WEAPON_NOCLIP
@ -137,21 +137,21 @@ public: @@ -137,21 +137,21 @@ public:
#define SNARK_MAX_CLIP WEAPON_NOCLIP
// the default amount of ammo that comes with each gun when it spawns
#define GLOCK_DEFAULT_GIVE 17
#define GLOCK_DEFAULT_GIVE 15
#define PYTHON_DEFAULT_GIVE 6
#define MP5_DEFAULT_GIVE 25
#define MP5_DEFAULT_AMMO 25
#define MP5_DEFAULT_GIVE 30
#define MP5_DEFAULT_AMMO 30
#define MP5_M203_DEFAULT_GIVE 0
#define SHOTGUN_DEFAULT_GIVE 12
#define SHOTGUN_DEFAULT_GIVE 6
#define CROSSBOW_DEFAULT_GIVE 5
#define RPG_DEFAULT_GIVE 1
#define GAUSS_DEFAULT_GIVE 20
#define EGON_DEFAULT_GIVE 20
#define HANDGRENADE_DEFAULT_GIVE 5
#define HANDGRENADE_DEFAULT_GIVE 1
#define SATCHEL_DEFAULT_GIVE 1
#define TRIPMINE_DEFAULT_GIVE 1
#define SNARK_DEFAULT_GIVE 5
#define HIVEHAND_DEFAULT_GIVE 8
#define HIVEHAND_DEFAULT_GIVE 10
// The amount of ammo given to a player by an ammo item.
#define AMMO_URANIUMBOX_GIVE 20
@ -160,7 +160,7 @@ public: @@ -160,7 +160,7 @@ public:
#define AMMO_MP5CLIP_GIVE MP5_MAX_CLIP
#define AMMO_CHAINBOX_GIVE 200
#define AMMO_M203BOX_GIVE 2
#define AMMO_BUCKSHOTBOX_GIVE 12
#define AMMO_BUCKSHOTBOX_GIVE 6
#define AMMO_CROSSBOWCLIP_GIVE CROSSBOW_MAX_CLIP
#define AMMO_RPGCLIP_GIVE RPG_MAX_CLIP
#define AMMO_URANIUMBOX_GIVE 20

Loading…
Cancel
Save