diff --git a/src/game/client/c_baseentity.h b/src/game/client/c_baseentity.h index 2200f6db1..d89c34092 100644 --- a/src/game/client/c_baseentity.h +++ b/src/game/client/c_baseentity.h @@ -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; } diff --git a/src/game/client/hl2mp/c_hl2mp_player.cpp b/src/game/client/hl2mp/c_hl2mp_player.cpp index 6c60d2b9e..d30a68361 100644 --- a/src/game/client/hl2mp/c_hl2mp_player.cpp +++ b/src/game/client/hl2mp/c_hl2mp_player.cpp @@ -261,6 +261,7 @@ void C_HL2MP_Player::TraceAttack( const CTakeDamageInfo &info, const Vector &vec int blood = BloodColor(); +#ifndef NEO CBaseEntity *pAttacker = info.GetAttacker(); if ( pAttacker ) @@ -268,6 +269,7 @@ void C_HL2MP_Player::TraceAttack( const CTakeDamageInfo &info, const Vector &vec if ( HL2MPRules()->IsTeamplay() && pAttacker->InSameTeam( this ) == true ) return; } +#endif // NEO if ( blood != DONT_BLEED ) { diff --git a/src/game/server/baseentity.h b/src/game/server/baseentity.h index 4a112c1e5..41dce5e7f 100644 --- a/src/game/server/baseentity.h +++ b/src/game/server/baseentity.h @@ -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 diff --git a/src/game/server/neo/neo_npc_targetsystem.cpp b/src/game/server/neo/neo_npc_targetsystem.cpp index afa1810de..f7bd8d8ca 100644 --- a/src/game/server/neo/neo_npc_targetsystem.cpp +++ b/src/game/server/neo/neo_npc_targetsystem.cpp @@ -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) { diff --git a/src/game/shared/baseentity_shared.cpp b/src/game/shared/baseentity_shared.cpp index ab13402d0..ec82640f7 100644 --- a/src/game/shared/baseentity_shared.cpp +++ b/src/game/shared/baseentity_shared.cpp @@ -1646,8 +1646,10 @@ 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; @@ -1655,11 +1657,17 @@ void CBaseEntity::FireBullets( const FireBulletsInfo_t &info ) 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() ) @@ -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();