Skip to content

Mapbase v7.3 #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 84 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
c86bf82
Rewrite CScriptNetPropManager
samisalreadytaken Dec 5, 2023
db0e0fc
SiN: Episodes compatible VGUI Screens
Petercov Oct 5, 2022
e304b1a
Fixed C_VGuiScreen sending reversed pressed/unpressed events to the p…
Petercov Aug 1, 2023
146df3c
Also suppress attack3 in vgui screen mode
Petercov Aug 2, 2023
eb46739
Fixed vgui screens potentially crashing on save
Petercov Aug 5, 2023
9f34a64
Vgui screens now try to pass panel commands to the entity that create…
Petercov Dec 29, 2023
9e2bdaa
Fixed vgui_screens always sending a mouse released event to the panel…
Petercov Dec 30, 2023
02e232b
add "OnPhysGunPull" output to CPhysicsProp
Jan 1, 2024
f484aa7
removed `pullDir` parameter from `OnPhysGunPull`
Feb 19, 2024
f86a967
Merge branch 'mapbase-source:develop' into develop
rlenhub Feb 19, 2024
2113410
Add random spawn type for env_headcrabcanister
arbabf Apr 12, 2024
f370074
Fix spacing to be more consistent
arbabf Apr 12, 2024
2c001ff
Change RANDOM_CRAB_TYPE to -1
arbabf Apr 13, 2024
a49cff3
Fix vertex blend swapping in Hammer for SDK_LightmappedGeneric
azzyr Apr 27, 2024
24f3656
Add capability to +USE serverside ragdolls and toggle cleanup of indi…
Blixibon Jun 21, 2024
33e047a
Primitive chromatic aberration effect for env_screeneffect
Blixibon Jun 22, 2024
73988dc
Fix maps with multiple sky_cameras not using the correct sky_camera a…
Blixibon Jun 22, 2024
cd6ec90
Fixed the issue.
Wikot235 Jun 24, 2024
5cf63d4
Spotlight "Ignore solid" keyvalue from MP branch
Blixibon Jun 28, 2024
41233cb
Added Melee attack keyvalue
Wikot235 Jul 27, 2024
a736b0f
Added new spawnflag
Wikot235 Jul 28, 2024
4f14f0c
Fixed the issue.
Wikot235 Aug 7, 2024
178a262
Add VScript function for checking last hit group on CBaseCombatCharacter
Blixibon Aug 10, 2024
0659669
Fix filter_activator_model issues with save/restore and null activator
Blixibon Aug 10, 2024
102c7c3
New "StopActionLoop" input for scripted_sequence
Blixibon Aug 10, 2024
5d50335
New "Destroy" input for func_combine_ball_spawner
Blixibon Aug 10, 2024
e9c45e5
Implement GetColorForSurface() failure workaround
z33ky Sep 5, 2024
df6adcc
Fix -Wdelete-incomplete in CDefaultCustomWeaponEntityFactory::Release…
z33ky Sep 5, 2024
a999c79
Fix minor case of const-correctness
z33ky Sep 5, 2024
359fcb7
Ditch attempts trying to obtain sound duration of MP3s
z33ky Sep 5, 2024
ead5668
Fix GetPropVector return type
samisalreadytaken Sep 7, 2024
337b58e
Don't network info_null
SirYodaJedi Sep 9, 2024
6960362
Prevent signed overflow (UB) in SquirrelVM::GenerateUniqueKey()
z33ky Nov 12, 2024
7ebb26c
Fix OOB access on CBaseCombatCharacter::m_hMyWeapons
samisalreadytaken Nov 22, 2024
47aa8ac
Update triggers.cpp
Wikot235 Nov 25, 2024
72bd5fe
Merge pull request #266 from rlenhub/develop
Blixibon Jan 2, 2025
b19f329
Fix ai_dynint_always_enabled bypassing misc. criteria
Blixibon Feb 26, 2024
f5db760
Add raw scene file support to GetSceneDuration()
Blixibon Mar 7, 2024
e954f00
Fix antlions using wrong angles for dynamic interactions
Blixibon Mar 13, 2024
b59214c
Fix dynamic interactions using "their_" keyvalues always assuming sep…
Blixibon Mar 13, 2024
da44d97
Merge pull request #297 from Blixibon/mapbase/feature/useable-ragdolls
Blixibon Jan 2, 2025
bdc34e4
Fix autocubemap crashing when not in a level
Blixibon Jun 22, 2024
4efb502
Fix "Fade Corpse" spawnflag on NPCs not applying to serverside ragdolls
Blixibon Jun 22, 2024
038c66e
Merge pull request #300 from Blixibon/mapbase/feature/chromatic-aberr…
Blixibon Jan 2, 2025
98816ad
Merge pull request #301 from Blixibon/mapbase/feature/sky-camera-mult…
Blixibon Jan 2, 2025
0464bd7
Merge pull request #309 from Blixibon/mapbase/feature/spotlight-ignor…
Blixibon Jan 2, 2025
e5d3060
float NaN undefined behavour fix
celisej567 Jan 2, 2025
138f51e
Update particlemgr.cpp
celisej567 Jan 3, 2025
93bec9d
Update particlemgr.cpp
celisej567 Jan 3, 2025
b51c5c3
Merge pull request #322 from z33ky/small-mapbase-fixes
Blixibon Jan 4, 2025
7da95ed
Merge pull request #315 from Wikot235/Fix-Flare-Issue
Blixibon Jan 4, 2025
e3ca25a
Merge pull request #308 from Wikot235/Fix-BlurFilterY-uses-width-inst…
Blixibon Jan 4, 2025
e0967de
Merge pull request #294 from azzyr/patch-1
Blixibon Jan 4, 2025
a8d69e5
Merge pull request #264 from Petercov/mapbase-feature/vgui-screens
Blixibon Jan 4, 2025
de59834
Merge pull request #332 from samisalreadytaken/fix-oob
Blixibon Jan 4, 2025
7b15e43
Merge pull request #324 from SirYodaJedi/master
Blixibon Jan 5, 2025
959af0b
m_iMeleeReach now defaults to 55
Wikot235 Jan 5, 2025
99c94f0
Added more customizability
Wikot235 Jan 6, 2025
a00c823
Expose prop_door_rotating to VScript
Blixibon Jan 4, 2025
a72779a
Merge pull request #342 from celisej567/particlemgr-UB-fix
Blixibon Jan 8, 2025
ed476cb
Increment Mapbase version to v7.3
Blixibon Jan 8, 2025
0921f74
Fixed miscellaneous things.
Wikot235 Jan 8, 2025
aa31835
Change new CNPC_BaseZombie customization vars to match actual data types
Blixibon Jan 9, 2025
8ef090c
Merge pull request #312 from Wikot235/Zombie_improved
Blixibon Jan 9, 2025
a5c754d
Fixes and expansions for Lost/FoundEnemySound on NPCs
Blixibon Jan 2, 2025
ad423d1
OnStartTipped output for npc_turret_floor
Blixibon Jan 5, 2025
7220a6d
Merge pull request #292 from arbabf/develop
Blixibon Jan 10, 2025
468fa81
Expose VPhysicsInitNormal and VPhysicsDestroyObject to VScript
Blixibon Jan 2, 2025
70a13c3
Merge pull request #333 from Wikot235/NewNoclipCommand
Blixibon Jan 10, 2025
10f0882
Fix vgui_screen crashing for existing saves until v8.0
Blixibon Jan 5, 2025
b055d77
Move npc_metropolice enemy kill concept to Event_KilledOther()
Blixibon Jan 9, 2025
17af09b
Fix workflow not terminating on compile error
Blixibon Jan 9, 2025
466183c
New VScript functions for player use entity and pickup
Blixibon Jan 5, 2025
0ec8513
Merge pull request #343 from Blixibon/mapbase/feature/door-vscript
Blixibon Jan 11, 2025
d51d44e
Fix forced interaction partners being made to face each other even wh…
Blixibon Jan 2, 2025
d4b66b1
Expose CBaseCombatCharacter glow funcs to VScript + add color functio…
Blixibon Jan 2, 2025
66012e7
Merge pull request #260 from samisalreadytaken/netprops
Blixibon Jan 11, 2025
b03ffdc
Fix VScript not having "self" during precache, props not using death …
Blixibon Jan 5, 2025
5bc5a3b
Fix vgui_controls being considered a part of map tools in build workflow
Blixibon Jan 12, 2025
93d586a
Add vgui_controls to workflow for all projects
Blixibon Jan 12, 2025
cfe649e
Change workflow to use .sln and consolidate artifact tasks
Blixibon Jan 13, 2025
f79f07e
Support for multiple colors for different outro credits columns on th…
Blixibon Jan 5, 2025
6fbd411
Merge pull request #357 from Blixibon/mapbase/feature/workflow-sln
Blixibon Jan 14, 2025
365d560
Updated README
Blixibon Jan 14, 2025
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
134 changes: 29 additions & 105 deletions .github/workflows/mapbase_build-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v4

