Skip to content

Commit

Permalink
Several fixes and tweaks.
Browse files Browse the repository at this point in the history
- Taurus now uses correct 20 clip magasine.
- Chaingun fires 2 bullets each shot, as seen in
original They Hunger version.
- Helicopters no longer shoot missiles as seen in
original They Hunger version.
- Flamethrower now plays idle animation as seen in
original They Hunger version.
  • Loading branch information
Marc-Antoine Lortie committed May 17, 2017
1 parent 414ff25 commit c8acbf8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Hunger/dlls/Hunger/chaingun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "player.h"
#include "gamerules.h"

#define CHAINGUN_BULLETS_PER_SHOT 2

enum chaingun_e {
CHAINGUN_IDLE = 0,
CHAINGUN_IDLE2,
Expand Down Expand Up @@ -357,7 +359,7 @@ void CChaingun::Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;

m_iClip--;
m_iClip -= CHAINGUN_BULLETS_PER_SHOT;

m_pPlayer->pev->effects = (int)(m_pPlayer->pev->effects) | EF_MUZZLEFLASH;

Expand All @@ -368,7 +370,7 @@ void CChaingun::Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
Vector vecAiming = m_pPlayer->GetAutoaimVector(AUTOAIM_5DEGREES);
Vector vecDir;

vecDir = m_pPlayer->FireBulletsPlayer(1, vecSrc, vecAiming, Vector(flSpread, flSpread, flSpread), 8192, BULLET_PLAYER_CHAINGUN, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed);
vecDir = m_pPlayer->FireBulletsPlayer(CHAINGUN_BULLETS_PER_SHOT, vecSrc, vecAiming, Vector(flSpread, flSpread, flSpread), 8192, BULLET_PLAYER_CHAINGUN, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed);

int flags;
#if defined( CLIENT_WEAPONS )
Expand Down
4 changes: 4 additions & 0 deletions Hunger/dlls/apache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ void CApache :: Spawn( void )
pev->nextthink = gpGlobals->time + 1.0;
}

#if defined ( HUNGER_DLL )
m_iRockets = 0;
#else
m_iRockets = 10;
#endif
}


Expand Down
5 changes: 4 additions & 1 deletion Hunger/dlls/egon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,13 @@ void CEgon::WeaponIdle( void )
{
ResetEmptySound( );

#if defined ( HUNGER_DLL ) || defined ( HUNGER_CLIENT_DLL )
if ( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() )
return;
#else
if ( m_flTimeWeaponIdle > gpGlobals->time )
return;

#if !defined ( HUNGER_DLL ) && !defined ( HUNGER_CLIENT_DLL )
if ( m_fireState != FIRE_OFF )
EndAttack();
#endif // !defined ( HUNGER_DLL ) && !defined ( HUNGER_CLIENT_DLL )
Expand Down
6 changes: 6 additions & 0 deletions Hunger/dlls/hgrunt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ enum
//=========================================================
void CHGrunt :: SpeakSentence( void )
{
#if defined ( HUNGER_DLL )
// Prevent Cyberfranklin from emitting Grunt taunt sounds.
if ( FClassnameIs( pev, "monster_th_cyberfranklin" ) )
return;
#endif

if ( m_iSentence == HGRUNT_SENT_NONE )
{
// no sentence cued up.
Expand Down
4 changes: 2 additions & 2 deletions Hunger/dlls/weapons.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class CTnt : public CGrenade
#define SNARK_MAX_CLIP WEAPON_NOCLIP
#if defined ( HUNGER_DLL ) || defined ( HUNGER_CLIENT_DLL )
#define AP9_MAX_CLIP 40
#define TAURUS_MAX_CLIP 10
#define TAURUS_MAX_CLIP 20
#define SNIPER_MAX_CLIP 5
#define CHAINGUN_MAX_CLIP 100
#define MEDKIT_MAX_CLIP WEAPON_NOCLIP
Expand All @@ -200,7 +200,7 @@ class CTnt : public CGrenade
#define HIVEHAND_DEFAULT_GIVE 8
#if defined ( HUNGER_DLL ) || defined ( HUNGER_CLIENT_DLL )
#define AP9_DEFAULT_GIVE 40
#define TAURUS_DEFAULT_GIVE 10
#define TAURUS_DEFAULT_GIVE 20
#define SNIPER_DEFAULT_GIVE 5
#define CHAINGUN_DEFAULT_GIVE 100
#define MEDKIT_DEFAULT_GIVE 12
Expand Down

0 comments on commit c8acbf8

Please sign in to comment.