mirror of
https://github.com/roflmuffin/CounterStrikeSharp.git
synced 2025-12-07 00:16:36 -08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce3ff449b9 | ||
|
|
aa40d81a86 | ||
|
|
5644921873 | ||
|
|
3860ca1662 | ||
|
|
b79fd19c85 | ||
|
|
b7ea025b03 | ||
|
|
5ac173df51 | ||
|
|
c82a58f5ab | ||
|
|
1806919559 |
21
.github/workflows/actionlint.yaml
vendored
Normal file
21
.github/workflows/actionlint.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: actionlint
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- ".github/actions/**"
|
||||
- ".github/workflows/**"
|
||||
|
||||
jobs:
|
||||
actionlint:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 3
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: actionlint
|
||||
uses: reviewdog/action-actionlint@v1
|
||||
with:
|
||||
reporter: github-pr-review
|
||||
fail_on_error: true
|
||||
@@ -9,7 +9,7 @@
|
||||
"ClientPrint": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 85 C9 0F 84 ? ? ? ? 48 8B C4 48 89 58 18",
|
||||
"windows": "48 85 C9 0F 84 ? ? ? ? 48 89 5C 24 ? 55",
|
||||
"linux": "55 48 89 E5 41 57 49 89 CF 41 56 49 89 D6 41 55 41 89 F5 41 54 4C 8D A5 A0 FE FF FF"
|
||||
}
|
||||
},
|
||||
@@ -84,8 +84,8 @@
|
||||
"CCSPlayer_WeaponServices_CanUse": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "48 89 5C 24 10 48 89 6C 24 18 56 57 41 56 48 83 EC 30 80 B9 A0 00 00 00 00",
|
||||
"linux": "48 85 F6 0F 84 ? ? ? ? 55 31 C9 48 89 E5 41 55 49 89 FD"
|
||||
"windows": "48 89 5C 24 10 48 89 6C 24 18 56 57 41 56 48 83 EC 30 48 8B 01",
|
||||
"linux": "55 48 8D 15 ? ? ? ? 48 89 E5 41 55 49 89 FD 41 54 49 89 F4"
|
||||
}
|
||||
},
|
||||
"CCSPlayer_ItemServices_GiveNamedItem": {
|
||||
@@ -197,7 +197,7 @@
|
||||
"StateChanged": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "40 55 53 56 41 55 41 57 48 8D 6C 24 B0",
|
||||
"windows": "40 ? 53 56 41 ? 41 ? 48 ? ? ? ? 48 ? ? ? ? ? ? 48 ? ? 45",
|
||||
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 53 89 D3"
|
||||
}
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,320 +0,0 @@
|
||||
ActionType_t
|
||||
AimMatrixBlendMode
|
||||
AmmoFlags_t
|
||||
AmmoPosition_t
|
||||
AnimationProcessingType_t
|
||||
AnimationSnapshotType_t
|
||||
AnimationType_t
|
||||
AnimLoopMode_t
|
||||
AnimNodeNetworkMode
|
||||
AnimParamButton_t
|
||||
AnimParamNetworkSetting
|
||||
AnimParamType_t
|
||||
AnimPoseControl
|
||||
AnimScriptType
|
||||
AnimValueSource
|
||||
AnimVectorSource
|
||||
attributeprovidertypes_t
|
||||
BaseExplosionTypes_t
|
||||
BBoxVolumeType_t
|
||||
BeamClipStyle_t
|
||||
BeamType_t
|
||||
BeginDeathLifeStateTransition_t
|
||||
BinaryNodeChildOption
|
||||
BinaryNodeTiming
|
||||
Blend2DMode
|
||||
BlendKeyType
|
||||
BloomBlendMode_t
|
||||
BlurFilterType_t
|
||||
BoneMaskBlendSpace
|
||||
BoneTransformSpace_t
|
||||
BrushSolidities_e
|
||||
C4LightEffect_t
|
||||
CAnimationGraphVisualizerPrimitiveType
|
||||
CanPlaySequence_t
|
||||
ChatIgnoreType_t
|
||||
ChickenActivity
|
||||
ChoiceBlendMethod
|
||||
ChoiceChangeMethod
|
||||
ChoiceMethod
|
||||
Class_T
|
||||
CLogicBranchList__LogicBranchListenerLastState_t
|
||||
ClosestPointTestType_t
|
||||
CNmBoneMask__WeightInfo_t
|
||||
CommandEntitySpecType_t
|
||||
CommandExecMode_t
|
||||
CompMatPropertyMutatorConditionType_t
|
||||
CompMatPropertyMutatorType_t
|
||||
CompositeMaterialInputContainerSourceType_t
|
||||
CompositeMaterialInputLooseVariableType_t
|
||||
CompositeMaterialInputTextureType_t
|
||||
CompositeMaterialMatchFilterType_t
|
||||
CompositeMaterialVarSystemVar_t
|
||||
CRR_Response__ResponseEnum_t
|
||||
CSPlayerBlockingUseAction_t
|
||||
CSPlayerState
|
||||
CSWeaponCategory
|
||||
CSWeaponMode
|
||||
CSWeaponSilencerType
|
||||
CSWeaponState_t
|
||||
CSWeaponType
|
||||
DamageTypes_t
|
||||
DampingSpeedFunction
|
||||
DebugOverlayBits_t
|
||||
Detail2Combo_t
|
||||
DetailCombo_t
|
||||
DisableShadows_t
|
||||
Disposition_t
|
||||
doorCheck_e
|
||||
DoorState_t
|
||||
EDemoBoneSelectionMode
|
||||
EInButtonState
|
||||
EKillTypes_t
|
||||
ELayoutNodeType
|
||||
EntFinderMethod_t
|
||||
EntityDisolveType_t
|
||||
EntityDormancyType_t
|
||||
EntityIOTargetType_t
|
||||
EntitySubclassScope_t
|
||||
EOverrideBlockLOS_t
|
||||
EStyleNodeType
|
||||
Explosions
|
||||
FacingMode
|
||||
FieldNetworkOption
|
||||
fieldtype_t
|
||||
filter_t
|
||||
FixAngleSet_t
|
||||
FlexOpCode_t
|
||||
FootFallTagFoot_t
|
||||
FootLockSubVisualization
|
||||
FootPinningTimingSource
|
||||
FootstepLandedFootSoundType_t
|
||||
ForcedCrouchState_t
|
||||
FuncDoorSpawnPos_t
|
||||
FuseVariableAccess_t
|
||||
FuseVariableType_t
|
||||
GameAnimEventIndex_t
|
||||
gear_slot_t
|
||||
GrenadeType_t
|
||||
HierarchyType_t
|
||||
HitboxLerpType_t
|
||||
HitGroup_t
|
||||
HorizJustification_e
|
||||
Hull_t
|
||||
IChoreoServices__ChoreoState_t
|
||||
IChoreoServices__ScriptState_t
|
||||
IKChannelMode
|
||||
IkEndEffectorType
|
||||
IKSolverType
|
||||
IKTargetCoordinateSystem
|
||||
IKTargetSource
|
||||
IkTargetType
|
||||
InheritableBoolType_t
|
||||
InputBitMask_t
|
||||
InputLayoutVariation_t
|
||||
ItemFlagTypes_t
|
||||
JiggleBoneSimSpace
|
||||
JointAxis_t
|
||||
JointMotion_t
|
||||
JumpCorrectionMethod
|
||||
LatchDirtyPermission_t
|
||||
LayoutPositionType_e
|
||||
LessonPanelLayoutFileTypes_t
|
||||
LifeState_t
|
||||
loadout_slot_t
|
||||
MaterialProxyType_t
|
||||
Materials
|
||||
MatterialAttributeTagType_t
|
||||
MedalRank_t
|
||||
MeshDrawPrimitiveFlags_t
|
||||
MissingParentInheritBehavior_t
|
||||
ModelBoneFlexComponent_t
|
||||
ModelConfigAttachmentType_t
|
||||
ModelSkeletonData_t__BoneFlags_t
|
||||
ModifyDamageReturn_t
|
||||
MoodType_t
|
||||
MorphBundleType_t
|
||||
MorphFlexControllerRemapType_t
|
||||
MoveCollide_t
|
||||
MoveLinearAuthoredPos_t
|
||||
MovementGait_t
|
||||
MoveMountingAmount_t
|
||||
MoveType_t
|
||||
NavAttributeEnum
|
||||
NavDirType
|
||||
navproperties_t
|
||||
NmFootPhase_t
|
||||
NmFootPhaseCondition_t
|
||||
NmFrameSnapEventMode_t
|
||||
NmTransitionRule_t
|
||||
NmTransitionRuleCondition_t
|
||||
NPCFollowFormation_t
|
||||
NPCLookType_t
|
||||
ObjectTypeFlags_t
|
||||
ObserverInterpState_t
|
||||
ObserverMode_t
|
||||
OnFrame
|
||||
ParticleAlphaReferenceType_t
|
||||
ParticleAttachment_t
|
||||
ParticleAttrBoxFlags_t
|
||||
ParticleCollisionMode_t
|
||||
ParticleColorBlendMode_t
|
||||
ParticleColorBlendType_t
|
||||
ParticleControlPointAxis_t
|
||||
ParticleDepthFeatheringMode_t
|
||||
ParticleDetailLevel_t
|
||||
ParticleDirectionNoiseType_t
|
||||
ParticleEndcapMode_t
|
||||
ParticleFalloffFunction_t
|
||||
ParticleFloatBiasType_t
|
||||
ParticleFloatInputMode_t
|
||||
ParticleFloatMapType_t
|
||||
ParticleFloatRandomMode_t
|
||||
ParticleFloatType_t
|
||||
ParticleFogType_t
|
||||
ParticleHitboxBiasType_t
|
||||
ParticleHitboxDataSelection_t
|
||||
ParticleImpulseType_t
|
||||
ParticleLightBehaviorChoiceList_t
|
||||
ParticleLightFogLightingMode_t
|
||||
ParticleLightingQuality_t
|
||||
ParticleLightnintBranchBehavior_t
|
||||
ParticleLightTypeChoiceList_t
|
||||
ParticleLightUnitChoiceList_t
|
||||
ParticleModelType_t
|
||||
ParticleOmni2LightTypeChoiceList_t
|
||||
ParticleOrientationChoiceList_t
|
||||
ParticleOrientationSetMode_t
|
||||
ParticleOutputBlendMode_t
|
||||
ParticleParentSetMode_t
|
||||
ParticlePinDistance_t
|
||||
ParticlePostProcessPriorityGroup_t
|
||||
ParticleRotationLockType_t
|
||||
ParticleSelection_t
|
||||
ParticleSequenceCropOverride_t
|
||||
ParticleSetMethod_t
|
||||
ParticleSortingChoiceList_t
|
||||
ParticleTextureLayerBlendType_t
|
||||
ParticleTopology_t
|
||||
ParticleTraceMissBehavior_t
|
||||
ParticleTraceSet_t
|
||||
ParticleTransformType_t
|
||||
ParticleVecType_t
|
||||
ParticleVRHandChoiceList_t
|
||||
PerformanceMode_t
|
||||
PermModelInfo_t__FlagEnum
|
||||
PetGroundType_t
|
||||
PFNoiseModifier_t
|
||||
PFNoiseTurbulence_t
|
||||
PFNoiseType_t
|
||||
PFuncVisualizationType_t
|
||||
PlayerAnimEvent_t
|
||||
PlayerConnectedState
|
||||
PointTemplateClientOnlyEntityBehavior_t
|
||||
PointTemplateOwnerSpawnGroupType_t
|
||||
PointWorldTextJustifyHorizontal_t
|
||||
PointWorldTextJustifyVertical_t
|
||||
PointWorldTextReorientMode_t
|
||||
PoseType_t
|
||||
PreviewCharacterMode
|
||||
PreviewEOMCelebration
|
||||
PreviewWeaponState
|
||||
PropDoorRotatingOpenDirection_e
|
||||
PropDoorRotatingSpawnPos_t
|
||||
PulseCursorCancelPriority_t
|
||||
PulseCursorExecResult_t
|
||||
PulseInstructionCode_t
|
||||
PulseMethodCallMode_t
|
||||
PulseTestEnumColor_t
|
||||
PulseTestEnumShape_t
|
||||
PulseValueType_t
|
||||
QuestProgress__Reason
|
||||
RagdollPoseControl
|
||||
RenderBufferFlags_t
|
||||
RenderFx_t
|
||||
RenderMode_t
|
||||
RenderMultisampleType_t
|
||||
RenderPrimitiveType_t
|
||||
RenderSlotType_t
|
||||
ResetCycleOption
|
||||
RumbleEffect_t
|
||||
ScalarExpressionType_t
|
||||
SceneOnPlayerDeath_t
|
||||
ScriptedConflictResponse_t
|
||||
ScriptedMoveTo_t
|
||||
ScriptedMoveType_t
|
||||
ScriptedOnDeath_t
|
||||
SelectorTagBehavior_t
|
||||
SeqCmd_t
|
||||
SeqPoseSetting_t
|
||||
SequenceFinishNotifyState_t
|
||||
ShadowType_t
|
||||
ShakeCommand_t
|
||||
ShardSolid_t
|
||||
ShatterDamageCause
|
||||
ShatterGlassStressType
|
||||
ShatterPanelMode
|
||||
SimpleConstraintSoundProfile__SimpleConstraintsSoundProfileKeypoints_t
|
||||
SnapshotIndexType_t
|
||||
SolidType_t
|
||||
SolveIKChainAnimNodeDebugSetting
|
||||
SosActionSortType_t
|
||||
SosActionStopType_t
|
||||
SosEditItemType_t
|
||||
SosGroupType_t
|
||||
SoundEventStartType_t
|
||||
SoundFlags_t
|
||||
soundlevel_t
|
||||
SpawnDebugOverrideState_t
|
||||
SpawnDebugRestrictionOverrideState_t
|
||||
SpawnPointCoopEnemy__BotDefaultBehavior_t
|
||||
SpriteCardPerParticleScale_t
|
||||
SpriteCardShaderType_t
|
||||
SpriteCardTextureChannel_t
|
||||
SpriteCardTextureType_t
|
||||
StanceOverrideMode
|
||||
StanceType_t
|
||||
StandardLightingAttenuationStyle_t
|
||||
StateActionBehavior
|
||||
StepPhase
|
||||
SubclassVDataChangeType_t
|
||||
SurroundingBoundsType_t
|
||||
TakeDamageFlags_t
|
||||
TextureRepetitionMode_t
|
||||
ThreeState_t
|
||||
TimelineCompression_t
|
||||
TOGGLE_STATE
|
||||
Touch_t
|
||||
TrackOrientationType_t
|
||||
TRAIN_CODE
|
||||
TrainOrientationType_t
|
||||
TrainVelocityType_t
|
||||
ValueRemapperHapticsType_t
|
||||
ValueRemapperInputType_t
|
||||
ValueRemapperMomentumType_t
|
||||
ValueRemapperOutputType_t
|
||||
ValueRemapperRatchetType_t
|
||||
VectorExpressionType_t
|
||||
VectorFloatExpressionType_t
|
||||
VelocityMetricMode
|
||||
VertJustification_e
|
||||
ViewFadeMode_t
|
||||
VMixChannelOperation_t
|
||||
VMixFilterSlope_t
|
||||
VMixFilterType_t
|
||||
VMixLFOShape_t
|
||||
VMixPannerType_t
|
||||
VMixProcessorType_t
|
||||
VMixSubgraphSwitchInterpolationType_t
|
||||
vote_create_failed_t
|
||||
VPhysXAggregateData_t__VPhysXFlagEnum_t
|
||||
VPhysXBodyPart_t__VPhysXFlagEnum_t
|
||||
VPhysXConstraintParams_t__EnumFlags0_t
|
||||
VPhysXJoint_t__Flags_t
|
||||
WaterLevel_t
|
||||
WeaponAttackType_t
|
||||
WeaponSound_t
|
||||
WeaponSwitchReason_t
|
||||
WorldTextPanelHorizontalAlign_t
|
||||
WorldTextPanelOrientation_t
|
||||
WorldTextPanelVerticalAlign_t
|
||||
Submodule libraries/hl2sdk-cs2 updated: 4b31db7505...c57d5ab398
@@ -156,17 +156,10 @@ namespace CounterStrikeSharp.API.Core
|
||||
break;
|
||||
}
|
||||
|
||||
// If our arugment doesn't end in ".dll" - try and construct a path similar to PluginName/PluginName.dll.
|
||||
// If our argument doesn't end in ".dll" - try and construct a path similar to PluginName/PluginName.dll.
|
||||
// We'll assume we have a full path if we have ".dll".
|
||||
var path = info.GetArg(2);
|
||||
if (!path.EndsWith(".dll"))
|
||||
{
|
||||
path = Path.Combine(_scriptHostConfiguration.RootPath, $"plugins/{path}/{path}.dll");
|
||||
}
|
||||
else
|
||||
{
|
||||
path = Path.Combine(_scriptHostConfiguration.RootPath, path);
|
||||
}
|
||||
path = Path.Combine(_scriptHostConfiguration.RootPath, !path.EndsWith(".dll") ? $"plugins/{path}/{path}.dll" : path);
|
||||
|
||||
var plugin = _pluginContextQueryHandler.FindPluginByModulePath(path);
|
||||
|
||||
@@ -204,7 +197,13 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
|
||||
var pluginIdentifier = info.GetArg(2);
|
||||
IPluginContext? plugin = _pluginContextQueryHandler.FindPluginByIdOrName(pluginIdentifier);
|
||||
string path;
|
||||
path = Path.Combine(_scriptHostConfiguration.RootPath,
|
||||
!pluginIdentifier.EndsWith(".dll") ? $"plugins/{pluginIdentifier}/{pluginIdentifier}.dll" : pluginIdentifier);
|
||||
|
||||
var plugin = _pluginContextQueryHandler.FindPluginByIdOrName(pluginIdentifier)
|
||||
?? _pluginContextQueryHandler.FindPluginByModulePath(path);
|
||||
|
||||
if (plugin == null)
|
||||
{
|
||||
info.ReplyToCommand($"Could not unload plugin \"{pluginIdentifier}\"");
|
||||
@@ -249,7 +248,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnLangCommand(CCSPlayerController? player, CommandInfo command)
|
||||
{
|
||||
if (player == null) return;
|
||||
@@ -305,4 +304,4 @@ namespace CounterStrikeSharp.API.Core
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -716,6 +716,86 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
[EventName("bullet_damage")]
|
||||
public class EventBulletDamage : GameEvent
|
||||
{
|
||||
public EventBulletDamage(IntPtr pointer) : base(pointer){}
|
||||
public EventBulletDamage(bool force) : base("bullet_damage", force){}
|
||||
|
||||
|
||||
|
||||
// player index who was hurt
|
||||
public CCSPlayerController? Victim
|
||||
{
|
||||
get => GetPlayer("victim");
|
||||
set => SetPlayer("victim", value);
|
||||
}
|
||||
|
||||
|
||||
// player index who attacked
|
||||
public CCSPlayerController? Attacker
|
||||
{
|
||||
get => GetPlayer("attacker");
|
||||
set => SetPlayer("attacker", value);
|
||||
}
|
||||
|
||||
|
||||
// how far the bullet travelled before it hit the player
|
||||
public float Distance
|
||||
{
|
||||
get => Get<float>("distance");
|
||||
set => Set<float>("distance", value);
|
||||
}
|
||||
|
||||
|
||||
// direction vector of the bullet
|
||||
public float DamageDirX
|
||||
{
|
||||
get => Get<float>("damage_dir_x");
|
||||
set => Set<float>("damage_dir_x", value);
|
||||
}
|
||||
|
||||
|
||||
// direction vector of the bullet
|
||||
public float DamageDirY
|
||||
{
|
||||
get => Get<float>("damage_dir_y");
|
||||
set => Set<float>("damage_dir_y", value);
|
||||
}
|
||||
|
||||
|
||||
// direction vector of the bullet
|
||||
public float DamageDirZ
|
||||
{
|
||||
get => Get<float>("damage_dir_z");
|
||||
set => Set<float>("damage_dir_z", value);
|
||||
}
|
||||
|
||||
|
||||
// how many surfaces were penetrated
|
||||
public int NumPenetrations
|
||||
{
|
||||
get => Get<int>("num_penetrations");
|
||||
set => Set<int>("num_penetrations", value);
|
||||
}
|
||||
|
||||
|
||||
// was the shooter noscoped?
|
||||
public bool NoScope
|
||||
{
|
||||
get => Get<bool>("no_scope");
|
||||
set => Set<bool>("no_scope", value);
|
||||
}
|
||||
|
||||
|
||||
// was the shooter jumping?
|
||||
public bool InAir
|
||||
{
|
||||
get => Get<bool>("in_air");
|
||||
set => Set<bool>("in_air", value);
|
||||
}
|
||||
}
|
||||
|
||||
[EventName("bullet_flight_resolution")]
|
||||
public class EventBulletFlightResolution : GameEvent
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ public partial class CBaseAnimGraphController : CSkeletonAnimationController
|
||||
|
||||
// m_flPlaybackRate
|
||||
[SchemaMember("CBaseAnimGraphController", "m_flPlaybackRate")]
|
||||
public float PlaybackRate => Schema.GetDeclaredClass<float>(this.Handle, "CBaseAnimGraphController", "m_flPlaybackRate");
|
||||
public ref float PlaybackRate => ref Schema.GetRef<float>(this.Handle, "CBaseAnimGraphController", "m_flPlaybackRate");
|
||||
|
||||
// m_nNotifyState
|
||||
[SchemaMember("CBaseAnimGraphController", "m_nNotifyState")]
|
||||
|
||||
@@ -94,14 +94,6 @@ public partial class CBasePlayerController : CBaseEntity
|
||||
[SchemaMember("CBasePlayerController", "m_bGamePaused")]
|
||||
public ref bool GamePaused => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bGamePaused");
|
||||
|
||||
// m_nLastRealCommandNumberExecuted
|
||||
[SchemaMember("CBasePlayerController", "m_nLastRealCommandNumberExecuted")]
|
||||
public ref Int32 LastRealCommandNumberExecuted => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerController", "m_nLastRealCommandNumberExecuted");
|
||||
|
||||
// m_nLastLateCommandExecuted
|
||||
[SchemaMember("CBasePlayerController", "m_nLastLateCommandExecuted")]
|
||||
public ref Int32 LastLateCommandExecuted => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerController", "m_nLastLateCommandExecuted");
|
||||
|
||||
// m_iIgnoreGlobalChat
|
||||
[SchemaMember("CBasePlayerController", "m_iIgnoreGlobalChat")]
|
||||
public ref ChatIgnoreType_t IgnoreGlobalChat => ref Schema.GetRef<ChatIgnoreType_t>(this.Handle, "CBasePlayerController", "m_iIgnoreGlobalChat");
|
||||
|
||||
@@ -370,10 +370,6 @@ public partial class CCSPlayerPawn : CCSPlayerPawnBase
|
||||
[SchemaMember("CCSPlayerPawn", "m_ignoreLadderJumpTime")]
|
||||
public ref float IgnoreLadderJumpTime => ref Schema.GetRef<float>(this.Handle, "CCSPlayerPawn", "m_ignoreLadderJumpTime");
|
||||
|
||||
// m_NumEnemiesKilledThisRound
|
||||
[SchemaMember("CCSPlayerPawn", "m_NumEnemiesKilledThisRound")]
|
||||
public ref Int32 NumEnemiesKilledThisRound => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawn", "m_NumEnemiesKilledThisRound");
|
||||
|
||||
// m_bKilledByHeadshot
|
||||
[SchemaMember("CCSPlayerPawn", "m_bKilledByHeadshot")]
|
||||
public ref bool KilledByHeadshot => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawn", "m_bKilledByHeadshot");
|
||||
|
||||
@@ -94,10 +94,6 @@ public partial class CCSPlayerPawnBase : CBasePlayerPawn
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_angEyeAngles")]
|
||||
public QAngle EyeAngles => Schema.GetDeclaredClass<QAngle>(this.Handle, "CCSPlayerPawnBase", "m_angEyeAngles");
|
||||
|
||||
// m_NumEnemiesAtRoundStart
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_NumEnemiesAtRoundStart")]
|
||||
public ref Int32 NumEnemiesAtRoundStart => ref Schema.GetRef<Int32>(this.Handle, "CCSPlayerPawnBase", "m_NumEnemiesAtRoundStart");
|
||||
|
||||
// m_wasNotKilledNaturally
|
||||
[SchemaMember("CCSPlayerPawnBase", "m_wasNotKilledNaturally")]
|
||||
public ref bool WasNotKilledNaturally => ref Schema.GetRef<bool>(this.Handle, "CCSPlayerPawnBase", "m_wasNotKilledNaturally");
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// <auto-generated />
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using CounterStrikeSharp;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CCSWeaponBaseVDataAPI : NativeObject
|
||||
{
|
||||
public CCSWeaponBaseVDataAPI (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
@@ -36,14 +36,14 @@ public partial class CNetworkOriginCellCoordQuantizedVector : NativeObject
|
||||
|
||||
// m_vecX
|
||||
[SchemaMember("CNetworkOriginCellCoordQuantizedVector", "m_vecX")]
|
||||
public float X => Schema.GetDeclaredClass<float>(this.Handle, "CNetworkOriginCellCoordQuantizedVector", "m_vecX");
|
||||
public ref float X => ref Schema.GetRef<float>(this.Handle, "CNetworkOriginCellCoordQuantizedVector", "m_vecX");
|
||||
|
||||
// m_vecY
|
||||
[SchemaMember("CNetworkOriginCellCoordQuantizedVector", "m_vecY")]
|
||||
public float Y => Schema.GetDeclaredClass<float>(this.Handle, "CNetworkOriginCellCoordQuantizedVector", "m_vecY");
|
||||
public ref float Y => ref Schema.GetRef<float>(this.Handle, "CNetworkOriginCellCoordQuantizedVector", "m_vecY");
|
||||
|
||||
// m_vecZ
|
||||
[SchemaMember("CNetworkOriginCellCoordQuantizedVector", "m_vecZ")]
|
||||
public float Z => Schema.GetDeclaredClass<float>(this.Handle, "CNetworkOriginCellCoordQuantizedVector", "m_vecZ");
|
||||
public ref float Z => ref Schema.GetRef<float>(this.Handle, "CNetworkOriginCellCoordQuantizedVector", "m_vecZ");
|
||||
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ public partial class CNetworkVelocityVector : NativeObject
|
||||
|
||||
// m_vecX
|
||||
[SchemaMember("CNetworkVelocityVector", "m_vecX")]
|
||||
public float X => Schema.GetDeclaredClass<float>(this.Handle, "CNetworkVelocityVector", "m_vecX");
|
||||
public ref float X => ref Schema.GetRef<float>(this.Handle, "CNetworkVelocityVector", "m_vecX");
|
||||
|
||||
// m_vecY
|
||||
[SchemaMember("CNetworkVelocityVector", "m_vecY")]
|
||||
public float Y => Schema.GetDeclaredClass<float>(this.Handle, "CNetworkVelocityVector", "m_vecY");
|
||||
public ref float Y => ref Schema.GetRef<float>(this.Handle, "CNetworkVelocityVector", "m_vecY");
|
||||
|
||||
// m_vecZ
|
||||
[SchemaMember("CNetworkVelocityVector", "m_vecZ")]
|
||||
public float Z => Schema.GetDeclaredClass<float>(this.Handle, "CNetworkVelocityVector", "m_vecZ");
|
||||
public ref float Z => ref Schema.GetRef<float>(this.Handle, "CNetworkVelocityVector", "m_vecZ");
|
||||
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ public partial class CNetworkViewOffsetVector : NativeObject
|
||||
|
||||
// m_vecX
|
||||
[SchemaMember("CNetworkViewOffsetVector", "m_vecX")]
|
||||
public float X => Schema.GetDeclaredClass<float>(this.Handle, "CNetworkViewOffsetVector", "m_vecX");
|
||||
public ref float X => ref Schema.GetRef<float>(this.Handle, "CNetworkViewOffsetVector", "m_vecX");
|
||||
|
||||
// m_vecY
|
||||
[SchemaMember("CNetworkViewOffsetVector", "m_vecY")]
|
||||
public float Y => Schema.GetDeclaredClass<float>(this.Handle, "CNetworkViewOffsetVector", "m_vecY");
|
||||
public ref float Y => ref Schema.GetRef<float>(this.Handle, "CNetworkViewOffsetVector", "m_vecY");
|
||||
|
||||
// m_vecZ
|
||||
[SchemaMember("CNetworkViewOffsetVector", "m_vecZ")]
|
||||
public float Z => Schema.GetDeclaredClass<float>(this.Handle, "CNetworkViewOffsetVector", "m_vecZ");
|
||||
public ref float Z => ref Schema.GetRef<float>(this.Handle, "CNetworkViewOffsetVector", "m_vecZ");
|
||||
|
||||
}
|
||||
|
||||
@@ -50,4 +50,8 @@ public partial class CSmokeGrenadeProjectile : CBaseCSGrenadeProjectile
|
||||
[SchemaMember("CSmokeGrenadeProjectile", "m_fllastSimulationTime")]
|
||||
public ref float FllastSimulationTime => ref Schema.GetRef<float>(this.Handle, "CSmokeGrenadeProjectile", "m_fllastSimulationTime");
|
||||
|
||||
// m_bExplodeFromInferno
|
||||
[SchemaMember("CSmokeGrenadeProjectile", "m_bExplodeFromInferno")]
|
||||
public ref bool ExplodeFromInferno => ref Schema.GetRef<bool>(this.Handle, "CSmokeGrenadeProjectile", "m_bExplodeFromInferno");
|
||||
|
||||
}
|
||||
|
||||
@@ -12,15 +12,9 @@ public enum BloodType : uint
|
||||
ColorRed = 0x0,
|
||||
ColorYellow = 0x1,
|
||||
ColorGreen = 0x2,
|
||||
ColorBrightGreen = 0x3,
|
||||
EntityMech = 0x4,
|
||||
EntityAntlion = 0x5,
|
||||
EntityZombie = 0x6,
|
||||
EntityBlob = 0x7,
|
||||
EntityBlobFrozen = 0x8,
|
||||
ColorRedLVL2 = 0x9,
|
||||
ColorRedLVL3 = 0xA,
|
||||
ColorRedLVL4 = 0xB,
|
||||
ColorRedLVL5 = 0xC,
|
||||
ColorRedLVL6 = 0xD,
|
||||
ColorRedLVL2 = 0x3,
|
||||
ColorRedLVL3 = 0x4,
|
||||
ColorRedLVL4 = 0x5,
|
||||
ColorRedLVL5 = 0x6,
|
||||
ColorRedLVL6 = 0x7,
|
||||
}
|
||||
|
||||
@@ -17,4 +17,5 @@ public enum PreviewCharacterMode : uint
|
||||
WALKING = 0x6,
|
||||
TEAM_INTRO = 0x7,
|
||||
WINGMAN_INTRO = 0x8,
|
||||
BANNER = 0x9,
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@ public record SchemaFieldType
|
||||
this.Atomic = Atomic;
|
||||
this.Inner = Inner;
|
||||
|
||||
if (this.Name == "GameTime_t")
|
||||
if (this.Name == "GameTime_t" || this.Name == "CNetworkedQuantizedFloat")
|
||||
{
|
||||
this.Category = SchemaTypeCategory.Builtin;
|
||||
this.Name = "float32";
|
||||
@@ -99,7 +99,8 @@ public record SchemaFieldType
|
||||
{
|
||||
SchemaTypeCategory.Builtin => BuiltinToCsKeyword(Name),
|
||||
SchemaTypeCategory.Ptr => IsString
|
||||
? "string" : $"{Inner!.CsTypeName}?",
|
||||
? "string"
|
||||
: $"{Inner!.CsTypeName}?",
|
||||
SchemaTypeCategory.FixedArray => IsString
|
||||
? "string"
|
||||
: $"{Inner!.CsTypeName}[]",
|
||||
|
||||
@@ -35,7 +35,12 @@
|
||||
#include "pch.h"
|
||||
#include "dynohook/core.h"
|
||||
#include "dynohook/manager.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "dynohook/conventions/x64/x64MsFastcall.h"
|
||||
#else
|
||||
#include "dynohook/conventions/x64/x64SystemVcall.h"
|
||||
#endif
|
||||
|
||||
namespace counterstrikesharp {
|
||||
|
||||
@@ -275,8 +280,11 @@ void ValveFunction::AddHook(CallbackT callable, bool post)
|
||||
{
|
||||
dyno::HookManager& manager = dyno::HookManager::Get();
|
||||
dyno::Hook* hook = manager.hook((void*)m_ulAddr, [this] {
|
||||
return new dyno::x64SystemVcall(ConvertArgsToDynoHook(m_Args),
|
||||
static_cast<dyno::DataType>(this->m_eReturnType));
|
||||
#ifdef _WIN32
|
||||
return new dyno::x64MsFastcall(ConvertArgsToDynoHook(m_Args), static_cast<dyno::DataType>(this->m_eReturnType));
|
||||
#else
|
||||
return new dyno::x64SystemVcall(ConvertArgsToDynoHook(m_Args), static_cast<dyno::DataType>(this->m_eReturnType));
|
||||
#endif
|
||||
});
|
||||
g_HookMap[hook] = this;
|
||||
hook->addCallback(dyno::HookType::Post, (dyno::HookHandler*)&HookHandler);
|
||||
@@ -297,8 +305,11 @@ void ValveFunction::AddHook(CallbackT callable, bool post)
|
||||
void ValveFunction::RemoveHook(CallbackT callable, bool post) {
|
||||
dyno::HookManager& manager = dyno::HookManager::Get();
|
||||
dyno::Hook* hook = manager.hook((void*)m_ulAddr, [this] {
|
||||
return new dyno::x64SystemVcall(ConvertArgsToDynoHook(m_Args),
|
||||
static_cast<dyno::DataType>(this->m_eReturnType));
|
||||
#ifdef _WIN32
|
||||
return new dyno::x64MsFastcall(ConvertArgsToDynoHook(m_Args), static_cast<dyno::DataType>(this->m_eReturnType));
|
||||
#else
|
||||
return new dyno::x64SystemVcall(ConvertArgsToDynoHook(m_Args), static_cast<dyno::DataType>(this->m_eReturnType));
|
||||
#endif
|
||||
});
|
||||
g_HookMap[hook] = this;
|
||||
|
||||
@@ -313,4 +324,4 @@ void ValveFunction::RemoveHook(CallbackT callable, bool post) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace counterstrikesharp
|
||||
} // namespace counterstrikesharp
|
||||
|
||||
@@ -95,44 +95,47 @@ json WriteTypeJson(json obj, CSchemaType* current_type)
|
||||
|
||||
CON_COMMAND(dump_schema, "dump schema symbols")
|
||||
{
|
||||
std::vector<std::string> classNames;
|
||||
std::vector<std::string> enumNames;
|
||||
// Reading these from a static file since I cannot seem to get the
|
||||
// CSchemaSystemTypeScope->GetClasses() to return anything on linux.
|
||||
std::ifstream inputClasses(utils::GamedataDirectory() + "/schema_classes.txt");
|
||||
std::ifstream inputEnums(utils::GamedataDirectory() + "/schema_enums.txt");
|
||||
std::ofstream output(utils::GamedataDirectory() + "/schema.json");
|
||||
std::string line;
|
||||
|
||||
while (std::getline(inputClasses, line))
|
||||
{
|
||||
if (!line.empty() && line.back() == '\r')
|
||||
{
|
||||
line.pop_back();
|
||||
}
|
||||
classNames.push_back(line);
|
||||
}
|
||||
|
||||
while (std::getline(inputEnums, line))
|
||||
{
|
||||
if (!line.empty() && line.back() == '\r')
|
||||
{
|
||||
line.pop_back();
|
||||
}
|
||||
enumNames.push_back(line);
|
||||
}
|
||||
|
||||
CSchemaSystemTypeScope* pType = globals::schemaSystem->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT);
|
||||
|
||||
auto index = pType->m_DeclaredClasses.m_Map.FirstInorder();
|
||||
std::vector<CSchemaClassInfo*> classes;
|
||||
do
|
||||
{
|
||||
classes.push_back(pType->m_DeclaredClasses.m_Map.Element(index)->m_pClassInfo);
|
||||
index = pType->m_DeclaredClasses.m_Map.NextInorder(index);
|
||||
} while (index != pType->m_DeclaredClasses.m_Map.InvalidIndex());
|
||||
|
||||
index = pType->m_DeclaredEnums.m_Map.FirstInorder();
|
||||
std::vector<CSchemaEnumInfo*> enums;
|
||||
do
|
||||
{
|
||||
enums.push_back(pType->m_DeclaredEnums.m_Map.Element(index)->m_pEnumInfo);
|
||||
index = pType->m_DeclaredEnums.m_Map.NextInorder(index);
|
||||
} while (index != pType->m_DeclaredEnums.m_Map.InvalidIndex());
|
||||
|
||||
pType = globals::schemaSystem->GlobalTypeScope();
|
||||
index = pType->m_DeclaredClasses.m_Map.FirstInorder();
|
||||
do
|
||||
{
|
||||
classes.push_back(pType->m_DeclaredClasses.m_Map.Element(index)->m_pClassInfo);
|
||||
index = pType->m_DeclaredClasses.m_Map.NextInorder(index);
|
||||
} while (index != pType->m_DeclaredClasses.m_Map.InvalidIndex());
|
||||
|
||||
index = pType->m_DeclaredEnums.m_Map.FirstInorder();
|
||||
do
|
||||
{
|
||||
enums.push_back(pType->m_DeclaredEnums.m_Map.Element(index)->m_pEnumInfo);
|
||||
index = pType->m_DeclaredEnums.m_Map.NextInorder(index);
|
||||
} while (index != pType->m_DeclaredEnums.m_Map.InvalidIndex());
|
||||
|
||||
json j;
|
||||
j["classes"] = json::object();
|
||||
j["enums"] = json::object();
|
||||
|
||||
for (const auto& line : classNames)
|
||||
for (const auto& pClassInfo : classes)
|
||||
{
|
||||
auto* pClassInfo = pType->FindDeclaredClass(line.c_str()).Get();
|
||||
if (!pClassInfo) continue;
|
||||
|
||||
short fieldsSize = pClassInfo->m_nFieldCount;
|
||||
SchemaClassFieldData_t* pFields = pClassInfo->m_pFields;
|
||||
|
||||
@@ -155,11 +158,8 @@ CON_COMMAND(dump_schema, "dump schema symbols")
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& line : enumNames)
|
||||
for (const auto& pEnumInfo : enums)
|
||||
{
|
||||
auto* pEnumInfo = pType->FindDeclaredEnum(line.c_str()).Get();
|
||||
if (!pEnumInfo) continue;
|
||||
|
||||
j["enums"][pEnumInfo->m_pszName] = json::object();
|
||||
j["enums"][pEnumInfo->m_pszName]["align"] = pEnumInfo->m_nSize;
|
||||
j["enums"][pEnumInfo->m_pszName]["items"] = json::array();
|
||||
|
||||
Reference in New Issue
Block a user