- name: Add MSBuild to PATH
uses: microsoft/setup-[email protected]
uses: compnerd/gha-setup-vsdevenv@v6

- name: Enable VS2022
working-directory: '${{inputs.branch}}/src/vpc_scripts'
Expand All @@ -77,107 +77,40 @@ jobs:

# --------------------------------------------------------------------

# "I'm invoking msbuild for each project individually, which looks a bit odd considering there is a solution file which should be able to invoke the builds in their proper order automatically, but passing the solution to msbuild doesn't seem to work."
# https://github.com/mapbase-source/source-sdk-2013/pull/162

- name: Build mathlib
- name: Build
#if: steps.filter.outputs.game == 'true'
working-directory: '${{inputs.branch}}/src'
shell: cmd
run: |
msbuild -m -p:Configuration=${{inputs.configuration}} mathlib\mathlib.vcxproj

- name: Build Base Libraries
if: inputs.project-group == 'all' || inputs.project-group == 'game' || inputs.project-group == 'maptools'
working-directory: '${{inputs.branch}}/src'
shell: cmd
run: |
msbuild -m -p:Configuration=${{inputs.configuration}} raytrace\raytrace.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} tier1\tier1.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} vgui2\vgui_controls\vgui_controls.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} vscript\vscript.vcxproj

