Browse Source

Fix timers. Do not use bullet smoke trail for par21.

poke646_vendetta
Night Owl 6 years ago
parent
commit
51e0f62ee4
  1. 7
      cl_dll/ev_hldm.cpp
  2. 2
      cl_dll/ev_hldm.h
  3. 6
      dlls/satchel.cpp
  4. 2
      dlls/shotgun.cpp
  5. 12
      dlls/vendetta/par21.cpp
  6. 11
      dlls/weapons.cpp

7
cl_dll/ev_hldm.cpp

@ -253,7 +253,7 @@ void EV_WallPuffCallback( struct tempent_s *ent, float frametime, float currentt
ent->entity.angles = ent->entity.baseline.vuser1; ent->entity.angles = ent->entity.baseline.vuser1;
} }
void EV_HLDM_GunshotDecalTrace( pmtrace_t *pTrace, char *decalName ) void EV_HLDM_GunshotDecalTrace( pmtrace_t *pTrace, char *decalName, int iBulletType )
{ {
int iRand; int iRand;
physent_t *pe; physent_t *pe;
@ -283,6 +283,9 @@ void EV_HLDM_GunshotDecalTrace( pmtrace_t *pTrace, char *decalName )
} }
} }
if( iBulletType != BULLET_PLAYER_BUCKSHOT )
return;
pe = gEngfuncs.pEventAPI->EV_GetPhysent( pTrace->ent ); pe = gEngfuncs.pEventAPI->EV_GetPhysent( pTrace->ent );
// Only decal brush models such as the world etc. // Only decal brush models such as the world etc.
@ -344,7 +347,7 @@ void EV_HLDM_DecalGunshot( pmtrace_t *pTrace, int iBulletType )
case BULLET_PLAYER_357: case BULLET_PLAYER_357:
default: default:
// smoke and decal // smoke and decal
EV_HLDM_GunshotDecalTrace( pTrace, EV_HLDM_DamageDecal( pe ) ); EV_HLDM_GunshotDecalTrace( pTrace, EV_HLDM_DamageDecal( pe ), iBulletType );
break; break;
} }
} }

2
cl_dll/ev_hldm.h

@ -89,7 +89,7 @@ enum gauss_e
GAUSS_DRAW GAUSS_DRAW
}; };
void EV_HLDM_GunshotDecalTrace( pmtrace_t *pTrace, char *decalName ); void EV_HLDM_GunshotDecalTrace( pmtrace_t *pTrace, char *decalName, int iBulletType );
void EV_HLDM_DecalGunshot( pmtrace_t *pTrace, int iBulletType ); void EV_HLDM_DecalGunshot( pmtrace_t *pTrace, int iBulletType );
int EV_HLDM_CheckTracer( int idx, float *vecSrc, float *end, float *forward, float *right, int iBulletType, int iTracerFreq, int *tracerCount ); int EV_HLDM_CheckTracer( int idx, float *vecSrc, float *end, float *forward, float *right, int iBulletType, int iTracerFreq, int *tracerCount );
void EV_HLDM_FireBullets( int idx, float *forward, float *right, float *up, int cShots, float *vecSrc, float *vecDirShooting, float flDistance, int iBulletType, int iTracerFreq, int *tracerCount, float flSpreadX, float flSpreadY ); void EV_HLDM_FireBullets( int idx, float *forward, float *right, float *up, int cShots, float *vecSrc, float *vecDirShooting, float flDistance, int iBulletType, int iTracerFreq, int *tracerCount, float flSpreadX, float flSpreadY );

6
dlls/satchel.cpp

@ -367,7 +367,7 @@ void CPipebomb::PrimaryAttack()
} }
m_chargeReady = SATCHEL_RELOAD; m_chargeReady = SATCHEL_RELOAD;
m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 ); m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5;
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5;
break; break;
@ -416,7 +416,7 @@ void CPipebomb::Throw( void )
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--; m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
m_flNextPrimaryAttack = GetNextAttackDelay( 1.0 ); m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.0;
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5;
} }
} }
@ -457,7 +457,7 @@ void CPipebomb::WeaponIdle( void )
// use tripmine animations // use tripmine animations
strcpy( m_pPlayer->m_szAnimExtention, "trip" ); strcpy( m_pPlayer->m_szAnimExtention, "trip" );
m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 ); m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5;
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5;
m_chargeReady = SATCHEL_IDLE; m_chargeReady = SATCHEL_IDLE;
break; break;

