Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/game/client/c_baseentity.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ class C_BaseEntity : public IClientEntity
static C_BaseEntity *CreatePredictedEntityByName( const char *classname, const char *module, int line, bool persist = false );

// FireBullets uses shared code for prediction.
#ifdef NEO
virtual void FireBullets( const FireBulletsInfo_t &info, bool bDoBulletEffects = true );
#else
virtual void FireBullets( const FireBulletsInfo_t &info );
#endif // NEO
virtual void ModifyFireBulletsDamage( CTakeDamageInfo* dmgInfo ) {}
virtual bool ShouldDrawUnderwaterBulletBubbles();
virtual bool ShouldDrawWaterImpacts( void ) { return true; }
Expand Down
2 changes: 2 additions & 0 deletions src/game/client/hl2mp/c_hl2mp_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,15 @@ void C_HL2MP_Player::TraceAttack( const CTakeDamageInfo &info, const Vector &vec

int blood = BloodColor();

#ifndef NEO
CBaseEntity *pAttacker = info.GetAttacker();

if ( pAttacker )
{
if ( HL2MPRules()->IsTeamplay() && pAttacker->InSameTeam( this ) == true )
return;
}
#endif // NEO

if ( blood != DONT_BLEED )
{
Expand Down
4 changes: 4 additions & 0 deletions src/game/server/baseentity.h
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,11 @@ class CBaseEntity : public IServerEntity
// UNDONE: Move these virtuals to CBaseCombatCharacter?
virtual void MakeTracer( const Vector &vecTracerSrc, const trace_t &tr, int iTracerType );
virtual int GetTracerAttachment( void );
#ifdef NEO
virtual void FireBullets( const FireBulletsInfo_t &info, bool bDoBulletEffects = true );
#else
virtual void FireBullets( const FireBulletsInfo_t &info );
#endif // NEO
virtual void DoImpactEffect( trace_t &tr, int nDamageType ); // give shooter a chance to do a custom impact.

// OLD VERSION! Use the struct version
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/neo/neo_npc_targetsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void CNEO_NPCTargetSystem::Think()
// This intentionally should not create any tracer / decal effects being a server side only operation
FireBulletsInfo_t info( 1, vecSrc, vecDir, vec3_origin, MAX_TRACE_LENGTH, GetAmmoDef()->Index("AMMO_PRI"), 28.0f, true );
info.m_flDamage = m_flDamage;
FireBullets(info);
FireBullets(info, false);

if (m_flFireRate > 0)
{
Expand Down
16 changes: 11 additions & 5 deletions src/game/shared/baseentity_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1646,20 +1646,28 @@ ConVar cl_neo_bullet_trace_max_pen("cl_neo_bullet_trace_max_pen", "65", FCVAR_CH
ConVar sv_neo_bullet_trace("sv_neo_bullet_trace", "0", FCVAR_CHEAT, "Show bullet trace", true, 0, true, 1);
ConVar sv_neo_bullet_trace_max_pen("sv_neo_bullet_trace_max_pen", "65", FCVAR_CHEAT, "How much pen does a bullet need to have to show up as a solid red line. Configure to the current weapon used, or leave on default to see differences in pen between weapons", true, 0.1, true, 999.f);
#endif // CLIENT_DLL
#endif // NEO
void CBaseEntity::FireBullets( const FireBulletsInfo_t &info, bool bDoBulletEffects )
#else
void CBaseEntity::FireBullets( const FireBulletsInfo_t &info )
#endif // NEO
{
static int tracerCount;
trace_t tr;
CAmmoDef* pAmmoDef = GetAmmoDef();
int nDamageType = pAmmoDef->DamageType(info.m_iAmmoType);
int nAmmoFlags = pAmmoDef->Flags(info.m_iAmmoType);

#ifdef NEO
bool bDoServerEffects = bDoBulletEffects;
#else
bool bDoServerEffects = true;
#endif // NEO

#ifndef NEO
#if defined( HL2MP ) && defined( GAME_DLL )
bDoServerEffects = false;
#endif
#endif // NEO

#if defined( GAME_DLL )
if( IsPlayer() )
Expand Down Expand Up @@ -2162,16 +2170,14 @@ void CBaseEntity::FireBullets( const FireBulletsInfo_t &info )
iSeed++;
}

#ifndef NEO
#if defined( HL2MP ) && defined( GAME_DLL )
if ( bDoServerEffects == false )
{
#ifdef NEO
TE_HL2MPFireBullets(entindex(), tr.startpos, info.m_vecDirShooting, info.m_iAmmoType, iEffectSeed, info.m_iShots, info.m_vecSpread, bDoTracers, bDoImpacts);
#else
TE_HL2MPFireBullets( entindex(), tr.startpos, info.m_vecDirShooting, info.m_iAmmoType, iEffectSeed, info.m_iShots, info.m_vecSpread.x, bDoTracers, bDoImpacts );
#endif
}
#endif
#endif // NEO

#ifdef GAME_DLL
ApplyMultiDamage();
Expand Down
Loading