- name: Build Map Tools
if: inputs.project-group == 'all' || inputs.project-group == 'maptools'
working-directory: '${{inputs.branch}}/src'
shell: cmd
run: |
msbuild -m -p:Configuration=${{inputs.configuration}} fgdlib\fgdlib.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} utils\vbsp\vbsp.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} utils\vvis\vvis_dll.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} utils\vvis_launcher\vvis_launcher.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} utils\vrad\vrad_dll.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} utils\vrad_launcher\vrad_launcher.vcxproj

- name: Build Shaders
if: inputs.project-group == 'shaders'
working-directory: '${{inputs.branch}}/src'
shell: cmd
run: |
msbuild -m -p:Configuration=${{inputs.configuration}} materialsystem\stdshaders\game_shader_dx9_${{inputs.game}}.vcxproj

- name: Build Game
if: inputs.project-group == 'game'
working-directory: '${{inputs.branch}}/src'
shell: cmd
run: |
msbuild -m -p:Configuration=${{inputs.configuration}} responserules\runtime\responserules.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} game\client\client_${{inputs.game}}.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} game\server\server_${{inputs.game}}.vcxproj

# TODO: Hook to game naming?
- name: Build everything
if: inputs.project-group == 'all'
working-directory: '${{inputs.branch}}/src'
shell: cmd
run: |
msbuild -m -p:Configuration=${{inputs.configuration}} responserules\runtime\responserules.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} materialsystem\stdshaders\game_shader_dx9_episodic.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} materialsystem\stdshaders\game_shader_dx9_hl2.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} game\client\client_episodic.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} game\client\client_hl2.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} game\server\server_episodic.vcxproj
msbuild -m -p:Configuration=${{inputs.configuration}} game\server\server_hl2.vcxproj
devenv ${{inputs.solution-name}}.sln /upgrade
msbuild -m -t:Rebuild -p:Configuration=${{inputs.configuration}};Platform=x86 ${{inputs.solution-name}}.sln

# --------------------------------------------------------------------

- name: Publish Windows game DLLs
if: inputs.project-group == 'game'
uses: actions/upload-artifact@v3
with:
name: 'Windows Game DLLs (server & client.dll) [${{ inputs.configuration }}]'
path: |
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/client.dll
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/server.dll
if-no-files-found: error

- name: Publish Windows shader DLL
if: inputs.project-group == 'shaders'
uses: actions/upload-artifact@v3
- name: Publish game binaries
if: inputs.project-group == 'game' || inputs.project-group == 'shaders'
uses: actions/upload-artifact@v4
with:
name: 'Windows Shader DLL (game_shader_dx9.dll) [${{ inputs.configuration }}]'
name: '${{inputs.project-group}}_${{inputs.game}}_win32_${{ inputs.configuration }}'
path: |
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/game_shader_dx9.dll
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*.dll
if-no-files-found: error

