Skip to content

Commit 81b76b9

Browse files
Update sqdbg_definitions.nut
1 parent 3ba3a0c commit 81b76b9

1 file changed

Lines changed: 173 additions & 18 deletions

File tree

VPKs/shared_content_v7_0/scripts/vscripts/sqdbg_definitions.nut

Lines changed: 173 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,88 @@
11

2+
local format = format;
3+
local tmp = { name = null }
4+
25
foreach ( key, val in this )
36
{
47
if ( typeof val == "class" )
58
{
6-
sqdbg_define_class( val, { name = key } );
9+
tmp.name = key;
10+
sqdbg_define_class( val, tmp );
711
}
812
}
913

10-
local GetNetPropString = function( key ) { return ::NetProps.GetPropString( this, key ); }
14+
local GetNetPropString = function( key ) { return ::NetProps.GetPropString( this, key ); }
1115
local SetNetPropString = function( key, val ) { return ::NetProps.SetPropString( this, key, val ); }
12-
local GetNetPropInt = function( key ) { return ::NetProps.GetPropInt( this, key ); }
13-
local SetNetPropInt = function( key, val ) { return ::NetProps.SetPropInt( this, key, val ); }
14-
local GetNetPropFloat = function( key ) { return ::NetProps.GetPropFloat( this, key ); }
15-
local SetNetPropFloat = function( key, val ) { return ::NetProps.SetPropFloat( this, key, val ); }
16-
local GetNetPropVector = function( key ) { return ::NetProps.GetPropVector( this, key ); }
16+
local GetNetPropInt = function( key ) { return ::NetProps.GetPropInt ( this, key ); }
17+
local SetNetPropInt = function( key, val ) { return ::NetProps.SetPropInt ( this, key, val ); }
18+
local GetNetPropFloat = function( key ) { return ::NetProps.GetPropFloat ( this, key ); }
19+
local SetNetPropFloat = function( key, val ) { return ::NetProps.SetPropFloat ( this, key, val ); }
20+
local GetNetPropVector = function( key ) { return ::NetProps.GetPropVector( this, key ); }
1721
local SetNetPropVector = function( key, val ) { return ::NetProps.SetPropVector( this, key, val ); }
18-
local GetNetPropEntity = function( key ) { return ::NetProps.GetPropEntity( this, key ); }
22+
local GetNetPropEntity = function( key ) { return ::NetProps.GetPropEntity( this, key ); }
1923
local SetNetPropEntity = function( key, val ) { return ::NetProps.SetPropEntity( this, key, val ); }
2024

