Browse Source

gravgun code

foolsday
mittorn 9 years ago
parent
commit
38bb95920e
  1. 1
      dlls/Android.mk
  2. 1
      dlls/cbase.h
  3. 1
      dlls/multiplay_gamerules.cpp
  4. 8
      dlls/prop.cpp
  5. 1
      dlls/weapons.cpp

1
dlls/Android.mk

@ -125,6 +125,7 @@ LOCAL_SRC_FILES := agrunt.cpp airtank.cpp \ @@ -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 \

1
dlls/cbase.h

@ -213,6 +213,7 @@ public: @@ -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 )
{

1
dlls/multiplay_gamerules.cpp

@ -574,6 +574,7 @@ void CHalfLifeMultiplay :: PlayerSpawn( CBasePlayer *pPlayer ) @@ -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" );
}
}

8
dlls/prop.cpp

@ -88,6 +88,12 @@ public: @@ -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 @@ -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;

1
dlls/weapons.cpp

@ -384,6 +384,7 @@ void W_Precache(void) @@ -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…
Cancel
Save