mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 21:24:27 +00:00
Add TRIPMINE_BEAM_DUPLICATION_FIX macros for fixing beam duplication on level transition (#272)
This commit is contained in:
parent
468780d997
commit
5a68ce08bc
@ -64,6 +64,7 @@ option(CROWBAR_IDLE_ANIM "Enable crowbar idle animation" OFF)
|
||||
option(CROWBAR_DELAY_FIX "Enable crowbar attack delay fix" OFF)
|
||||
option(CROWBAR_FIX_RAPID_CROWBAR "Enable rapid crowbar fix" OFF)
|
||||
option(GAUSS_OVERCHARGE_FIX "Enable gauss overcharge fix" OFF)
|
||||
option(TRIPMINE_BEAM_DUPLICATION_FIX "Enable fix of tripmine beam duplication on level transition" OFF)
|
||||
option(OEM_BUILD "Enable OEM Build" OFF)
|
||||
option(HLDEMO_BUILD "Enable Demo Build" OFF)
|
||||
|
||||
@ -136,6 +137,11 @@ if(GAUSS_OVERCHARGE_FIX)
|
||||
add_definitions(-DGAUSS_OVERCHARGE_FIX)
|
||||
endif()
|
||||
|
||||
if(TRIPMINE_BEAM_DUPLICATION_FIX)
|
||||
message(STATUS "Tripmine beam duplication fix enabled")
|
||||
add_definitions(-DTRIPMINE_BEAM_DUPLICATION_FIX)
|
||||
endif()
|
||||
|
||||
if(OEM_BUILD)
|
||||
message(STATUS "OEM build enabled")
|
||||
add_definitions(-DOEM_BUILD)
|
||||
|
@ -82,7 +82,9 @@ TYPEDESCRIPTION CTripmineGrenade::m_SaveData[] =
|
||||
DEFINE_FIELD( CTripmineGrenade, m_vecEnd, FIELD_POSITION_VECTOR ),
|
||||
DEFINE_FIELD( CTripmineGrenade, m_flBeamLength, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( CTripmineGrenade, m_hOwner, FIELD_EHANDLE ),
|
||||
#if !TRIPMINE_BEAM_DUPLICATION_FIX
|
||||
DEFINE_FIELD( CTripmineGrenade, m_pBeam, FIELD_CLASSPTR ),
|
||||
#endif
|
||||
DEFINE_FIELD( CTripmineGrenade, m_posOwner, FIELD_POSITION_VECTOR ),
|
||||
DEFINE_FIELD( CTripmineGrenade, m_angleOwner, FIELD_VECTOR ),
|
||||
DEFINE_FIELD( CTripmineGrenade, m_pRealOwner, FIELD_EDICT ),
|
||||
@ -256,6 +258,9 @@ void CTripmineGrenade::MakeBeam( void )
|
||||
Vector vecTmpEnd = pev->origin + m_vecDir * 2048.0f * m_flBeamLength;
|
||||
|
||||
m_pBeam = CBeam::BeamCreate( g_pModelNameLaser, 10 );
|
||||
#if TRIPMINE_BEAM_DUPLICATION_FIX
|
||||
m_pBeam->pev->spawnflags |= SF_BEAM_TEMPORARY;
|
||||
#endif
|
||||
m_pBeam->PointEntInit( vecTmpEnd, entindex() );
|
||||
m_pBeam->SetColor( 0, 214, 198 );
|
||||
m_pBeam->SetScrollRate( 255 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user