25+
local CArrayAccessor = class
26+
{
27+
// Implementation note:
28+
// Native array elements are going to be listed as custom members of this accessor class.
29+
// Indicate to the debugger that this class is going to have non-string
30+
// members by having existing member names to be escaped
31+
// so that custom number members are evaluated as numbers.
32+
["members\0"] = null;
33+
count = 0;
34+
type = "";
35+
ent = null;
36+
key = null;
37+
iget = null;
38+
iset = null;
39+
40+
constructor ( ent, key, type, count = 0 )
41+
{
42+
this.ent = ent;
43+
this.key = key;
44+
this.type = type;
45+
local maxcount = ::NetProps.GetPropArraySize( ent, key );
46+
if ( count < maxcount )
47+
count = maxcount;
48+
this.count = count;
49+
iget = format("GetProp%sArray", type);
50+
iset = format("SetProp%sArray", type);
51+
local arr = this["members\0"] = ::array( count );
52+
foreach ( i, v in arr )
53+
arr[i] = { name = i, get = get, set = set };
54+
}
55+
56+
get = function( i ) { return ::NetProps[iget]( ent, key, i ); }
57+
set = function( i, v ) { return ::NetProps[iset]( ent, key, v, i ); }
58+
}
59+
60+
CArrayAccessor._get <- CArrayAccessor.get;
61+
CArrayAccessor._set <- CArrayAccessor.set;
62+
63+
sqdbg_define_class( CArrayAccessor,
64+
{
65+
name = "CArrayAccessor",
66+
value = function() { return format("%s[%d]", type, count); },
67+
custommembers = function() { return this["members\0"]; },
68+
} );
69+
70+
local GetNetPropEntityArray = function( key ) { return CArrayAccessor( this, key, "Entity" ); }
71+
2172
if ( SERVER_DLL )
2273
{
2374
local baseentity_custommembers =
2475
[
2576
{ name = "m_vecOrigin", get = GetNetPropVector, set = SetNetPropVector },
77+
// To be able to add data breakpoints on Vector or array elements,
78+
// define indices as members
79+
/*
80+
{
81+
name = "m_vecOrigin[2]",
82+
get = function() { return ::NetProps.GetPropFloatArray( this, "m_vecOrigin", 2 ); },
83+
set = function( val ) { return ::NetProps.SetPropFloatArray( this, "m_vecOrigin", val, 2 ); }
84+
},
85+
*/
2686
{ name = "m_angRotation", get = GetNetPropVector, set = SetNetPropVector },
2787
{ name = "m_vecAbsOrigin", get = GetNetPropVector, set = SetNetPropVector },
2888
{ name = "m_angAbsRotation", get = GetNetPropVector, set = SetNetPropVector },
@@ -66,7 +126,10 @@ if ( SERVER_DLL )
66126
{ name = "m_Collision.m_nSolidType", get = GetNetPropInt, set = SetNetPropInt },
67127
{ name = "m_Collision.m_usSolidFlags", get = GetNetPropInt, set = SetNetPropInt },
68128
{ name = "m_Collision.m_nSurroundType", get = GetNetPropInt, set = SetNetPropInt },
129+
{ name = "m_Collision.m_flRadius", get = GetNetPropFloat, set = SetNetPropFloat },
69130
{ name = "m_Collision.m_triggerBloat", get = GetNetPropInt, set = SetNetPropInt },
131+
{ name = "m_Collision.m_vecSurroundingMins", get = GetNetPropVector, set = SetNetPropVector },
132+
{ name = "m_Collision.m_vecSurroundingMaxs", get = GetNetPropVector, set = SetNetPropVector },
70133
{ name = "m_Collision.m_vecSpecifiedSurroundingMinsPreScaled", get = GetNetPropVector, set = SetNetPropVector },
71134
{ name = "m_Collision.m_vecSpecifiedSurroundingMaxsPreScaled", get = GetNetPropVector, set = SetNetPropVector },
72135
{ name = "m_Collision.m_vecSpecifiedSurroundingMins", get = GetNetPropVector, set = SetNetPropVector },
@@ -76,6 +139,7 @@ if ( SERVER_DLL )
76139
local baseanimating_custommembers = (clone baseentity_custommembers).extend(
77140
[
78141
{ name = "m_flGroundSpeed", get = GetNetPropFloat, set = SetNetPropFloat },
142+
{ name = "m_flLastEventCheck", get = GetNetPropFloat, set = SetNetPropFloat },
79143
{ name = "m_nSequence", get = GetNetPropInt, set = SetNetPropInt },
80144
{ name = "m_bSequenceFinished", get = GetNetPropInt, set = SetNetPropInt },
81145
{ name = "m_bSequenceLoops", get = GetNetPropInt, set = SetNetPropInt },
@@ -86,15 +150,19 @@ if ( SERVER_DLL )
86150
{ name = "m_flCycle", get = GetNetPropFloat, set = SetNetPropFloat },
87151
{ name = "m_hLightingOrigin", get = GetNetPropEntity, set = SetNetPropEntity },
88152
{ name = "m_hLightingOriginRelative", get = GetNetPropEntity, set = SetNetPropEntity },
153+
{ name = "m_flFadeScale", get = GetNetPropFloat, set = SetNetPropFloat },
89154
]);
90155

91156
local basecombatcharacter_custommembers = (clone baseanimating_custommembers).extend(
92157
[
93158
{ name = "m_flNextAttack", get = GetNetPropFloat, set = SetNetPropFloat },
94159
{ name = "m_flFieldOfView", get = GetNetPropFloat, set = SetNetPropFloat },
95160
{ name = "m_LastHitGroup", get = GetNetPropInt, set = SetNetPropInt },
161+
{ name = "m_flDamageAccumulator", get = GetNetPropFloat, set = SetNetPropFloat },
96162
{ name = "m_CurrentWeaponProficiency", get = GetNetPropInt, set = SetNetPropInt },
97163
{ name = "m_hActiveWeapon", get = GetNetPropEntity, set = SetNetPropEntity },
164+
{ name = "m_bPreventWeaponPickup", get = GetNetPropInt, set = SetNetPropInt },
165+
{ name = "m_hMyWeapons", get = GetNetPropEntityArray },
98166
]);
99167

100168
local player_custommembers = (clone basecombatcharacter_custommembers).extend(
@@ -109,7 +177,6 @@ if ( SERVER_DLL )
109177
{ name = "m_afButtonForced", get = GetNetPropInt, set = SetNetPropInt },
110178
{ name = "m_flStepSoundTime", get = GetNetPropFloat, set = SetNetPropFloat },
111179
{ name = "m_flSwimSoundTime", get = GetNetPropFloat, set = SetNetPropFloat },
112-
{ name = "m_surfaceFriction", get = GetNetPropFloat, set = SetNetPropFloat },
113180
{ name = "m_iFOV", get = GetNetPropInt, set = SetNetPropInt },
114181
{ name = "m_iFOVStart", get = GetNetPropInt, set = SetNetPropInt },
115182
{ name = "m_flFOVTime", get = GetNetPropFloat, set = SetNetPropFloat },
@@ -163,6 +230,7 @@ if ( SERVER_DLL )
163230
},
164231
{ name = "m_hPostProcessCtrl", get = GetNetPropEntity, set = SetNetPropEntity },
165232
{ name = "m_hColorCorrectionCtrl", get = GetNetPropEntity, set = SetNetPropEntity },
233+
{ name = "m_hLocatorTargetEntity", get = GetNetPropEntity, set = SetNetPropEntity },
166234
{ name = "pl.v_angle", get = GetNetPropVector, set = SetNetPropVector },
167235
{ name = "m_Local.m_iHideHUD", get = GetNetPropInt, set = SetNetPropInt },
168236
{ name = "m_Local.m_flFOVRate", get = GetNetPropFloat, set = SetNetPropFloat },
@@ -218,6 +286,14 @@ if ( SERVER_DLL )
218286
{ name = "m_Local.m_TonemapParams.m_flBloomScale", get = GetNetPropFloat, set = SetNetPropFloat },
219287
{ name = "m_Local.m_TonemapParams.m_flAutoExposureMin", get = GetNetPropFloat, set = SetNetPropFloat },
220288
{ name = "m_Local.m_TonemapParams.m_flAutoExposureMax", get = GetNetPropFloat, set = SetNetPropFloat },
289+
{ name = "m_Local.m_audio.localSound[0]", get = GetNetPropVector, set = SetNetPropVector },
290+
{ name = "m_Local.m_audio.localSound[1]", get = GetNetPropVector, set = SetNetPropVector },
291+
{ name = "m_Local.m_audio.localSound[2]", get = GetNetPropVector, set = SetNetPropVector },
292+
{ name = "m_Local.m_audio.localSound[3]", get = GetNetPropVector, set = SetNetPropVector },
293+
{ name = "m_Local.m_audio.localSound[4]", get = GetNetPropVector, set = SetNetPropVector },
294+
{ name = "m_Local.m_audio.localSound[5]", get = GetNetPropVector, set = SetNetPropVector },
295+
{ name = "m_Local.m_audio.localSound[6]", get = GetNetPropVector, set = SetNetPropVector },
296+
{ name = "m_Local.m_audio.localSound[7]", get = GetNetPropVector, set = SetNetPropVector },
221297
{ name = "m_Local.m_audio.soundscapeIndex", get = GetNetPropInt, set = SetNetPropInt },
222298
{ name = "m_Local.m_audio.localBits", get = GetNetPropInt, set = SetNetPropInt },
223299
{ name = "m_Local.m_audio.ent", get = GetNetPropEntity, set = SetNetPropEntity },
@@ -252,6 +328,14 @@ if ( SERVER_DLL )
252328
{ name = "m_LowerWeaponTimer.m_next", get = GetNetPropFloat, set = SetNetPropFloat },
253329
]);
254330

