mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-26 22:54:39 +00:00
gravgun code
This commit is contained in:
parent
dccb3f4aab
commit
38bb95920e
@ -125,6 +125,7 @@ LOCAL_SRC_FILES := agrunt.cpp airtank.cpp \
|
||||
xen.cpp \
|
||||
zombie.cpp \
|
||||
prop.cpp \
|
||||
gravgun.cpp \
|
||||
../pm_shared/pm_debug.c \
|
||||
../pm_shared/pm_math.c \
|
||||
../pm_shared/pm_shared.c \
|
||||
|
@ -213,6 +213,7 @@ public:
|
||||
}
|
||||
virtual void Blocked( CBaseEntity *pOther ) { if (m_pfnBlocked) (this->*m_pfnBlocked)( pOther ); };
|
||||
|
||||
virtual CBaseEntity * TouchGravGun( CBaseEntity *attacker ){ return NULL; };
|
||||
// allow engine to allocate instance data
|
||||
void *operator new( size_t stAllocateBlock, entvars_t *pev )
|
||||
{
|
||||
|
@ -574,6 +574,7 @@ void CHalfLifeMultiplay :: PlayerSpawn( CBasePlayer *pPlayer )
|
||||
pPlayer->GiveNamedItem( "weapon_crowbar" );
|
||||
pPlayer->GiveNamedItem( "weapon_9mmhandgun" );
|
||||
pPlayer->GiveAmmo( 68, "9mm", _9MM_MAX_CARRY );// 4 full reloads
|
||||
pPlayer->GiveNamedItem( "weapon_gravgun" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,6 +88,12 @@ public:
|
||||
virtual void BounceSound(void);
|
||||
virtual int BloodColor(void) { return DONT_BLEED; }
|
||||
virtual void Killed(entvars_t *pevAttacker, int iGib);
|
||||
virtual CBaseEntity * TouchGravGun( CBaseEntity *attacker )
|
||||
{
|
||||
m_owner2 = attacker->edict();
|
||||
m_attacker = attacker->edict();
|
||||
return attacker;
|
||||
}
|
||||
void CheckRotate();
|
||||
void EXPORT RespawnThink();
|
||||
void EXPORT AngleThink();
|
||||
@ -1063,7 +1069,7 @@ int CProp::TakeDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, float flD
|
||||
if ( !(pev->spawnflags & SF_PROP_BREAKABLE ) )
|
||||
return 0;
|
||||
if ( pev->health <= 0 )
|
||||
return;
|
||||
return 0;
|
||||
// Breakables take double damage from the crowbar
|
||||
if ( bitsDamageType & DMG_CLUB )
|
||||
flDamage *= 2;
|
||||
|
@ -384,6 +384,7 @@ void W_Precache(void)
|
||||
UTIL_PrecacheOtherWeapon( "weapon_hornetgun" );
|
||||
#endif
|
||||
|
||||
UTIL_PrecacheOtherWeapon( "weapon_gravgun" );
|
||||
|
||||
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
|
||||
if ( g_pGameRules->IsDeathmatch() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user