- name: Publish Windows map tools
- name: Publish map tools
if: inputs.project-group == 'maptools'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Windows Map Tools [${{ inputs.configuration }}]'
name: '${{inputs.project-group}}_win32_${{ inputs.configuration }}'
path: |
${{inputs.branch}}/game/bin/vbsp.exe
${{inputs.branch}}/game/bin/vvis.exe
${{inputs.branch}}/game/bin/vvis_dll.dll
${{inputs.branch}}/game/bin/vrad.exe
${{inputs.branch}}/game/bin/vrad_dll.dll
${{inputs.branch}}/game/bin/*.exe
${{inputs.branch}}/game/bin/*.dll
if-no-files-found: error

- name: Publish everything (Windows)
- name: Publish everything
if: inputs.project-group == 'all'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Everything (Windows) [${{ inputs.configuration }}]'
name: 'everything_win32_${{ inputs.configuration }}'
path: |
${{inputs.branch}}/game/bin
${{inputs.branch}}/game/mod_*/bin
Expand Down Expand Up @@ -224,30 +157,21 @@ jobs:

# --------------------------------------------------------------------

- name: Publish Linux game SOs
if: inputs.project-group == 'game'
uses: actions/upload-artifact@v3
with:
name: 'Linux Game SOs (server & client.so) [${{ inputs.configuration }}]'
path: |
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/client.so
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/server.so
if-no-files-found: error