2
dlls/shotgun.cpp

@ -118,7 +118,7 @@ void CShotgun::PrimaryAttack()
if( m_pPlayer->pev->waterlevel == 3 ) if( m_pPlayer->pev->waterlevel == 3 )
{ {
PlayEmptySound(); PlayEmptySound();
m_flNextPrimaryAttack = GetNextAttackDelay( 0.15 ); m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15;
return; return;
} }

12
dlls/vendetta/par21.cpp

@ -32,11 +32,11 @@ enum par21_e
PAR21_DEPLOY, PAR21_DEPLOY,
PAR21_FIRE1, PAR21_FIRE1,
PAR21_FIRE2, PAR21_FIRE2,
PAR21_FIRE3, PAR21_FIRE3
}; };
LINK_ENTITY_TO_CLASS(weapon_par21, CPar21); LINK_ENTITY_TO_CLASS(weapon_par21, CPar21)
//========================================================= //=========================================================
@ -129,14 +129,14 @@ void CPar21::PrimaryAttack()
if (m_pPlayer->pev->waterlevel == 3) if (m_pPlayer->pev->waterlevel == 3)
{ {
PlayEmptySound(); PlayEmptySound();
m_flNextPrimaryAttack = 0.15; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15;
return; return;
} }
if (m_iClip <= 0) if (m_iClip <= 0)
{ {
PlayEmptySound(); PlayEmptySound();
m_flNextPrimaryAttack = 0.15; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15;
return; return;
} }
@ -167,7 +167,7 @@ void CPar21::PrimaryAttack()
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usPar21, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0); PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usPar21, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0);
m_flNextPrimaryAttack = GetNextAttackDelay(0.1); m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1;
if (m_flNextPrimaryAttack < UTIL_WeaponTimeBase()) if (m_flNextPrimaryAttack < UTIL_WeaponTimeBase())
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1;
@ -183,7 +183,7 @@ void CPar21::SecondaryAttack(void)
if (m_pPlayer->pev->waterlevel == 3) if (m_pPlayer->pev->waterlevel == 3)
{ {
PlayEmptySound(); PlayEmptySound();
m_flNextPrimaryAttack = 0.15; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15;
return; return;
} }

11
dlls/weapons.cpp

@ -1564,17 +1564,6 @@ TYPEDESCRIPTION CCrossbow::m_SaveData[] =
IMPLEMENT_SAVERESTORE( CCrossbow, CBasePlayerWeapon ) IMPLEMENT_SAVERESTORE( CCrossbow, CBasePlayerWeapon )
TYPEDESCRIPTION CXS::m_SaveData[] =
{
DEFINE_FIELD( CXS, m_fInAttack, FIELD_INTEGER ),
//DEFINE_FIELD( CGauss, m_flStartCharge, FIELD_TIME ),
//DEFINE_FIELD( CGauss, m_flPlayAftershock, FIELD_TIME ),
//DEFINE_FIELD( CGauss, m_flNextAmmoBurn, FIELD_TIME ),
DEFINE_FIELD( CXS, m_fPrimaryFire, FIELD_BOOLEAN ),
};
IMPLEMENT_SAVERESTORE( CXS, CBasePlayerWeapon )
TYPEDESCRIPTION CPipebomb::m_SaveData[] = TYPEDESCRIPTION CPipebomb::m_SaveData[] =
{ {
DEFINE_FIELD( CPipebomb, m_chargeReady, FIELD_INTEGER ), DEFINE_FIELD( CPipebomb, m_chargeReady, FIELD_INTEGER ),

Loading…
Cancel
Save