Skip to content

Commit 6cc2937

Browse files
authored
Merge pull request #429 from mapbase-source/develop
Mapbase v8.0
2 parents 7976a21 + 34fb04f commit 6cc2937

152 files changed

Lines changed: 35192 additions & 1648 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ ipch
1919
*.idb
2020
*.vcxproj
2121
*.sln
22+
*.vcxproj.FileListAbsolute.txt
23+
*.pdb
2224

2325
# OSX/Linux build products
2426
*.mak
@@ -49,6 +51,8 @@ client.dylib.dSYM/
4951
server.dylib
5052
server.dylib.dSYM/
5153

54+
sp/game/bin
55+
5256
# files generated by running a mod
5357
config.cfg
5458

@@ -61,6 +65,7 @@ config.cfg
6165
*.filters
6266
*.vpc_crc
6367
*.sentinel
68+
*.recipe
6469

6570
# Backup files
6671
*.bak
@@ -90,4 +95,4 @@ sp/src/vgui2/*.dll
9095
sp/src/vgui2/*.pdb
9196

9297
# Build support files
93-
sp/src/devtools/gcc9+support.o
98+
sp/src/devtools/gcc9+support.o

README

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//=========================================================================================================================
22

3-
Mapbase v7.3 - Source 2013
3+
Mapbase v8.0 - Source 2013
44
https://github.com/mapbase-source/source-sdk-2013
55
https://www.moddb.com/mods/mapbase
66

@@ -52,6 +52,7 @@ Mapbase uses content from the following non-Source SDK 2013 Valve games or SDKs:
5252
-- Alien Swarm (Used to port assets from the aforementioned SDK code features, e.g. game instructor icons)
5353
-- Left 4 Dead (Used to port certain animations as well as assets from the aforementioned SDK code features, e.g. particle rain)
5454
-- Half-Life: Source (Used to port friction tool textures)
55+
-- Half-Life 2: Survivor (Used to port Gordon Freeman model)
5556

5657
Valve allows assets from these titles to be distributed for modding purposes. Note that ported assets are only used in the release build, not the code repository.
5758

@@ -118,25 +119,43 @@ Direct contributions:
118119
- https://github.com/mapbase-source/source-sdk-2013/pull/245 (ViewPunch random fix by Mr0maks)
119120
- https://github.com/mapbase-source/source-sdk-2013/pull/248 (soundlevel_t conversation warning fix by Mechami)
120121
- https://github.com/mapbase-source/source-sdk-2013/pull/266 ("OnPhysGunPull" output in CPhysicsProp by rlenhub)
122+
- https://github.com/mapbase-source/source-sdk-2013/pull/281 (npc_combinedropship DropStrider input by Bronzehawk75)
121123
- https://github.com/mapbase-source/source-sdk-2013/pull/292 (env_headcrabcanister random spawn type by arbabf)
124+
- https://github.com/mapbase-source/source-sdk-2013/pull/293 (Restore text selection code by SanyaSho)
122125
- https://github.com/mapbase-source/source-sdk-2013/pull/294 (SDK_LightmappedGeneric editor blend swap fix by azzyr)
123126
- https://github.com/mapbase-source/source-sdk-2013/pull/308 (BlurFilterY fix by Wikot235)
124127
- https://github.com/mapbase-source/source-sdk-2013/pull/312 (Zombie improvements by Wikot235)
125128
- https://github.com/mapbase-source/source-sdk-2013/pull/315 (env_flare crash fix by Wikot235)
126129
- https://github.com/mapbase-source/source-sdk-2013/pull/324 (server-only info/func_null by SirYodaJedi)
127130
- https://github.com/mapbase-source/source-sdk-2013/pull/333 (Cvar to transition levels while in MOVETYPE_NOCLIP by Wikot235)
128131
- https://github.com/mapbase-source/source-sdk-2013/pull/342 (NaN particle cull radius fix by celisej567)
132+
- https://github.com/mapbase-source/source-sdk-2013/pull/360 (.gitignore update by Unusuario2)
133+
- https://github.com/mapbase-source/source-sdk-2013/pull/381 (color_correction_volume crash fix by Nbc66)
134+
- https://github.com/mapbase-source/source-sdk-2013/pull/385 (VRAD -ultrafast command by Unusuario2)
135+
- https://github.com/mapbase-source/source-sdk-2013/pull/391 (VRAD -extrapasses command by Unusuario2)
136+
- https://github.com/mapbase-source/source-sdk-2013/pull/393 (Additional VBSP options doc by Unusuario2)
137+
- https://github.com/mapbase-source/source-sdk-2013/pull/397 (Viewmodel camera bone by Nbc66)
138+
- https://github.com/mapbase-source/source-sdk-2013/pull/412 (Compile tool negative threads support by Unusuario2)
139+
- https://github.com/mapbase-source/source-sdk-2013/pull/414 (VRAD %alphatexture by SirYodaJedi)
140+
- https://github.com/mapbase-source/source-sdk-2013/pull/415 (Parallax corrected cubemaps optimization and fix by Zeldaboy14 and White_Red_Dragons)
141+
- https://github.com/mapbase-source/source-sdk-2013/pull/418 (Server ragdoll death poses by AnOldLady)
142+
- https://github.com/mapbase-source/source-sdk-2013/pull/419 (npc_helicopter removal crash fix by Wikot235)
143+
- https://github.com/mapbase-source/source-sdk-2013/pull/420 (sk_combine_head_dmg_multiplier cvar by Wikot235)
144+
- https://github.com/mapbase-source/source-sdk-2013/pull/422 (Expanded HL2 NPC custom model support by Maestra Fenix [committed by Blixibon])
129145
- 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)
130146
- 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)
131147
- 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)
132148
- Demo autorecord code provided by Klems
133149
- cc_emit crash fix provided by 1upD
150+
- npc_barnacle poison zombie crash fix provided by Agrimar
134151
- 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)
135152
- Combine lock hardware on door01_left.mdl created by Kralich (This is asset-based and not reflected in the code)
136153
- npc_vehicledriver fixes provided by CrAzY
137154
- npc_combine cover behavior patches provided by iohnnyboy
138155
- logic_playmovie icon created by URAKOLOUY5 (This is asset-based and not reflected in the code)
139156
- Dropship APC save/load fix provided by Cvoxulary
157+
- c_arms support on HL2 viewmodels by Inaki and ReverendV92 (This is asset-based and not reflected in the code)
158+
- Custom c_arms for HL2 characters by Notewell (This is asset-based and not reflected in the code)
140159

141160
== Contributions from samisalreadytaken:
142161
=-- https://github.com/mapbase-source/source-sdk-2013/pull/47 (VScript utility/consistency changes)
@@ -154,11 +173,19 @@ Direct contributions:
154173
=-- https://github.com/mapbase-source/source-sdk-2013/pull/192 (VScript hook manager and fixes)
155174
=-- https://github.com/mapbase-source/source-sdk-2013/pull/206 (Fix CScriptNetMsgHelper::WriteEntity())
156175
=-- https://github.com/mapbase-source/source-sdk-2013/pull/213 (VScript HUD visibility control, optimizations for 3D skybox angles/fake worldportals)
176+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/221 (VScript serialization rewrite)
157177
=-- https://github.com/mapbase-source/source-sdk-2013/pull/229 (VScript VGUI HUD viewport parenting, game_text and vgui_text_display VScript font fallback)
158178
=-- https://github.com/mapbase-source/source-sdk-2013/pull/260 (CScriptNetPropManager rewrite)
159179
=-- https://github.com/mapbase-source/source-sdk-2013/pull/261 (Misc VScript additions)
160180
=-- https://github.com/mapbase-source/source-sdk-2013/pull/279 (weapon_custom_scripted fixes)
181+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/302 (VScript debugger)
182+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/331 (VScript leak fixes)
161183
=-- https://github.com/mapbase-source/source-sdk-2013/pull/332 (Fix OOB access)
184+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/411 (VScript debugger cleanup)
185+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/423 (GetPropFloatArray Vector indexing fix)
186+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/431 (VScript save/restore and debugger fixes)
187+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/441 (VScript instance helper fallback)
188+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/447 (Update VScript sqdbg)
162189

163190
== Contributions from z33ky:
164191
=-- https://github.com/mapbase-source/source-sdk-2013/pull/21 (Various GCC/Linux compilation fixes)
@@ -172,7 +199,10 @@ Direct contributions:
172199
=-- https://github.com/mapbase-source/source-sdk-2013/pull/159 (Additional GCC/Linux compilation fixes)
173200
=-- https://github.com/mapbase-source/source-sdk-2013/pull/162 (VS2019 exception specification fix)
174201
=-- https://github.com/mapbase-source/source-sdk-2013/pull/170 (HL2 non-Episodic build fix)
202+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/320 (Fix ScriptHook_t initialization order)
203+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/321 (Prevent return of dangling Vector/QAngle to VScript)
175204
=-- https://github.com/mapbase-source/source-sdk-2013/pull/322 (Small Mapbase fixes)
205+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/436 (VScript member function call safety)
176206

177207
== Contributions from Petercov:
178208
=-- https://github.com/mapbase-source/source-sdk-2013/pull/182 (NPCs load dynamic interactions from all animation MDLs)
@@ -183,6 +213,7 @@ Direct contributions:
183213
=-- https://github.com/mapbase-source/source-sdk-2013/pull/230 (Caption fixes)
184214
=-- https://github.com/mapbase-source/source-sdk-2013/pull/231 (Sentence source bug fix)
185215
=-- https://github.com/mapbase-source/source-sdk-2013/pull/264 (Outputs for vgui_screen)
216+
=-- https://github.com/mapbase-source/source-sdk-2013/pull/427 (CBaseCombatWeapon::WeaponClassFromString typo fix [committed by vizzys])
186217

187218
//-------------------------------------------------------------------------------------------------------------------------
188219

sp/src/game/client/c_baseanimating.cpp

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,35 +1531,32 @@ float C_BaseAnimating::ClampCycle( float flCycle, bool isLooping )
15311531
//-----------------------------------------------------------------------------
15321532
const Vector& C_BaseAnimating::ScriptGetAttachmentOrigin( int iAttachment )
15331533
{
1534-
15351534
static Vector absOrigin;
1536-
static QAngle qa;
1535+
QAngle qa;
15371536

15381537
C_BaseAnimating::GetAttachment( iAttachment, absOrigin, qa );
15391538

15401539
return absOrigin;
15411540
}
15421541

1543-
const Vector& C_BaseAnimating::ScriptGetAttachmentAngles( int iAttachment )
1542+
const QAngle& C_BaseAnimating::ScriptGetAttachmentAngles( int iAttachment )
15441543
{
1545-
1546-
static Vector absOrigin;
1547-
static Vector absAngles;
15481544
static QAngle qa;
1545+
Vector absOrigin;
15491546

15501547
C_BaseAnimating::GetAttachment( iAttachment, absOrigin, qa );
1551-
absAngles.x = qa.x;
1552-
absAngles.y = qa.y;
1553-
absAngles.z = qa.z;
1554-
return absAngles;
1548+
return qa;
15551549
}
15561550

1557-
HSCRIPT C_BaseAnimating::ScriptGetAttachmentMatrix( int iAttachment )
1551+
HSCRIPT_RC C_BaseAnimating::ScriptGetAttachmentMatrix( int iAttachment )
15581552
{
1559-
static matrix3x4_t matrix;
1553+
matrix3x4_t *matrix = new matrix3x4_t;
1554+
1555+
if ( C_BaseAnimating::GetAttachment( iAttachment, *matrix ) )
1556+
return g_pScriptVM->RegisterInstance( matrix, true );
15601557

1561-
C_BaseAnimating::GetAttachment( iAttachment, matrix );
1562-
return g_pScriptVM->RegisterInstance( &matrix );
1558+
delete matrix;
1559+
return NULL;
15631560
}
15641561

15651562
void C_BaseAnimating::ScriptGetBoneTransform( int iBone, HSCRIPT hTransform )

sp/src/game/client/c_baseanimating.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ class C_BaseAnimating : public C_BaseEntity, private IModelLoadCallback
464464
#ifdef MAPBASE_VSCRIPT
465465
int ScriptLookupAttachment( const char *pAttachmentName ) { return LookupAttachment( pAttachmentName ); }
466466
const Vector& ScriptGetAttachmentOrigin(int iAttachment);
467-
const Vector& ScriptGetAttachmentAngles(int iAttachment);
468-
HSCRIPT ScriptGetAttachmentMatrix(int iAttachment);
467+
const QAngle& ScriptGetAttachmentAngles(int iAttachment);
468+
HSCRIPT_RC ScriptGetAttachmentMatrix(int iAttachment);
469469

470470
void ScriptGetBoneTransform( int iBone, HSCRIPT hTransform );
471471
void ScriptSetBoneTransform( int iBone, HSCRIPT hTransform );

sp/src/game/client/c_basecombatweapon.cpp

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,10 @@ static inline bool ShouldDrawLocalPlayerViewModel( void )
9090
C_BasePlayer *localplayer = C_BasePlayer::GetLocalPlayer();
9191
if (localplayer)
9292
{
93-
if (localplayer->m_bDrawPlayerModelExternally)
93+
if (localplayer->DrawingPlayerModelExternally() && localplayer->InFirstPersonView())
9494
{
9595
// If this isn't the main view, draw the weapon.
96-
view_id_t viewID = CurrentViewID();
97-
if (viewID != VIEW_MAIN && viewID != VIEW_INTRO_CAMERA)
96+
if (!localplayer->InPerspectiveView())
9897
return false;
9998
}
10099

@@ -224,8 +223,16 @@ ShadowType_t C_BaseCombatWeapon::ShadowCastType()
224223
if (!IsBeingCarried())
225224
return SHADOWS_RENDER_TO_TEXTURE;
226225

227-
if (IsCarriedByLocalPlayer() && !C_BasePlayer::ShouldDrawLocalPlayer())
228-
return SHADOWS_NONE;
226+
if (IsCarriedByLocalPlayer())
227+
{
228+
if (!C_BasePlayer::ShouldDrawLocalPlayer())
229+
return SHADOWS_NONE;
230+
231+
#ifdef MAPBASE
232+
if (C_BasePlayer::GetLocalPlayer() && C_BasePlayer::GetLocalPlayer()->ShadowCastType() == SHADOWS_NONE)
233+
return SHADOWS_NONE;
234+
#endif
235+
}
229236

230237
return SHADOWS_RENDER_TO_TEXTURE;
231238
}
@@ -458,7 +465,7 @@ bool C_BaseCombatWeapon::ShouldDraw( void )
458465

459466
#ifdef MAPBASE
460467
// We're drawing this in non-main views, handle it in DrawModel()
461-
if ( pLocalPlayer->m_bDrawPlayerModelExternally )
468+
if ( pLocalPlayer->DrawingPlayerModelExternally() )
462469
return true;
463470
#endif
464471

@@ -511,11 +518,10 @@ int C_BaseCombatWeapon::DrawModel( int flags )
511518
if ( localplayer )
512519
{
513520
#ifdef MAPBASE
514-
if (localplayer->m_bDrawPlayerModelExternally)
521+
if (GetOwner() == localplayer && localplayer->DrawingPlayerModelExternally())
515522
{
516523
// If this isn't the main view, draw the weapon.
517-
view_id_t viewID = CurrentViewID();
518-
if ( (!localplayer->InFirstPersonView() || (viewID != VIEW_MAIN && viewID != VIEW_INTRO_CAMERA)) && (viewID != VIEW_SHADOW_DEPTH_TEXTURE || !localplayer->IsEffectActive(EF_DIMLIGHT)) )
524+
if ( (!localplayer->InPerspectiveView() || !localplayer->InFirstPersonView()) && (CurrentViewID() != VIEW_SHADOW_DEPTH_TEXTURE || !localplayer->IsEffectActive(EF_DIMLIGHT)))
519525
{
520526
// TODO: Is this inefficient?
521527
int nModelIndex = GetModelIndex();
@@ -534,6 +540,10 @@ int C_BaseCombatWeapon::DrawModel( int flags )
534540

535541
return iDraw;
536542
}
543+
else
544+
{
545+
return 0;
546+
}
537547
}
538548
#endif
539549
if ( localplayer->IsObserver() && GetOwner() )
@@ -551,6 +561,24 @@ int C_BaseCombatWeapon::DrawModel( int flags )
551561
return BaseClass::DrawModel( flags );
552562
}
553563

564+
#ifdef MAPBASE
565+
//-----------------------------------------------------------------------------
566+
// Purpose:
567+
//-----------------------------------------------------------------------------
568+
bool C_BaseCombatWeapon::DispatchMuzzleEffect( const char *options, bool isFirstPerson )
569+
{
570+
// Don't show muzzle flashes in first-person
571+
C_BasePlayer *pPlayer = ToBasePlayer( GetOwner() );
572+
if (pPlayer)
573+
{
574+
if (pPlayer->DrawingPlayerModelExternally() && pPlayer->InFirstPersonView())
575+
return false;
576+
}
577+
578+
return BaseClass::DispatchMuzzleEffect( options, isFirstPerson );
579+
}
580+
#endif
581+
554582

555583
//-----------------------------------------------------------------------------
556584
// Allows the client-side entity to override what the network tells it to use for

sp/src/game/client/c_baseentity.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,7 @@ ScriptHook_t C_BaseEntity::g_Hook_UpdateOnRemove;
433433
ScriptHook_t C_BaseEntity::g_Hook_ModifyEmitSoundParams;
434434
#endif
435435

436-
BEGIN_ENT_SCRIPTDESC_ROOT( C_BaseEntity, "Root class of all client-side entities" )
437-
DEFINE_SCRIPT_INSTANCE_HELPER( &g_BaseEntityScriptInstanceHelper )
436+
BEGIN_ENT_SCRIPTDESC_ROOT_WITH_HELPER( C_BaseEntity, "Root class of all client-side entities", &g_BaseEntityScriptInstanceHelper )
438437
DEFINE_SCRIPTFUNC_NAMED( GetAbsOrigin, "GetOrigin", "" )
439438
DEFINE_SCRIPTFUNC_NAMED( ScriptGetForward, "GetForwardVector", "Get the forward vector of the entity" )
440439
#ifdef MAPBASE_VSCRIPT

0 commit comments

Comments
 (0)