- name: Publish Linux shader SO
if: inputs.project-group == 'shaders'
uses: actions/upload-artifact@v3
- name: Publish game binaries
if: inputs.project-group == 'game' || inputs.project-group == 'shaders'
uses: actions/upload-artifact@v4
with:
name: 'Linux Shader SO (game_shader_dx9.so) [${{ inputs.configuration }}]'
name: '${{inputs.project-group}}_${{inputs.game}}_linux32_${{ inputs.configuration }}'
path: |
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/game_shader_dx9.so
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*.so
!${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*_srv.so
if-no-files-found: error

#- name: Publish Linux map tools
#- name: Publish map tools
# if: inputs.project-group == 'maptools'
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: 'Linux Map Tools [${{ inputs.configuration }}]'
# name: '${{inputs.project-group}}_linux32_${{ inputs.configuration }}'
# path: |
# ${{inputs.branch}}/game/bin/vbsp
# ${{inputs.branch}}/game/bin/vvis
Expand All @@ -258,11 +182,11 @@ jobs:

# For now, don't publish the .dbg files even though we publish .pdb files on Windows
# (they're too big)
- name: Publish everything (Linux)
- name: Publish everything
if: inputs.project-group == 'all'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Everything (Linux) [${{ inputs.configuration }}]'
name: 'everything_linux32_${{ inputs.configuration }}'
path: |
${{inputs.branch}}/game/bin/*.so
!${{inputs.branch}}/game/bin/*_srv.so
Expand Down
17 changes: 16 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//=========================================================================================================================

Mapbase v7.2 - Source 2013
Mapbase v7.3 - Source 2013
https://github.com/mapbase-source/source-sdk-2013
https://www.moddb.com/mods/mapbase

Expand Down Expand Up @@ -117,7 +117,18 @@ Direct contributions:
- https://github.com/mapbase-source/source-sdk-2013/pull/237 (Commander goal trace fix by Agrimar)
- https://github.com/mapbase-source/source-sdk-2013/pull/245 (ViewPunch random fix by Mr0maks)
- https://github.com/mapbase-source/source-sdk-2013/pull/248 (soundlevel_t conversation warning fix by Mechami)
- https://github.com/mapbase-source/source-sdk-2013/pull/266 ("OnPhysGunPull" output in CPhysicsProp by rlenhub)
- https://github.com/mapbase-source/source-sdk-2013/pull/292 (env_headcrabcanister random spawn type by arbabf)
- https://github.com/mapbase-source/source-sdk-2013/pull/294 (SDK_LightmappedGeneric editor blend swap fix by azzyr)
- https://github.com/mapbase-source/source-sdk-2013/pull/308 (BlurFilterY fix by Wikot235)
- https://github.com/mapbase-source/source-sdk-2013/pull/312 (Zombie improvements by Wikot235)
- https://github.com/mapbase-source/source-sdk-2013/pull/315 (env_flare crash fix by Wikot235)
- https://github.com/mapbase-source/source-sdk-2013/pull/324 (server-only info/func_null by SirYodaJedi)
- https://github.com/mapbase-source/source-sdk-2013/pull/333 (Cvar to transition levels while in MOVETYPE_NOCLIP by Wikot235)
- https://github.com/mapbase-source/source-sdk-2013/pull/342 (NaN particle cull radius fix by celisej567)
- https://github.com/mapbase-source/mapbase-game-src/pull/1 (Advanced video options duplicate field name fix by arbabf; This is asset-based and not reflected in the code)
- https://github.com/mapbase-source/mapbase-game-src/pull/2 (gameinfo.txt typo fix by CarePackage17; This is asset-based and not reflected in the code)
- https://github.com/mapbase-source/mapbase-game-src/pull/3 (HudMessage cutoff fix by arbabf; This is asset-based and not reflected in the code)
- Demo autorecord code provided by Klems
- cc_emit crash fix provided by 1upD
- Custom HL2 ammo crate models created by Rykah (Textures created by Blixibon; This is asset-based and, aside from the SLAM crate, not reflected in the code)
Expand All @@ -144,8 +155,10 @@ Direct contributions:
=-- https://github.com/mapbase-source/source-sdk-2013/pull/206 (Fix CScriptNetMsgHelper::WriteEntity())
=-- https://github.com/mapbase-source/source-sdk-2013/pull/213 (VScript HUD visibility control, optimizations for 3D skybox angles/fake worldportals)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/229 (VScript VGUI HUD viewport parenting, game_text and vgui_text_display VScript font fallback)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/260 (CScriptNetPropManager rewrite)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/261 (Misc VScript additions)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/279 (weapon_custom_scripted fixes)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/332 (Fix OOB access)

== Contributions from z33ky:
=-- https://github.com/mapbase-source/source-sdk-2013/pull/21 (Various GCC/Linux compilation fixes)
Expand All @@ -159,6 +172,7 @@ Direct contributions:
=-- https://github.com/mapbase-source/source-sdk-2013/pull/159 (Additional GCC/Linux compilation fixes)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/162 (VS2019 exception specification fix)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/170 (HL2 non-Episodic build fix)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/322 (Small Mapbase fixes)

== Contributions from Petercov:
=-- https://github.com/mapbase-source/source-sdk-2013/pull/182 (NPCs load dynamic interactions from all animation MDLs)
Expand All @@ -168,6 +182,7 @@ Direct contributions:
=-- https://github.com/mapbase-source/source-sdk-2013/pull/183 (Enhanced custom weapons support)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/230 (Caption fixes)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/231 (Sentence source bug fix)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/264 (Outputs for vgui_screen)

//-------------------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions mp/src/game/client/particlemgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ CParticleEffectBinding::CParticleEffectBinding()
m_LastMin = m_Min;
m_LastMax = m_Max;

m_flParticleCullRadius = 0.0f;

SetParticleCullRadius( 0.0f );
m_nActiveParticles = 0;

Expand Down
4 changes: 2 additions & 2 deletions mp/src/game/server/subs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ void CPointEntity::Spawn( void )
}


class CNullEntity : public CBaseEntity
class CNullEntity : public CServerOnlyEntity
{
public:
DECLARE_CLASS( CNullEntity, CBaseEntity );
DECLARE_CLASS( CNullEntity, CServerOnlyEntity );

void Spawn( void );
};
Expand Down
26 changes: 18 additions & 8 deletions sp/src/game/client/c_basecombatcharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ C_BaseCombatCharacter::C_BaseCombatCharacter()
m_pGlowEffect = NULL;
m_bGlowEnabled = false;
m_bOldGlowEnabled = false;
m_GlowColor.Init( 0.76f, 0.76f, 0.76f );
m_OldGlowColor = m_GlowColor;
m_GlowAlpha = 1.0f;
m_OldGlowAlpha = 1.0f;
#endif // GLOWS_ENABLE
}

Expand Down Expand Up @@ -66,6 +70,8 @@ void C_BaseCombatCharacter::OnPreDataChanged( DataUpdateType_t updateType )

#ifdef GLOWS_ENABLE
m_bOldGlowEnabled = m_bGlowEnabled;
m_OldGlowColor = m_GlowColor;
m_OldGlowAlpha = m_GlowAlpha;
#endif // GLOWS_ENABLE
}

Expand All @@ -77,7 +83,7 @@ void C_BaseCombatCharacter::OnDataChanged( DataUpdateType_t updateType )
BaseClass::OnDataChanged( updateType );

#ifdef GLOWS_ENABLE
if ( m_bOldGlowEnabled != m_bGlowEnabled )
if ( m_bOldGlowEnabled != m_bGlowEnabled || m_OldGlowColor != m_GlowColor || m_OldGlowAlpha != m_GlowAlpha )
{
UpdateGlowEffect();
}
Expand Down Expand Up @@ -106,11 +112,13 @@ void C_BaseCombatCharacter::DoMuzzleFlash()
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void C_BaseCombatCharacter::GetGlowEffectColor( float *r, float *g, float *b )
void C_BaseCombatCharacter::GetGlowEffectColor( float *r, float *g, float *b, float *a )
{
*r = 0.76f;
*g = 0.76f;
*b = 0.76f;
*r = m_GlowColor.x;
*g = m_GlowColor.y;
*b = m_GlowColor.z;
if (a)
*a = m_GlowAlpha;
}

//-----------------------------------------------------------------------------
Expand All @@ -127,10 +135,10 @@ void C_BaseCombatCharacter::UpdateGlowEffect( void )
// create a new effect
if ( m_bGlowEnabled )
{
float r, g, b;
GetGlowEffectColor( &r, &g, &b );
float r, g, b, a;
GetGlowEffectColor( &r, &g, &b, &a );

m_pGlowEffect = new CGlowObject( this, Vector( r, g, b ), 1.0, true );
m_pGlowEffect = new CGlowObject( this, Vector( r, g, b ), a, true );
}
}

Expand Down Expand Up @@ -161,6 +169,8 @@ BEGIN_RECV_TABLE(C_BaseCombatCharacter, DT_BaseCombatCharacter)
RecvPropArray3( RECVINFO_ARRAY(m_hMyWeapons), RecvPropEHandle( RECVINFO( m_hMyWeapons[0] ) ) ),
#ifdef GLOWS_ENABLE
RecvPropBool( RECVINFO( m_bGlowEnabled ) ),
RecvPropVector( RECVINFO( m_GlowColor ) ),
RecvPropFloat( RECVINFO( m_GlowAlpha ) ),
#endif // GLOWS_ENABLE

#ifdef INVASION_CLIENT_DLL
Expand Down
6 changes: 5 additions & 1 deletion sp/src/game/client/c_basecombatcharacter.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class C_BaseCombatCharacter : public C_BaseFlex

#ifdef GLOWS_ENABLE
CGlowObject *GetGlowObject( void ){ return m_pGlowEffect; }
virtual void GetGlowEffectColor( float *r, float *g, float *b );
virtual void GetGlowEffectColor( float *r, float *g, float *b, float *a = NULL );
#endif // GLOWS_ENABLE

#ifdef MAPBASE_VSCRIPT
Expand Down Expand Up @@ -133,6 +133,10 @@ class C_BaseCombatCharacter : public C_BaseFlex
bool m_bGlowEnabled;
bool m_bOldGlowEnabled;
CGlowObject *m_pGlowEffect;
Vector m_GlowColor;
Vector m_OldGlowColor;
float m_GlowAlpha;
int m_OldGlowAlpha;
#endif // GLOWS_ENABLE

private:
Expand Down
2 changes: 2 additions & 0 deletions sp/src/game/client/c_baseentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ BEGIN_ENT_SCRIPTDESC_ROOT( C_BaseEntity, "Root class of all client-side entities
DEFINE_SCRIPTFUNC_NAMED( ScriptEntityToWorldTransform, "EntityToWorldTransform", "Get the entity's transform" )

DEFINE_SCRIPTFUNC_NAMED( ScriptGetPhysicsObject, "GetPhysicsObject", "Get the entity's physics object if it has one" )
DEFINE_SCRIPTFUNC_NAMED( ScriptPhysicsInitNormal, "PhysicsInitNormal", "Initializes the entity's physics object with the specified solid type, solid flags, and whether to start asleep" )
DEFINE_SCRIPTFUNC_NAMED( ScriptPhysicsDestroyObject, "PhysicsDestroyObject", "Destroys the entity's physics object" )

DEFINE_SCRIPTFUNC( GetWaterLevel, "Get current level of water submergence" )

Expand Down
2 changes: 2 additions & 0 deletions sp/src/game/client/c_baseentity.h
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,8 @@ class C_BaseEntity : public IClientEntity
HSCRIPT ScriptEntityToWorldTransform( void );

HSCRIPT ScriptGetPhysicsObject( void );
void ScriptPhysicsInitNormal( int nSolidType, int nSolidFlags, bool createAsleep );
void ScriptPhysicsDestroyObject() { VPhysicsDestroyObject(); }

void ScriptSetParent( HSCRIPT hParent, const char *szAttachment );
HSCRIPT ScriptGetMoveParent( void );
Expand Down
Loading
Loading