331+
local basecombatweapon_custommembers = (clone baseanimating_custommembers).extend(
332+
[
333+
{ name = "m_iViewModelIndex", get = GetNetPropInt, set = SetNetPropInt },
334+
{ name = "LocalActiveWeaponData.m_flNextPrimaryAttack", get = GetNetPropFloat, set = SetNetPropFloat },
335+
{ name = "LocalActiveWeaponData.m_flNextSecondaryAttack", get = GetNetPropFloat, set = SetNetPropFloat },
336+
{ name = "LocalActiveWeaponData.m_flTimeWeaponIdle", get = GetNetPropFloat, set = SetNetPropFloat },
337+
]);
338+
255339
sqdbg_define_class( CBaseEntity,
256340
{
257341
value = CBaseEntity.tostring,
@@ -273,6 +357,11 @@ if ( SERVER_DLL )
273357
custommembers = player_custommembers
274358
} );
275359

360+
sqdbg_define_class( CBaseCombatWeapon,
361+
{
362+
custommembers = basecombatweapon_custommembers
363+
} );
364+
276365
sqdbg_define_class( IPhysicsObject,
277366
{
278367
value = IPhysicsObject.GetName,
@@ -352,7 +441,7 @@ else if ( CLIENT_DLL )
352441
{ name = "m_iTextureFrameIndex", get = GetNetPropInt, set = SetNetPropInt },
353442
{ name = "m_nRenderMode", get = GetNetPropInt, set = SetNetPropInt },
354443
{ name = "m_nRenderFX", get = GetNetPropInt, set = SetNetPropInt },
355-
{ name = "m_fEffects", get = GetNetPropInt, set = SetNetPropInt },
444+
{ name = "m_fEffects", get = C_BaseEntity.GetEffects, set = C_BaseEntity.SetEffects },
356445
{ name = "m_fFlags", get = GetNetPropInt, set = SetNetPropInt },
357446
{ name = "m_iEFlags", get = GetNetPropInt, set = SetNetPropInt },
358447
{ name = "m_clrRender", get = GetNetPropInt, set = SetNetPropInt },
@@ -365,7 +454,7 @@ else if ( CLIENT_DLL )
365454
{ name = "m_flShadowCastDistance", get = GetNetPropFloat, set = SetNetPropFloat },
366455
{ name = "m_hOwnerEntity", get = GetNetPropEntity, set = SetNetPropEntity },
367456
{ name = "m_hEffectEntity", get = GetNetPropEntity, set = SetNetPropEntity },
368-
{ name = "m_hMoveParent", get = GetNetPropEntity },
457+
{ name = "m_hMoveParent", get = C_BaseEntity.GetMoveParent },
369458
{ name = "m_hNetworkMoveParent", get = GetNetPropEntity },
370459
{ name = "m_iParentAttachment", get = GetNetPropInt },
371460
{ name = "m_MoveType", get = GetNetPropInt, set = SetNetPropInt },
@@ -378,7 +467,7 @@ else if ( CLIENT_DLL )
378467
{ name = "m_Collision.m_vecMaxs", get = GetNetPropVector, set = SetNetPropVector },
379468
{ name = "m_Collision.m_nSolidType", get = GetNetPropInt, set = SetNetPropInt },
380469
{ name = "m_Collision.m_usSolidFlags", get = GetNetPropInt, set = SetNetPropInt },
381-
{ name = "m_Collision.m_nSurroundType", get = GetNetPropInt, set = SetNetPropInt },
470+
//{ name = "m_Collision.m_nSurroundType", get = GetNetPropInt, set = SetNetPropInt },
382471
{ name = "m_Collision.m_triggerBloat", get = GetNetPropInt, set = SetNetPropInt },
383472
{ name = "m_Collision.m_vecSpecifiedSurroundingMinsPreScaled", get = GetNetPropVector, set = SetNetPropVector },
384473
{ name = "m_Collision.m_vecSpecifiedSurroundingMaxsPreScaled", get = GetNetPropVector, set = SetNetPropVector },
@@ -472,6 +561,14 @@ else if ( CLIENT_DLL )
472561
{ name = "m_Local.m_TonemapParams.m_flBloomScale", get = GetNetPropFloat, set = SetNetPropFloat },
473562
{ name = "m_Local.m_TonemapParams.m_flAutoExposureMin", get = GetNetPropFloat, set = SetNetPropFloat },
474563
{ name = "m_Local.m_TonemapParams.m_flAutoExposureMax", get = GetNetPropFloat, set = SetNetPropFloat },
564+
{ name = "m_Local.m_audio.localSound[0]", get = GetNetPropVector, set = SetNetPropVector },
565+
{ name = "m_Local.m_audio.localSound[1]", get = GetNetPropVector, set = SetNetPropVector },
566+
{ name = "m_Local.m_audio.localSound[2]", get = GetNetPropVector, set = SetNetPropVector },
567+
{ name = "m_Local.m_audio.localSound[3]", get = GetNetPropVector, set = SetNetPropVector },
568+
{ name = "m_Local.m_audio.localSound[4]", get = GetNetPropVector, set = SetNetPropVector },
569+
{ name = "m_Local.m_audio.localSound[5]", get = GetNetPropVector, set = SetNetPropVector },
570+
{ name = "m_Local.m_audio.localSound[6]", get = GetNetPropVector, set = SetNetPropVector },
571+
{ name = "m_Local.m_audio.localSound[7]", get = GetNetPropVector, set = SetNetPropVector },
475572
{ name = "m_Local.m_audio.soundscapeIndex", get = GetNetPropInt, set = SetNetPropInt },
476573
{ name = "m_Local.m_audio.localBits", get = GetNetPropInt, set = SetNetPropInt },
477574
{ name = "m_Local.m_audio.ent", get = GetNetPropEntity, set = SetNetPropEntity },
@@ -518,14 +615,20 @@ else if ( CLIENT_DLL )
518615
{
519616
value = function()
520617
{
521-
return ::format( "(%s) %d %d %d %d", GetName(), GetXPos(), GetYPos(), GetWide(), GetTall() );
618+
return format( "(%s) %d %d %d %d", GetName(), GetXPos(), GetYPos(), GetWide(), GetTall() );
522619
}
523620
} );
524621
}
525622

