Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
843d748
Use CUtlConstString instead of CUtlString
samisalreadytaken Dec 5, 2022
b2699f6
Bump vscript saverestore version
samisalreadytaken Dec 7, 2022
5efb650
Rewrite vscript squirrel saverestore
samisalreadytaken Dec 5, 2022
af6c22e
Use `Assert` instead of `assert`
samisalreadytaken Dec 12, 2022
7525068
Prevent nesting in serialisation of Precache functions
samisalreadytaken Dec 12, 2022
af7c936
Fix vscript squirrel threads
samisalreadytaken Jan 9, 2024
8c0b3f2
Merge remote-tracking branch 'mapbase/master' into vscript-saverestore
samisalreadytaken Jan 16, 2024
5365ad8
Fixed DropStrider input on dropship
Bronzehawk75 Feb 10, 2024
f7c9e3d
Added alert sound to deploy
Bronzehawk75 Feb 11, 2024
4c55da2
Added fail safe in case there's no landing target set
Bronzehawk75 Feb 12, 2024
216ae3f
Dropship now fires proper output when strider dies
Bronzehawk75 Feb 17, 2024
2e5ce55
Clean up code some
Bronzehawk75 Feb 18, 2024
bdfcb4c
Tweaked dropship takeoff time
Bronzehawk75 Feb 18, 2024
0a16eb9
Fix more typos
Bronzehawk75 Feb 18, 2024
e0a1904
Added checks for the strider template
Bronzehawk75 Feb 19, 2024
41becf1
vgui_controls: RichText: restore text selection code from 2007 SDK
SanyaSho Apr 21, 2024
4e7f633
Merge branch 'mapbase-source:develop' into develop
Bronzehawk75 Jun 22, 2024
77f6459
Fix string allocation in SquirrelVM::ReadObject
samisalreadytaken Jun 29, 2024
26346ba
Don't save/restore squirrel class attributes
samisalreadytaken Jun 29, 2024
4a701c8
Rename singleplayer animstate to Mapbase player animstate
Blixibon Aug 10, 2024
309f801
Choreography-driven sentence system
Blixibon Aug 13, 2024
abeb035
Playermodel legs and other player anim improvements
Blixibon Aug 10, 2024
c9dd357
Prevent return of dangling Vector/QAngle to VScript
z33ky Sep 5, 2024
80f1960
"Fix" ScriptVariant_t::Free()
z33ky Sep 6, 2024
879b9e8
Fix dubious ScriptVariant_t Free()'s
z33ky Nov 12, 2024
99858e6
Optimize squirrel function_stub() Vector/QAngle return value
z33ky Sep 7, 2024
fe82da8
Remove unused generic ScriptVariant_t::{Get,AssignTo}()
z33ky Nov 12, 2024
a2e43a5
Fix (potential?) memory leaks from getVariant() (SquirrelVM)
z33ky Nov 12, 2024
cbb60e1
Remove VScript Squrrel arithmetic operator helper
z33ky Nov 18, 2024
c0e12a2
Add type check for script helper assignments from ScriptVariant_t
z33ky Nov 18, 2024
1ecaa44
Release ScriptVariant_t memory in all paths of squirrel function stubs
z33ky Nov 18, 2024
8e8bdfc
Optimize void return in squirrel function call stub
z33ky Nov 18, 2024
7d78384
Fix scriptanimevent_t::SetOption()
z33ky Nov 19, 2024
6297d2b
Fix ScriptHook_t initialization order
z33ky Sep 5, 2024
3aad0f5
Cleanup SquirrelVM saverestore
samisalreadytaken Jun 29, 2024
970887d
NPC memory fixes and VScript expansions
Blixibon Jan 2, 2025
01ad958
Fix ai_enemy_memory_fixes issues in npc_combine_s and npc_strider
Blixibon Jan 12, 2025
d9d877a
Add precache for choreo sentence responses
Blixibon Jan 20, 2025
ffb7286
gitignore-update
Unusuario2 Jan 20, 2025
480d1d4
Improvements to gunship and helicopter crash points
Blixibon Jan 24, 2025
d496494
Remove mistakenly included E:Z2 code
Blixibon Jan 26, 2025
ee75608
HL2 player character switching system
Blixibon Jan 27, 2025
e68b298
Merge pull request #221 from samisalreadytaken/vscript-saverestore
Blixibon Feb 1, 2025
4c9d71f
Merge pull request #320 from z33ky/vscript-hook-delayed-init
Blixibon Feb 1, 2025
ba9cec7
Fix vscript ref counted instances
samisalreadytaken Nov 18, 2024
4e68a35
Fix vscript function parameter leaks
samisalreadytaken Nov 20, 2024
2fd4807
Register CScriptGameTrace accessor script instances only on access
samisalreadytaken Nov 20, 2024
da45be6
Fix ScriptGetAttachmentMatrix/Angles
samisalreadytaken Nov 20, 2024
25addda
Fixed color_correction_volume crash caused by dangling pointers insid…
Nbc66 Feb 5, 2025
f510813
added to vrad "-ultrafast"
Unusuario2 Feb 8, 2025
c236518
Add Squirrel debugger
samisalreadytaken Mar 18, 2024
471ffb4
Merge pull request #381 from Nbc66/develop
Blixibon Feb 8, 2025
91100ea
Merge pull request #293 from SanyaSho/patch/richtext_selection
Blixibon Feb 9, 2025
c0d729d
Merge pull request #360 from Unusuario2/gitignore-update-files
Blixibon Feb 9, 2025
e4c1050
Merge pull request #385 from Unusuario2/vrad-ultrafast-command
Blixibon Feb 9, 2025
c4d6165
added support for "-extrapasses"
Unusuario2 Feb 10, 2025
cf16d32
small fix
Unusuario2 Feb 10, 2025
a7307f2
documented-some-vbsp-options
Unusuario2 Feb 10, 2025
fe42dfb
added viewmodel camera bone
Nbc66 Feb 12, 2025
93d18ed
removed devmsg (it will spam the console)
Nbc66 Feb 12, 2025
2c18919
Add team value, MP fixes, and consolidated macros for protagonist system
Blixibon Feb 12, 2025
68d8811
Fix SetRelationship input not using !activator
Blixibon Jan 24, 2025
c69bad6
Fix VS2013 compile in protagonist system
Blixibon Feb 22, 2025
7cdbbda
Fix VS2013 compile and add minor changes for Mapbase anim state from …
Blixibon Feb 22, 2025
66aed5b
Merge pull request #281 from Bronzehawk75/develop
Blixibon Feb 25, 2025
e8a76a6
Merge pull request #302 from samisalreadytaken/vscript-debugger
Blixibon Feb 25, 2025
a523683
Merge pull request #321 from z33ky/dangling-vscript-vector
Blixibon Feb 25, 2025
cce93d7
Merge branch 'develop' into vscript-leak-fixes
Blixibon Feb 25, 2025
a8283a8
Merge pull request #331 from samisalreadytaken/vscript-leak-fixes
Blixibon Feb 25, 2025
8576fb1
Correct conflict resolution for VScript leak fixes
Blixibon Feb 25, 2025
511ad2e
Fix spacing from previous commit
Blixibon Feb 25, 2025
dccd697
Fix map-specific response system #include paths
Blixibon Jan 24, 2025
8dc9e9a
Fix sprites not obeying view hide flags
Blixibon Jan 24, 2025
dd1a943
Merge pull request #365 from Blixibon/mapbase/feature/heli-crash-impr…
Blixibon Feb 27, 2025
fbb7769
Append followup dispatcher contexts to response followup target
Blixibon Jan 24, 2025
3f64380
Optional npc_helicopter damage and stealth changes
Blixibon Jan 24, 2025
3265f84
Fix suit power HUD checking for actual sprint instead of sprint device
Blixibon Jan 24, 2025
aab8755
Fix prediction not selecting the correct weapon type
Blixibon Feb 22, 2025
0f6b4b4
Integrate registry key fix for using VPC without Visual Studio 2013
Blixibon Jan 12, 2025
fa6d7e4
Merge pull request #317 from Blixibon/mapbase/feature/choreosentences
Blixibon Feb 28, 2025
0efd9a5
Merge pull request #391 from Unusuario2/extrapasses-commandline
Blixibon Feb 28, 2025
92dba94
Merge pull request #393 from Unusuario2/documented-some-vbsp-options
Blixibon Feb 28, 2025
3b43930
Merge pull request #397 from Nbc66/enhancement/viewmodel_camer_bone
Blixibon Feb 28, 2025
fccb3f8
Merge pull request #316 from Blixibon/mapbase/feature/improved-animstate
Blixibon Mar 1, 2025
9efadb7
Merge pull request #337 from Blixibon/mapbase/feature/npc-memory-and-…
Blixibon Mar 1, 2025
496cbe7
New item_battery_custom entity
Blixibon Jan 24, 2025
fde0d4d
Allow pre-existing choreo game_text params to be overridden by VScript
Blixibon Jan 24, 2025
4f6963b
Add PauseAtLastInterrupt input and scene_resume_use_last_speaking cvar
Blixibon Jan 24, 2025
8958925
Fix detail scale in SDK_VertexLitGeneric not working with phong and b…
Blixibon Jan 26, 2025
af66f2b
Fix ropes not being translucent
Blixibon Feb 9, 2025
940745c
Merge branch 'develop' into mapbase/feature/protagonist-system
Blixibon Mar 1, 2025
51afe93
Merge pull request #377 from Blixibon/mapbase/feature/protagonist-system
Blixibon Mar 1, 2025
40b8d39
Update README and Mapbase version
Blixibon Mar 1, 2025
9055a01
Replicate %alphatexture from Gmod
SirYodaJedi Mar 24, 2025
bb20935
VRAD - reduce duplicate %alphatexture searches
SirYodaJedi Mar 25, 2025
10a936f
Fix Lightmappedgeneric and vbsp matrix functions
Zeldaboy14 Mar 31, 2025
ae63cea
Update sqdbg
samisalreadytaken Mar 1, 2025
cf4014a
Don't disconnect vscript debugger if socket couldn't be opened
samisalreadytaken Mar 1, 2025
2b77bae
Add script_connect_debugger_on_mapspawn cvar
samisalreadytaken Mar 3, 2025
93efcbb
Headshot damage multiplier cvar for npc_combine_s (#420)
Wikot235 May 24, 2025
db3d6d1
Added server ragdoll deathpose
May 24, 2025
4194540
Fixed a crash when npc_helicopter that is awaiting input is killed (#…
Wikot235 May 25, 2025
e759fa0
Merge pull request #418 from AnOldLady/master
Blixibon May 26, 2025
c3382cb
Fix GetPropFloatArray indexing on Vector members
samisalreadytaken May 26, 2025
77a9ec6
Merge pull request #411 from samisalreadytaken/vscript-debugger
Blixibon May 30, 2025
4a2751c
Merge pull request #423 from samisalreadytaken/netprops
Blixibon May 30, 2025
2d96837
Merge pull request #414 from Yuis-Archives/alphatexture
Blixibon May 30, 2025
ec55c30
Fix citizen SelectModel VScript hook having issues in save/restore
Blixibon Jan 8, 2025
3d435c6
Improved custom model support on most NPCs
Blixibon May 26, 2025
bd43d3d
typo fix in basecombatweapon_shared.cpp
meatspace May 30, 2025
5dda250
Fix protagonist not being set in CHL2_Player::Spawn()
Blixibon May 30, 2025
db16263
Update README
Blixibon May 30, 2025
cba218f
Merge pull request #415 from Zeldaboy14/master
Blixibon May 31, 2025
f3c9872
Fix missing include in sp/src/utils/vbsp/map.cpp
Blixibon May 31, 2025
13557bf
"-thread" allows negative values.
Unusuario2 Mar 4, 2025
dfc1e01
Update README
Blixibon Jun 2, 2025
985ebc0
Allow NPCs to face targets while parented
Blixibon Feb 9, 2025
cdafc12
game_menu entity and associated CHudMenu changes
Blixibon Feb 13, 2025
ab03538
Update sqdbg
samisalreadytaken Jun 3, 2025
07ab21e
Remove invalid assertions
samisalreadytaken Jun 3, 2025
776c4e7
Fix suspended Squirrel thread and generator save/restore
samisalreadytaken Jun 3, 2025
b431151
Optimise string read in vscript save/restore
samisalreadytaken Jun 8, 2025
c851fc9
Ensure the squirrel instance for native member function call actually…
z33ky Jun 11, 2025
9b8ba3c
Block script_connect_debugger_on_mapspawn on CScriptConvarAccessor
samisalreadytaken Jun 24, 2025
681a75a
Check ScriptClassDesc_t of squirrel instance for native member functi…
z33ky Jun 11, 2025
655679e
Check type of SQVector construction instance
z33ky Jun 23, 2025
ca7bc5d
Guard Squirrel constructor_stub() invocations from invalid class para…
z33ky Jun 23, 2025
9c494b6
fxp streaml
z33ky Jul 1, 2025
9c740a8
Check type of Squirrel constructor_stub() instance
z33ky Jun 23, 2025
503fdd2
Fix SQVector member access check
z33ky Jun 24, 2025
be3ad93
Remove redundant typetag check from vscript_squirrel getVariant()
z33ky Jun 24, 2025
9c38e4e
Remove redundant sq_resetobject() for SquirrelVM::lastError_
z33ky Jun 24, 2025
3301edc
Guard get/set/tostring_stub() against illegal Squirrel instances
z33ky Jun 24, 2025
c659af5
Release SquirrelVM::lastError_ after pushing it to the VM stack
z33ky Jun 24, 2025
69b68fa
Fallback if IScriptInstanceHelper::Get/Set are not implemented
samisalreadytaken Jul 1, 2025
84aaf3b
Mapbase player anim state HL2MP and debug build fixes
Blixibon Jul 7, 2025
834196c
Mapbase protagonist system team and precache fixes
Blixibon Jul 7, 2025
b3d5152
Merge pull request #436 from z33ky/vscript-member-function-call-safety
Blixibon Jul 24, 2025
734130a
Merge pull request #431 from samisalreadytaken/dev
Blixibon Jul 24, 2025
793d8df
Merge pull request #441 from samisalreadytaken/vscript-getset-fallback
Blixibon Jul 24, 2025
8de0119
game_timer entity and HL2 generic timer HUD element
Blixibon Jul 7, 2025
c42f5b6
Update sqdbg
samisalreadytaken Jul 26, 2025
b652c6f
Merge pull request #447 from samisalreadytaken/dev
Blixibon Jul 28, 2025
34fb04f
Updated README
Blixibon Jul 28, 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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ ipch
*.idb
*.vcxproj
*.sln
*.vcxproj.FileListAbsolute.txt
*.pdb

# OSX/Linux build products
*.mak
Expand Down Expand Up @@ -49,6 +51,8 @@ client.dylib.dSYM/
server.dylib
server.dylib.dSYM/

sp/game/bin

# files generated by running a mod
config.cfg

Expand All @@ -61,6 +65,7 @@ config.cfg
*.filters
*.vpc_crc
*.sentinel
*.recipe

# Backup files
*.bak
Expand Down Expand Up @@ -90,4 +95,4 @@ sp/src/vgui2/*.dll
sp/src/vgui2/*.pdb

# Build support files
sp/src/devtools/gcc9+support.o
sp/src/devtools/gcc9+support.o
33 changes: 32 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//=========================================================================================================================

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

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

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.

Expand Down Expand Up @@ -118,25 +119,43 @@ Direct contributions:
- 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/281 (npc_combinedropship DropStrider input by Bronzehawk75)
- 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/293 (Restore text selection code by SanyaSho)
- 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/source-sdk-2013/pull/360 (.gitignore update by Unusuario2)
- https://github.com/mapbase-source/source-sdk-2013/pull/381 (color_correction_volume crash fix by Nbc66)
- https://github.com/mapbase-source/source-sdk-2013/pull/385 (VRAD -ultrafast command by Unusuario2)
- https://github.com/mapbase-source/source-sdk-2013/pull/391 (VRAD -extrapasses command by Unusuario2)
- https://github.com/mapbase-source/source-sdk-2013/pull/393 (Additional VBSP options doc by Unusuario2)
- https://github.com/mapbase-source/source-sdk-2013/pull/397 (Viewmodel camera bone by Nbc66)
- https://github.com/mapbase-source/source-sdk-2013/pull/412 (Compile tool negative threads support by Unusuario2)
- https://github.com/mapbase-source/source-sdk-2013/pull/414 (VRAD %alphatexture by SirYodaJedi)
- https://github.com/mapbase-source/source-sdk-2013/pull/415 (Parallax corrected cubemaps optimization and fix by Zeldaboy14 and White_Red_Dragons)
- https://github.com/mapbase-source/source-sdk-2013/pull/418 (Server ragdoll death poses by AnOldLady)
- https://github.com/mapbase-source/source-sdk-2013/pull/419 (npc_helicopter removal crash fix by Wikot235)
- https://github.com/mapbase-source/source-sdk-2013/pull/420 (sk_combine_head_dmg_multiplier cvar by Wikot235)
- https://github.com/mapbase-source/source-sdk-2013/pull/422 (Expanded HL2 NPC custom model support by Maestra Fenix [committed by Blixibon])
- 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
- npc_barnacle poison zombie crash fix provided by Agrimar
- 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)
- Combine lock hardware on door01_left.mdl created by Kralich (This is asset-based and not reflected in the code)
- npc_vehicledriver fixes provided by CrAzY
- npc_combine cover behavior patches provided by iohnnyboy
- logic_playmovie icon created by URAKOLOUY5 (This is asset-based and not reflected in the code)
- Dropship APC save/load fix provided by Cvoxulary
- c_arms support on HL2 viewmodels by Inaki and ReverendV92 (This is asset-based and not reflected in the code)
- Custom c_arms for HL2 characters by Notewell (This is asset-based and not reflected in the code)

== Contributions from samisalreadytaken:
=-- https://github.com/mapbase-source/source-sdk-2013/pull/47 (VScript utility/consistency changes)
Expand All @@ -154,11 +173,19 @@ Direct contributions:
=-- https://github.com/mapbase-source/source-sdk-2013/pull/192 (VScript hook manager and fixes)
=-- 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/221 (VScript serialization rewrite)
=-- 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/302 (VScript debugger)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/331 (VScript leak fixes)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/332 (Fix OOB access)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/411 (VScript debugger cleanup)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/423 (GetPropFloatArray Vector indexing fix)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/431 (VScript save/restore and debugger fixes)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/441 (VScript instance helper fallback)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/447 (Update VScript sqdbg)

== Contributions from z33ky:
=-- https://github.com/mapbase-source/source-sdk-2013/pull/21 (Various GCC/Linux compilation fixes)
Expand All @@ -172,7 +199,10 @@ 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/320 (Fix ScriptHook_t initialization order)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/321 (Prevent return of dangling Vector/QAngle to VScript)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/322 (Small Mapbase fixes)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/436 (VScript member function call safety)

== Contributions from Petercov:
=-- https://github.com/mapbase-source/source-sdk-2013/pull/182 (NPCs load dynamic interactions from all animation MDLs)
Expand All @@ -183,6 +213,7 @@ Direct contributions:
=-- 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)
=-- https://github.com/mapbase-source/source-sdk-2013/pull/427 (CBaseCombatWeapon::WeaponClassFromString typo fix [committed by vizzys])

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

Expand Down
25 changes: 11 additions & 14 deletions sp/src/game/client/c_baseanimating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1531,35 +1531,32 @@ float C_BaseAnimating::ClampCycle( float flCycle, bool isLooping )
//-----------------------------------------------------------------------------
const Vector& C_BaseAnimating::ScriptGetAttachmentOrigin( int iAttachment )
{

static Vector absOrigin;
static QAngle qa;
QAngle qa;

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

return absOrigin;
}

const Vector& C_BaseAnimating::ScriptGetAttachmentAngles( int iAttachment )
const QAngle& C_BaseAnimating::ScriptGetAttachmentAngles( int iAttachment )
{

static Vector absOrigin;
static Vector absAngles;
static QAngle qa;
Vector absOrigin;

C_BaseAnimating::GetAttachment( iAttachment, absOrigin, qa );
absAngles.x = qa.x;
absAngles.y = qa.y;
absAngles.z = qa.z;
return absAngles;
return qa;
}

HSCRIPT C_BaseAnimating::ScriptGetAttachmentMatrix( int iAttachment )
HSCRIPT_RC C_BaseAnimating::ScriptGetAttachmentMatrix( int iAttachment )
{
static matrix3x4_t matrix;
matrix3x4_t *matrix = new matrix3x4_t;

if ( C_BaseAnimating::GetAttachment( iAttachment, *matrix ) )
return g_pScriptVM->RegisterInstance( matrix, true );

C_BaseAnimating::GetAttachment( iAttachment, matrix );
return g_pScriptVM->RegisterInstance( &matrix );
delete matrix;
return NULL;
}

void C_BaseAnimating::ScriptGetBoneTransform( int iBone, HSCRIPT hTransform )
Expand Down
4 changes: 2 additions & 2 deletions sp/src/game/client/c_baseanimating.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ class C_BaseAnimating : public C_BaseEntity, private IModelLoadCallback
#ifdef MAPBASE_VSCRIPT
int ScriptLookupAttachment( const char *pAttachmentName ) { return LookupAttachment( pAttachmentName ); }
const Vector& ScriptGetAttachmentOrigin(int iAttachment);
const Vector& ScriptGetAttachmentAngles(int iAttachment);
HSCRIPT ScriptGetAttachmentMatrix(int iAttachment);
const QAngle& ScriptGetAttachmentAngles(int iAttachment);
HSCRIPT_RC ScriptGetAttachmentMatrix(int iAttachment);

void ScriptGetBoneTransform( int iBone, HSCRIPT hTransform );
void ScriptSetBoneTransform( int iBone, HSCRIPT hTransform );
Expand Down
46 changes: 37 additions & 9 deletions sp/src/game/client/c_basecombatweapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,10 @@ static inline bool ShouldDrawLocalPlayerViewModel( void )
C_BasePlayer *localplayer = C_BasePlayer::GetLocalPlayer();
if (localplayer)
{
if (localplayer->m_bDrawPlayerModelExternally)
if (localplayer->DrawingPlayerModelExternally() && localplayer->InFirstPersonView())
{
// If this isn't the main view, draw the weapon.
view_id_t viewID = CurrentViewID();
if (viewID != VIEW_MAIN && viewID != VIEW_INTRO_CAMERA)
if (!localplayer->InPerspectiveView())
return false;
}

Expand Down Expand Up @@ -224,8 +223,16 @@ ShadowType_t C_BaseCombatWeapon::ShadowCastType()
if (!IsBeingCarried())
return SHADOWS_RENDER_TO_TEXTURE;

if (IsCarriedByLocalPlayer() && !C_BasePlayer::ShouldDrawLocalPlayer())
return SHADOWS_NONE;
if (IsCarriedByLocalPlayer())
{
if (!C_BasePlayer::ShouldDrawLocalPlayer())
return SHADOWS_NONE;

#ifdef MAPBASE
if (C_BasePlayer::GetLocalPlayer() && C_BasePlayer::GetLocalPlayer()->ShadowCastType() == SHADOWS_NONE)
return SHADOWS_NONE;
#endif
}

return SHADOWS_RENDER_TO_TEXTURE;
}
Expand Down Expand Up @@ -458,7 +465,7 @@ bool C_BaseCombatWeapon::ShouldDraw( void )

#ifdef MAPBASE
// We're drawing this in non-main views, handle it in DrawModel()
if ( pLocalPlayer->m_bDrawPlayerModelExternally )
if ( pLocalPlayer->DrawingPlayerModelExternally() )
return true;
#endif

Expand Down Expand Up @@ -511,11 +518,10 @@ int C_BaseCombatWeapon::DrawModel( int flags )
if ( localplayer )
{
#ifdef MAPBASE
if (localplayer->m_bDrawPlayerModelExternally)
if (GetOwner() == localplayer && localplayer->DrawingPlayerModelExternally())
{
// If this isn't the main view, draw the weapon.
view_id_t viewID = CurrentViewID();
if ( (!localplayer->InFirstPersonView() || (viewID != VIEW_MAIN && viewID != VIEW_INTRO_CAMERA)) && (viewID != VIEW_SHADOW_DEPTH_TEXTURE || !localplayer->IsEffectActive(EF_DIMLIGHT)) )
if ( (!localplayer->InPerspectiveView() || !localplayer->InFirstPersonView()) && (CurrentViewID() != VIEW_SHADOW_DEPTH_TEXTURE || !localplayer->IsEffectActive(EF_DIMLIGHT)))
{
// TODO: Is this inefficient?
int nModelIndex = GetModelIndex();
Expand All @@ -534,6 +540,10 @@ int C_BaseCombatWeapon::DrawModel( int flags )

return iDraw;
}
else
{
return 0;
}
}
#endif
if ( localplayer->IsObserver() && GetOwner() )
Expand All @@ -551,6 +561,24 @@ int C_BaseCombatWeapon::DrawModel( int flags )
return BaseClass::DrawModel( flags );
}

#ifdef MAPBASE
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool C_BaseCombatWeapon::DispatchMuzzleEffect( const char *options, bool isFirstPerson )
{
// Don't show muzzle flashes in first-person
C_BasePlayer *pPlayer = ToBasePlayer( GetOwner() );
if (pPlayer)
{
if (pPlayer->DrawingPlayerModelExternally() && pPlayer->InFirstPersonView())
return false;
}

return BaseClass::DispatchMuzzleEffect( options, isFirstPerson );
}
#endif


//-----------------------------------------------------------------------------
// Allows the client-side entity to override what the network tells it to use for
Expand Down
3 changes: 1 addition & 2 deletions sp/src/game/client/c_baseentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,7 @@ ScriptHook_t C_BaseEntity::g_Hook_UpdateOnRemove;
ScriptHook_t C_BaseEntity::g_Hook_ModifyEmitSoundParams;
#endif

BEGIN_ENT_SCRIPTDESC_ROOT( C_BaseEntity, "Root class of all client-side entities" )
DEFINE_SCRIPT_INSTANCE_HELPER( &g_BaseEntityScriptInstanceHelper )
BEGIN_ENT_SCRIPTDESC_ROOT_WITH_HELPER( C_BaseEntity, "Root class of all client-side entities", &g_BaseEntityScriptInstanceHelper )
DEFINE_SCRIPTFUNC_NAMED( GetAbsOrigin, "GetOrigin", "" )
DEFINE_SCRIPTFUNC_NAMED( ScriptGetForward, "GetForwardVector", "Get the forward vector of the entity" )
#ifdef MAPBASE_VSCRIPT
Expand Down
Loading