mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 05:34:18 +00:00
...
This commit is contained in:
parent
2a1da47751
commit
f48e0ce228
@ -37,6 +37,7 @@ LOCAL_SRC_FILES := agrunt.cpp airtank.cpp \
|
|||||||
needle.cpp \
|
needle.cpp \
|
||||||
katana.cpp \
|
katana.cpp \
|
||||||
evilsci.cpp \
|
evilsci.cpp \
|
||||||
|
sniper.cpp \
|
||||||
mariozombie.cpp \
|
mariozombie.cpp \
|
||||||
megachav.cpp \
|
megachav.cpp \
|
||||||
pink_panthera.cpp \
|
pink_panthera.cpp \
|
||||||
|
@ -54,8 +54,6 @@ public:
|
|||||||
static const char *pIdleSounds[];
|
static const char *pIdleSounds[];
|
||||||
static const char *pAlertSounds[];
|
static const char *pAlertSounds[];
|
||||||
static const char *pPainSounds[];
|
static const char *pPainSounds[];
|
||||||
static const char *pAttackHitSounds[];
|
|
||||||
static const char *pAttackMissSounds[];
|
|
||||||
|
|
||||||
// No range attacks
|
// No range attacks
|
||||||
BOOL CheckRangeAttack1( float flDot, float flDist ) { return FALSE; }
|
BOOL CheckRangeAttack1( float flDot, float flDist ) { return FALSE; }
|
||||||
@ -65,18 +63,6 @@ public:
|
|||||||
|
|
||||||
LINK_ENTITY_TO_CLASS( monster_megachav, CMegachar )
|
LINK_ENTITY_TO_CLASS( monster_megachav, CMegachar )
|
||||||
|
|
||||||
const char *CMegachar::pAttackHitSounds[] =
|
|
||||||
{
|
|
||||||
"megachav/claw_strike1.wav",
|
|
||||||
"megachav/claw_strike2.wav",
|
|
||||||
"megachav/claw_strike3.wav",
|
|
||||||
};
|
|
||||||
|
|
||||||
const char *CMegachar::pAttackMissSounds[] =
|
|
||||||
{
|
|
||||||
"megachav/claw_miss1.wav",
|
|
||||||
"megachav/claw_miss2.wav",
|
|
||||||
};
|
|
||||||
|
|
||||||
const char *CMegachar::pAttackSounds[] =
|
const char *CMegachar::pAttackSounds[] =
|
||||||
{
|
{
|
||||||
@ -200,10 +186,8 @@ void CMegachar::HandleAnimEvent( MonsterEvent_t *pEvent )
|
|||||||
pHurt->pev->velocity = pHurt->pev->velocity - gpGlobals->v_right * 100;
|
pHurt->pev->velocity = pHurt->pev->velocity - gpGlobals->v_right * 100;
|
||||||
}
|
}
|
||||||
// Play a random attack hit sound
|
// Play a random attack hit sound
|
||||||
EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, pAttackHitSounds[RANDOM_LONG( 0, ARRAYSIZE( pAttackHitSounds ) - 1 )], 1.0, ATTN_NORM, 0, 100 + RANDOM_LONG( -5 , 5 ) );
|
|
||||||
}
|
}
|
||||||
else // Play a random attack miss sound
|
else // Play a random attack miss sound
|
||||||
EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, pAttackMissSounds[RANDOM_LONG( 0, ARRAYSIZE( pAttackMissSounds ) - 1 )], 1.0, ATTN_NORM, 0, 100 + RANDOM_LONG( -5, 5 ) );
|
|
||||||
|
|
||||||
if( RANDOM_LONG( 0, 1 ) )
|
if( RANDOM_LONG( 0, 1 ) )
|
||||||
AttackSound();
|
AttackSound();
|
||||||
@ -222,11 +206,8 @@ void CMegachar::HandleAnimEvent( MonsterEvent_t *pEvent )
|
|||||||
pHurt->pev->punchangle.x = 5;
|
pHurt->pev->punchangle.x = 5;
|
||||||
pHurt->pev->velocity = pHurt->pev->velocity + gpGlobals->v_right * 100;
|
pHurt->pev->velocity = pHurt->pev->velocity + gpGlobals->v_right * 100;
|
||||||
}
|
}
|
||||||
EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, pAttackHitSounds[RANDOM_LONG( 0, ARRAYSIZE( pAttackHitSounds ) - 1 )], 1.0, ATTN_NORM, 0, 100 + RANDOM_LONG( -5, 5 ) );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, pAttackMissSounds[RANDOM_LONG( 0, ARRAYSIZE( pAttackMissSounds ) - 1 )], 1.0, ATTN_NORM, 0, 100 + RANDOM_LONG( -5, 5 ) );
|
|
||||||
|
|
||||||
if( RANDOM_LONG( 0, 1 ) )
|
if( RANDOM_LONG( 0, 1 ) )
|
||||||
AttackSound();
|
AttackSound();
|
||||||
}
|
}
|
||||||
@ -242,10 +223,8 @@ void CMegachar::HandleAnimEvent( MonsterEvent_t *pEvent )
|
|||||||
pHurt->pev->punchangle.x = 5;
|
pHurt->pev->punchangle.x = 5;
|
||||||
pHurt->pev->velocity = pHurt->pev->velocity + gpGlobals->v_forward * -100;
|
pHurt->pev->velocity = pHurt->pev->velocity + gpGlobals->v_forward * -100;
|
||||||
}
|
}
|
||||||
EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, pAttackHitSounds[RANDOM_LONG( 0, ARRAYSIZE( pAttackHitSounds ) - 1 )], 1.0, ATTN_NORM, 0, 100 + RANDOM_LONG( -5, 5 ) );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, pAttackMissSounds[RANDOM_LONG( 0, ARRAYSIZE( pAttackMissSounds ) - 1 )], 1.0, ATTN_NORM, 0, 100 + RANDOM_LONG( -5, 5 ) );
|
|
||||||
|
|
||||||
if( RANDOM_LONG( 0, 1 ) )
|
if( RANDOM_LONG( 0, 1 ) )
|
||||||
AttackSound();
|
AttackSound();
|
||||||
@ -288,12 +267,6 @@ void CMegachar::Precache()
|
|||||||
|
|
||||||
PRECACHE_MODEL( "models/megachav.mdl" );
|
PRECACHE_MODEL( "models/megachav.mdl" );
|
||||||
|
|
||||||
for( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ )
|
|
||||||
PRECACHE_SOUND( (char *)pAttackHitSounds[i] );
|
|
||||||
|
|
||||||
for( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ )
|
|
||||||
PRECACHE_SOUND( (char *)pAttackMissSounds[i] );
|
|
||||||
|
|
||||||
for( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ )
|
for( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ )
|
||||||
PRECACHE_SOUND( (char *)pAttackSounds[i] );
|
PRECACHE_SOUND( (char *)pAttackSounds[i] );
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "nodes.h"
|
#include "nodes.h"
|
||||||
#include "soundent.h"
|
#include "soundent.h"
|
||||||
#define WEAPON_SNIPARS 18
|
#define WEAPON_SNIPARS 18
|
||||||
|
|
||||||
class CSnipars : public CBasePlayerWeapon
|
class CSnipars : public CBasePlayerWeapon
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -80,7 +81,6 @@ int CSnipars::GetItemInfo(ItemInfo *p)
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
DEFINE_FIELD( CSnipars, m_fInZoom, FIELD_INTEGER ),
|
|
||||||
|
|
||||||
int CSnipars::AddToPlayer( CBasePlayer *pPlayer )
|
int CSnipars::AddToPlayer( CBasePlayer *pPlayer )
|
||||||
{
|
{
|
||||||
@ -285,7 +285,7 @@ class CSniparsAmmo : public CBasePlayerAmmo
|
|||||||
void Spawn( void )
|
void Spawn( void )
|
||||||
{
|
{
|
||||||
Precache( );
|
Precache( );
|
||||||
SET_MODEL(ENT(pev), "models/w_sniper.mdl");
|
SET_MODEL(ENT(pev), "models/w_357ammo.mdl");
|
||||||
CBasePlayerAmmo::Spawn( );
|
CBasePlayerAmmo::Spawn( );
|
||||||
}
|
}
|
||||||
void Precache( void )
|
void Precache( void )
|
||||||
@ -303,6 +303,6 @@ class CSniparsAmmo : public CBasePlayerAmmo
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
LINK_ENTITY_TO_CLASS( ammo_snipars2, CSniparsAmmo );
|
LINK_ENTITY_TO_CLASS( ammo_snipars, CSniparsAmmo );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -415,10 +415,6 @@ IMPLEMENT_SAVERESTORE( CBasePlayerItem, CBaseAnimating )
|
|||||||
TYPEDESCRIPTION CBasePlayerWeapon::m_SaveData[] =
|
TYPEDESCRIPTION CBasePlayerWeapon::m_SaveData[] =
|
||||||
{
|
{
|
||||||
#if defined( CLIENT_WEAPONS )
|
#if defined( CLIENT_WEAPONS )
|
||||||
DEFINE_FIELD( CBasePlayerWeapon, m_flNextPrimaryAttack, FIELD_FLOAT ),
|
|
||||||
DEFINE_FIELD( CBasePlayerWeapon, m_flNextSecondaryAttack, FIELD_FLOAT ),
|
|
||||||
DEFINE_FIELD( CBasePlayerWeapon, m_flTimeWeaponIdle, FIELD_FLOAT ),
|
|
||||||
#else // CLIENT_WEAPONS
|
|
||||||
DEFINE_FIELD( CBasePlayerWeapon, m_flNextPrimaryAttack, FIELD_TIME ),
|
DEFINE_FIELD( CBasePlayerWeapon, m_flNextPrimaryAttack, FIELD_TIME ),
|
||||||
DEFINE_FIELD( CBasePlayerWeapon, m_flNextSecondaryAttack, FIELD_TIME ),
|
DEFINE_FIELD( CBasePlayerWeapon, m_flNextSecondaryAttack, FIELD_TIME ),
|
||||||
DEFINE_FIELD( CBasePlayerWeapon, m_flTimeWeaponIdle, FIELD_TIME ),
|
DEFINE_FIELD( CBasePlayerWeapon, m_flTimeWeaponIdle, FIELD_TIME ),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user