526623
sqdbg_define_class( Vector,
527624
{
528-
value = Vector.ToKVString,
625+
value = function()
626+
{
627+
local FLT_MAX = 3.40282347e+38;
628+
if ( x == FLT_MAX && y == FLT_MAX && z == FLT_MAX )
629+
return "vec3_invalid";
630+
return ToKVString();
631+
},
529632
metamembers = [ "x", "y", "z" ]
530633
} );
531634

@@ -536,8 +639,8 @@ sqdbg_define_class( CGameTrace,
536639
{
537640
local ent = Entity();
538641
if ( ent )
539-
return ::format( "%f, %s", Fraction(), ""+ent );
540-
return ::format( "%f", Fraction() );
642+
return format( "%f, %s", Fraction(), ""+ent );
643+
return format( "%f", Fraction() );
541644
},
542645
custommembers =
543646
[
@@ -552,9 +655,56 @@ sqdbg_define_class( CGameTrace,
552655
]
553656
} );
554657

658+
sqdbg_define_class( CTakeDamageInfo,
659+
{
660+
value = function() { return "m_flDamage = " + GetDamage(); },
661+
custommembers =
662+
[
663+
{ name = "m_vecDamageForce", get = CTakeDamageInfo.GetDamageForce, set = CTakeDamageInfo.SetDamageForce },
664+
{ name = "m_vecDamagePosition", get = CTakeDamageInfo.GetDamagePosition, set = CTakeDamageInfo.SetDamagePosition },
665+
{ name = "m_vecReportedPosition", get = CTakeDamageInfo.GetReportedPosition, set = CTakeDamageInfo.SetReportedPosition },
666+
{ name = "m_hInflictor", get = CTakeDamageInfo.GetInflictor, set = CTakeDamageInfo.SetInflictor },
667+
{ name = "m_hAttacker", get = CTakeDamageInfo.GetAttacker, set = CTakeDamageInfo.SetAttacker },
668+
{ name = "m_hWeapon", get = CTakeDamageInfo.GetWeapon, set = CTakeDamageInfo.SetWeapon },
669+
{ name = "m_flDamage", get = CTakeDamageInfo.GetDamage, set = CTakeDamageInfo.SetDamage },
670+
{ name = "m_flMaxDamage", get = CTakeDamageInfo.GetMaxDamage, set = CTakeDamageInfo.SetMaxDamage },
671+
{ name = "m_flBaseDamage", get = CTakeDamageInfo.GetBaseDamage, set = SetNetPropFloat },
672+
{ name = "m_flDamageBonus", get = CTakeDamageInfo.GetDamageBonus, set = CTakeDamageInfo.SetDamageBonus },
673+
{ name = "m_bitsDamageType", get = CTakeDamageInfo.GetDamageType, set = CTakeDamageInfo.SetDamageType },
674+
{ name = "m_iDamageCustom", get = CTakeDamageInfo.GetDamageCustom, set = CTakeDamageInfo.SetDamageCustom },
675+
{ name = "m_iDamageStats", get = CTakeDamageInfo.GetDamageStats, set = CTakeDamageInfo.SetDamageStats },
676+
{ name = "m_iAmmoType", get = CTakeDamageInfo.GetAmmoType, set = CTakeDamageInfo.SetAmmoType },
677+
{ name = "m_iDamagedOtherPlayers", get = CTakeDamageInfo.GetDamagedOtherPlayers, set = CTakeDamageInfo.SetDamagedOtherPlayers },
678+
{ name = "m_iPlayerPenetrationCount", get = CTakeDamageInfo.GetPlayerPenetrationCount, set = CTakeDamageInfo.SetPlayerPenetrationCount },
679+
{ name = "m_bForceFriendlyFire", get = CTakeDamageInfo.IsForceFriendlyFire, set = CTakeDamageInfo.SetForceFriendlyFire },
680+
]
681+
} );
682+
683+
sqdbg_define_class( FireBulletsInfo_t,
684+
{
685+
value = function() { return "m_flDamage = " + GetDamage(); },
686+
custommembers =
687+
[
688+
{ name = "m_iShots", get = FireBulletsInfo_t.GetShots, set = FireBulletsInfo_t.SetShots },
689+
{ name = "m_vecSrc", get = FireBulletsInfo_t.GetSource, set = FireBulletsInfo_t.SetSource },
690+
{ name = "m_vecDirShooting", get = FireBulletsInfo_t.GetDirShooting, set = FireBulletsInfo_t.SetDirShooting },
691+
{ name = "m_vecSpread", get = FireBulletsInfo_t.GetSpread, set = FireBulletsInfo_t.SetSpread },
692+
{ name = "m_flDistance", get = FireBulletsInfo_t.GetDistance, set = FireBulletsInfo_t.SetDistance },
693+
{ name = "m_iAmmoType", get = FireBulletsInfo_t.GetAmmoType, set = FireBulletsInfo_t.SetAmmoType },
694+
{ name = "m_iTracerFreq", get = FireBulletsInfo_t.GetTracerFreq, set = FireBulletsInfo_t.SetTracerFreq },
695+
{ name = "m_flDamage", get = FireBulletsInfo_t.GetDamage, set = FireBulletsInfo_t.SetDamage },
696+
{ name = "m_iPlayerDamage", get = FireBulletsInfo_t.GetPlayerDamage, set = FireBulletsInfo_t.SetPlayerDamage },
697+
{ name = "m_nFlags", get = FireBulletsInfo_t.GetFlags, set = FireBulletsInfo_t.SetFlags },
698+
{ name = "m_flDamageForceScale", get = FireBulletsInfo_t.GetDamageForceScale, set = FireBulletsInfo_t.SetDamageForceScale },
699+
{ name = "m_pAttacker", get = FireBulletsInfo_t.GetAttacker, set = FireBulletsInfo_t.SetAttacker },
700+
{ name = "m_pAdditionalIgnoreEnt", get = FireBulletsInfo_t.GetAdditionalIgnoreEnt, set = FireBulletsInfo_t.SetAdditionalIgnoreEnt },
701+
{ name = "m_bPrimaryAttack", get = FireBulletsInfo_t.GetPrimaryAttack, set = FireBulletsInfo_t.SetPrimaryAttack },
702+
]
703+
} );
704+
555705
sqdbg_define_class( cplane_t,
556706
{
557-
value = function() { return ::format( "[%s], %f", normal.ToKVString(), dist ); },
707+
value = function() { return format( "[%s] %f", normal.ToKVString(), dist ); },
558708
metamembers = [ "normal", "dist" ]
559709
} );
560710

@@ -598,9 +748,14 @@ sqdbg_define_class( EmitSound_t,
598748
{ name = "m_flVolume", get = EmitSound_t.GetVolume, set = EmitSound_t.SetVolume },
599749
{ name = "m_SoundLevel", get = EmitSound_t.GetSoundLevel, set = EmitSound_t.SetSoundLevel },
600750
{ name = "m_nFlags", get = EmitSound_t.GetFlags, set = EmitSound_t.SetFlags },
751+
{ name = "m_nPitch", get = EmitSound_t.GetPitch, set = EmitSound_t.SetPitch },
601752
{ name = "m_nSpecialDSP", get = EmitSound_t.GetSpecialDSP, set = EmitSound_t.SetSpecialDSP },
602753
{ name = "m_flSoundTime", get = EmitSound_t.GetSoundTime, set = EmitSound_t.SetSoundTime },
603-
{ name = "m_pOrigin", get = EmitSound_t.GetOrigin, set = EmitSound_t.SetOrigin },
754+
{
755+
name = "m_pOrigin",
756+
get = function() { if ( HasOrigin() ) return GetOrigin(); },
757+
set = EmitSound_t.SetOrigin
758+
},
604759
]
605760
} );
606761

0 commit comments

Comments
 (0)