Compare commits

...

200 Commits

Author SHA1 Message Date
roflmuffin
0390a03829 Merge remote-tracking branch 'origin/main' into release/v2
# Conflicts:
#	managed/CounterStrikeSharp.API/Core/Schema/Classes/CCSPlayer_MovementServices.g.cs
2025-11-06 11:12:52 +10:00
dependabot[bot]
0322548ebd chore(deps): bump libraries/metamod-source from 4399ff0 to 07c708a (#1101)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-06 00:57:56 +00:00
dependabot[bot]
e4b1a35308 chore(deps): bump libraries/hl2sdk-cs2 from 84a823d to da981a8 (#1108)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: roflmuffin <shortguy014@gmail.com>
2025-11-06 00:51:23 +00:00
dependabot[bot]
fd8defc1b9 chore(deps): bump libraries/Protobufs from 53da9bc to 7af53a5 (#1109)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-06 09:11:33 +10:00
Michael Wilson
cebec419fa release: v1.0.346 2025-11-05 10:52:14 +00:00
Michael Wilson
52550e31bc chore: update server.json 2025-11-05 20:51:13 +10:00
LynchMus
e59e9cf148 fix: changes for 2025-11-5 Update (#1107) 2025-11-05 20:44:03 +10:00
Luca.
1568d077e8 feat: add localization for no permission error messages & spanish language support. (#1099) 2025-11-05 16:57:45 +10:00
roflmuffin
ed919216f1 fix: make natives internal 2025-11-04 13:29:00 +00:00
roflmuffin
d999da91c8 fix: generate natives into generated folder as well 2025-11-04 13:27:41 +00:00
roflmuffin
5f482ea2a1 chore: move schema generated content to the generated folder as well 2025-11-04 13:25:12 +00:00
roflmuffin
9b451e535f feat: generate game events into separate files 2025-11-04 13:21:26 +00:00
roflmuffin
39995a7054 fix: generate handles as value type 2025-11-04 13:06:18 +00:00
roflmuffin
7ae4ba959f chore: reorganise some files 2025-11-04 22:59:50 +10:00
roflmuffin
e7299d2b6a fix: misc test fixes, change schema properties to virtual 2025-11-04 09:37:04 +00:00
roflmuffin
b006506695 fix: don't generate constructor and fix type for auto generated CEntityInstance 2025-11-03 05:12:38 +00:00
roflmuffin
3d6e99d9de ci: run build on release branches 2025-11-01 06:28:00 +00:00
roflmuffin
7fabd8e1d0 feat: swap Vector4D and Vector2D for numerics versions 2025-11-01 06:25:19 +00:00
roflmuffin
de95e4f873 fix: test plugin 2025-10-30 07:20:51 +00:00
roflmuffin
38d2dfd17c feat: add network change methods to schema classes 2025-10-30 06:57:46 +00:00
roflmuffin
0cddb171c6 feat: update schema system to add get/set of value types 2025-10-30 06:33:47 +00:00
roflmuffin
6794d0a21c feat: use system numerics vector3 and create qangle class based on numerics.vector3 2025-10-30 06:33:09 +00:00
Ravid Atia
55542dba7c feat: allow plugins to be loaded from subdirectories (#1031)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2025-10-30 05:27:42 +00:00
Michael Wilson
33538eca60 release: v1.0.345 2025-10-30 01:41:23 +00:00
Michael Wilson
b4e83dfb4a fix: update linux signature for GetCSWeaponDataFromKey 2025-10-30 11:40:04 +10:00
roflmuffin
4ff2732d8a feat(schema): update schema generator to use @GAMMACASE schema dumper format 2025-10-27 06:48:05 +00:00
Michael Wilson
67d3d044fd release: v1.0.344 2025-10-27 05:36:18 +00:00
roflmuffin
f50540583d chore(schema): update schema to latest 2025-10-27 05:15:04 +00:00
roflmuffin
97957f6220 fix(schema): allow for negative enum values in source schema file 2025-10-27 05:14:15 +00:00
roflmuffin
0c2f1cd078 [no ci] chore: update devcontainer location 2025-10-22 20:18:59 +10:00
Michael Wilson
9eefe9c61a release: v1.0.343 2025-10-20 01:03:13 +00:00
Nocky
7be329466a feat: add BuyWithCtrl to AcquireMethod enum
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2025-10-19 23:25:46 +00:00
Matlord93
a21f0b5277 fix: update ConVar flag retrieval that adapts to different Source 2 SDK versions (#1059)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2025-10-18 08:10:39 +00:00
dxqshka
b4ba7d8ca0 feat(experimental): add NuGet Dependency Resolver for Plugins (#1012) 2025-10-18 07:35:40 +00:00
Michal
0eb73eb348 feat: add FindVirtualTable method (#1075) 2025-10-18 10:59:33 +10:00
Markus
43c1c89596 feat: use shared libgcc and libc++ (#1007)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2025-10-17 06:53:42 +00:00
宇宙 猫
53996666f8 feat: implement TerminateSelf(string reason) to allow plugins to safely terminate themselves (#1047)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2025-10-17 06:30:59 +00:00
schwarper
a8510d183d feat: add core translations & processtargetstring (#1051) 2025-10-17 16:19:49 +10:00
Michael Wilson
a52f5e737d release: v1.0.342 2025-10-16 06:41:06 +00:00
LynchMus
34598dd56e fix: update Sigs & CTakeDamageResult & EmitSound_t (#1071) 2025-10-16 06:40:10 +00:00
Michael Wilson
325728e753 release: v1.0.341 2025-10-16 06:19:32 +00:00
roflmuffin
56e007402b fix: update schema for update 2025-10-16 16:15:05 +10:00
dependabot[bot]
bf75d43039 chore(deps): bump libraries/hl2sdk-cs2 from bc59586 to 9310e72 (#908)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-16 15:09:02 +10:00
dependabot[bot]
7572722de4 chore(deps): bump libraries/metamod-source from 3f3136d to 4399ff0 (#1067)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-15 14:37:56 +00:00
LynchMus
638d74470e fix: EmitSoundFilter Crash (#1066) 2025-10-16 00:28:03 +10:00
LynchMus
37951f2875 fix(update): update signatures and offsets for 1.41.1.3 Update (#1064) 2025-10-15 19:46:38 +10:00
schwarper
7b9df9097c feat: improve getplayers & RemoveItemByDesignerName (#1044) 2025-09-27 08:52:41 +10:00
宇宙 猫
31cedca2b7 feat: Allow custom CS# directory for flexible server deployment (aka. css_basepath) (#1033) 2025-09-22 14:40:20 +10:00
Michael Wilson
4869acac41 release: v1.0.340 2025-09-18 06:53:31 +00:00
Oylsister
2c80971393 fix: update for CS2 09-17-25 (patch 20022951) (#1037)
Co-authored-by: Alex <6075172+vauff@users.noreply.github.com>
Co-authored-by: MADAO <73157477+ismadao@users.noreply.github.com>
2025-09-18 06:50:37 +00:00
宇宙 猫
44922da680 fix: Invalid string pointers passed by SetResult due to C++ memory lifecycle (#1032) 2025-09-09 19:23:23 +10:00
宇宙 猫
1ca8ff2172 feat: Implement bypass hook for Invoke method (#1027) 2025-09-08 06:15:11 +00:00
Michael Wilson
99f7f37b10 release: v1.0.339 2025-09-04 00:34:35 +00:00
SLAYER
54f8d5ef95 Fixed offset values of Respawn and Slay for Windows (#1026) 2025-09-04 10:26:11 +10:00
Michael Wilson
a7443b2a60 release: v1.0.338 2025-08-31 11:29:55 +00:00
Levin V.
72d66cb5d5 Update gamedata.json (#1020) 2025-08-29 08:39:42 +10:00
Michael Wilson
adccc4b9e9 release: v1.0.337 2025-08-21 00:47:25 +00:00
Michael Wilson
fc7301a8d3 feat(schema): add new schema classes for build 19644975 2025-08-21 00:36:35 +00:00
Michael Wilson
ef4b8f9442 feat(schema): update schema classes for build 19644975 2025-08-21 00:32:21 +00:00
Michael Wilson
245f55daf3 fix: update FindPickerEntity implementation (thanks @KillStr3aK) 2025-08-21 00:20:05 +00:00
Michael Wilson
936b88d57c fix(gamedata): update CBasePlayerController_SetPawn signature 2025-08-21 10:15:10 +10:00
Michael Wilson
ee792de1a0 release: v1.0.336 2025-08-18 01:53:16 +00:00
Michael Wilson
624ca0f0de fix: re-add GetHitGroup with GameData backed offset 2025-08-18 01:50:39 +00:00
Michael Wilson
592acc28aa release: v1.0.335 2025-08-16 00:53:03 +00:00
Michael Wilson
51b6b45390 fix: obsolete GetHitGroup() and point to HitGroupId schema property 2025-08-16 00:35:58 +00:00
Michael Wilson
d5fad8d801 chore(deps): update hl2sdk 2025-08-16 00:08:27 +00:00
Michael Wilson
bf1ce2e8a3 chore(gamedata): update offsets & signatures 2025-08-16 00:08:11 +00:00
Michael Wilson
0761d267ba fix: revert MaxPlayers caching 2025-08-15 00:49:44 +00:00
Michael Wilson
92959dea6e release: v1.0.334 2025-08-15 00:22:04 +00:00
Daniel Saewitz
f7c69a60be fix: update hl2sdk for patch 19602992 (Aug 14 2025) (#988) 2025-08-15 10:21:08 +10:00
Michael Wilson
6f796d9ae9 release: v1.0.333 2025-08-05 12:18:39 +00:00
Michael Wilson
1f9c7a090b perf: cache Server.MaxPlayers to improve performance of Utilities.GetPlayers() 2025-08-05 12:11:07 +00:00
Michael Wilson
2cf2d45e8e feat: add OnPlayerChat listener (#973) 2025-08-05 11:43:38 +00:00
Michael Wilson
fa383cda68 chore: apply alliedmodders hl2sdk again (#974) 2025-08-05 21:38:23 +10:00
Michael Wilson
e1acada35e release: v1.0.332 2025-08-05 06:58:41 +00:00
samyyc
dc503e7f57 fix: re-enable EmitSoundFilter (#968) 2025-08-05 16:53:24 +10:00
Luca.
fedfe75601 fix: update GetHitGroup offset (#970) 2025-08-04 23:39:33 +00:00
samyyc
3508fdfd8c fix: crash caused by AddEntityIOEvent (#969) 2025-08-04 22:13:33 +10:00
Michael Wilson
741d6a3fc8 release: v1.0.331 2025-08-04 10:30:24 +00:00
Michael Wilson
356152a567 fix: revert chat command hooking back to detour of Host_Say 2025-08-04 10:26:00 +00:00
Michael Wilson
31e12ba809 release: v1.0.330 2025-08-04 05:46:01 +00:00
samyyc
529a0cbf5b fix: CheckTransmit hook not firing (#966) 2025-08-04 15:31:26 +10:00
Michael Wilson
ed7c28f9e3 release: v1.0.329 2025-08-03 23:34:14 +00:00
Michael Wilson
1f30e5619f fix: Update CS# for Patch 19388062 (#958) 2025-08-04 09:28:05 +10:00
Michael Wilson
af3bb528d7 chore: schema update for patch 19388062 (#962) 2025-08-03 11:38:08 +10:00
K4ryuu
b7abd1d59e chore: update Gamedata for Patch 19388062
Credits: @Pisex, @stefanx11, @K4ryuu
2025-07-29 13:05:53 +00:00
Michael Wilson
dd50221321 feat: add OnPlayerButtonsChanged listener (#942) 2025-07-20 11:20:23 +00:00
Michael Wilson
9491732a38 feat: add Vector3 and QAngle explicit casts to System.Numerics.Vector3 (#943) 2025-07-20 11:15:11 +00:00
Michael Wilson
6c9321e3e7 feat: add OnServerPreEntityThink and OnServerPostEntityThink listeners (#941) 2025-07-17 15:42:07 +10:00
Michael Wilson
6acfa1491a release: v1.0.328 2025-07-17 02:01:56 +00:00
Michael Wilson
ad8116d4d2 feat: add css_dump_leaks command which outputs vector/angle count 2025-07-17 01:53:13 +00:00
Michael Wilson
26a8f641c8 test: add integration tests xunit plugin/runner (#928) 2025-07-14 14:54:35 +10:00
roflmuffin
f08b5e8439 chore(build): prevent unnecessary test builds 2025-07-11 20:58:22 +10:00
Michael Wilson
6e27a67917 release: v1.0.327 2025-07-10 21:36:17 +00:00
Michael Wilson
a8eff60d0b fix: update core.example.json 2025-07-10 21:36:03 +00:00
Michael Wilson
89fc5aeaf9 release: v1.0.326 2025-07-10 15:32:53 +00:00
Michael Wilson
ffb274d636 fix: remove requirement for https for game config updates (#930) 2025-07-11 01:31:49 +10:00
samyyc
b5303d15ab Support operating bytes type protobuf field (#922)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2025-07-10 06:19:46 +00:00
Michael Wilson
1a521ec3bb fix: prefix dump_schema command to enable compat with Source2 Schema Dumper by GAMMACASE 2025-07-10 05:22:31 +00:00
Michael Wilson
ec61ad37f0 release: v1.0.325 2025-07-10 03:53:52 +00:00
Michael Wilson
260015d765 fix: revert internal stack trace for performance (#927) 2025-07-10 13:53:01 +10:00
Michael Wilson
d346a02f98 release: v1.0.324 2025-07-10 01:04:18 +00:00
Michael Wilson
8ab61b00e8 feat: Add Automatic Gamedata Updates (#925) 2025-07-10 10:23:48 +12:00
Michael Wilson
c746c4e2e7 chore(dev): add node to devcontainer 2025-07-07 02:28:43 +00:00
Michael Wilson
32d3e18657 chore(dev): create release script 2025-07-07 02:26:26 +00:00
Michael Wilson
d5fa42cb50 release: v1.0.323 2025-07-07 02:18:32 +00:00
Michael Wilson
22809e3ec6 feat: update schema for game update 1.40.8.5 (03.07.2025) (#921) 2025-07-07 12:14:28 +10:00
Michael Wilson
87d197309b chore(dev): add build & sync commands for .NET API 2025-07-07 01:50:52 +00:00
Michael Wilson
e6bfb7939d chore(dev): add build & sync commands to vscode tasks 2025-07-07 01:42:50 +00:00
dependabot[bot]
0ae9227d73 chore(deps): bump libraries/metamod-source from 6091f15 to b17dc63 (#906)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2025-07-07 00:42:23 +00:00
Michael Wilson
7285d29454 release: v1.0.322 2025-07-07 00:36:16 +00:00
ZoNiCaL
124ffac7a9 Implement CVariant functions (#905) 2025-07-07 00:22:02 +00:00
Michael Wilson
267b017787 release: v1.0.321 2025-07-06 23:55:26 +00:00
Ian Lucas
018bcba655 Continued: Fixes for game update 1.40.8.5 (03.07.2025) (#917) 2025-07-05 06:49:02 +10:00
Michael Wilson
011401adb9 release: v1.0.320 2025-07-04 06:07:15 +00:00
Roman
bebeedf272 Fixes for game update 1.40.8.5 (03.07.2025) (#911) 2025-07-03 18:57:20 +00:00
Michael Wilson
7af153cf25 release: v1.0.319 2025-06-20 12:39:17 +00:00
Michal
6f663164ee Improve FunctionReference trace logging with real user stack origin (#895)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
Co-authored-by: root <root@ns3203586.ip-146-59-53.eu>
2025-06-20 12:28:14 +00:00
Michael Wilson
22f5c06c49 release: v1.0.318 2025-05-12 06:08:34 +00:00
Michael Wilson
073728b4ce fix(gameevents): merge and sort game event properties if duplicate events 2025-05-12 05:59:21 +00:00
Michael Wilson
6511a0098a chore: cleanup cpp & add clang format linting (#862) 2025-05-12 15:46:13 +10:00
Eason
f50fb783bb chore(build): duplicate include path: ${SOURCESDK}/public/entity2 (#756)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2025-05-12 04:23:03 +00:00
roflmuffin
49e8ab0e27 release: v1.0.317 2025-05-10 12:34:59 +10:00
roflmuffin
4be0634625 chore(gameevents): update game events (bullet_damage changes) 2025-05-10 12:32:05 +10:00
roflmuffin
7025b62615 chore(schema): update (mainly removal of danger zone classes) 2025-05-10 12:31:38 +10:00
Michael Wilson
462ca52229 chore(deps): upgrade metamod & hl2sdk (#856) 2025-05-10 12:17:45 +10:00
dependabot[bot]
d7e23e8282 chore(deps): bump libraries/Protobufs from 3d85413 to 53da9bc (#857)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-08 14:37:58 +10:00
roflmuffin
3ddfa71e3f feat: add Scoreboard and Inspect buttons to PlayerButtons 2025-05-02 20:16:02 +10:00
ipsvn
688b226bcf Fix potential event natives crashes (#852) 2025-04-29 14:32:50 +10:00
Michael Wilson
0d23387347 release: v1.0.316 2025-04-04 01:09:56 +00:00
Michael Wilson
68e6ffaebe fix(gamedata): update CCSPlayer_WeaponServices_CanUse signature 2025-04-04 11:08:07 +10:00
Michael Wilson
2f8f370cd3 fix: commit links in changelog finally 2025-04-01 17:02:15 +10:00
Michael Wilson
169d43e31d release: 1.0.315 2025-04-01 02:05:37 +00:00
schwarper
0ce4a2903c Update CCSPlayer_ItemServices_CanAcquire signature (#832) 2025-04-01 11:24:21 +10:00
Pawel Bartusiak
33b46eb214 docs: add automatic build and deploy guide (#831) 2025-03-31 11:45:43 +10:00
Michael Wilson
a27ba3b005 fix: move EventPlayerChat to dedicated file and exclude from generator
- Created a separate EventPlayerChat since this is being fired manually
- Updated event generator to exclude player_chat event from GameEvents.g.cs
2025-03-31 11:44:15 +10:00
Michael Wilson
57286c9990 chore(changelog): cleanup whitespace once and for all 2025-03-28 06:53:49 +00:00
Michael Wilson
ae808c05c8 [no ci] chore: fix commit links in release changelog 2025-03-27 14:46:17 +10:00
Michael Wilson
c9f8e477d3 release: 1.0.314 2025-03-27 04:06:33 +00:00
Michael Wilson
2398ba0a5d fix: manually revert EventPlayerChat to old value (#827) 2025-03-27 13:56:15 +10:00
roflmuffin
e45c20481d ci: hide release commits in changelog 2025-03-25 20:56:03 +10:00
roflmuffin
fe321ee93d ci: include full changelog link in discord message 2025-03-25 20:31:42 +10:00
roflmuffin
be19103556 chore: remove footer from cliff changelog 2025-03-25 20:29:16 +10:00
roflmuffin
64cb26b86d chore: fix newlines in changelog 2025-03-25 20:24:26 +10:00
roflmuffin
637224dc55 ci: fix cliff generation 2025-03-25 20:18:15 +10:00
roflmuffin
3aca7c37f1 ci: add changelog to release & webhook 2025-03-25 20:07:02 +10:00
roflmuffin
87f38d72ee release: v1.0.313 2025-03-25 19:28:06 +10:00
roflmuffin
5daf94791f chore(changelog): update cliff.toml 2025-03-25 19:18:19 +10:00
Michael Wilson
c50213c442 feat(config): add toml loading support (#804) 2025-03-25 19:12:29 +10:00
roflmuffin
c02d31cb2e chore: add links to contributors github page 2025-03-24 19:49:53 +10:00
roflmuffin
98cbca44d4 chore: update changelog to use semantic tags 2025-03-24 19:44:22 +10:00
Michael Wilson
4cf88fc03e fix(gameevents): promote core.gameevents to have higher priority (#819) 2025-03-24 19:32:47 +10:00
Michael Wilson
f1dff6d4d3 chrore: Implement SemVer instead of build numbers (#816) 2025-03-24 19:15:46 +10:00
Michael Wilson
414a59a36d fix(schema): inherited schema classes with clashing properties (#818) 2025-03-24 18:43:41 +10:00
Michael Wilson
f1c108087b fix(concommand): don't remove reference flags when running convar/concmd unlocker (#817) 2025-03-24 17:49:09 +10:00
roflmuffin
47ddf42c11 [no ci] add CHANGELOG.md 2025-03-24 12:27:09 +10:00
samyyc
ded133f1db Fix EmitSoundFilter signature for linux (#815) 2025-03-23 19:29:09 +10:00
samyyc
bbc621acdc feat: Implement EmitSoundFilter (#808)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2025-03-23 07:56:34 +00:00
Michael Wilson
f7784c26c6 fix: change terrorist chat colour to orange to be more in line with the game (#813) 2025-03-23 14:07:05 +10:00
qstage
2da5448c8e feat: add ListenerHandlerAttribute<T> (#757)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2025-03-17 02:16:33 +00:00
Michael Wilson
e406b78044 [no ci] chore: update protobuf (#803) 2025-03-17 12:10:01 +10:00
Michael Wilson
3839831ea9 [no ci] Update publish-docs.yml (#802) 2025-03-17 11:55:12 +10:00
samyyc
54ad6c0b79 feat: Expose Metamod MetaFactory to NativeAPI (#801) 2025-03-17 11:45:38 +10:00
Michael Wilson
7c2cc8a7f6 [no ci] chore: fix deprecated CI steps (#759) 2025-02-05 13:23:24 +10:00
qstage
e99d27ca30 fix: errors when reloading auto generated config (#754) 2025-01-30 21:08:44 +10:00
dependabot[bot]
44d3c51bc7 [no ci] chore(deps): bump libraries/Protobufs from b46090a to 157162d (#753)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-30 11:22:36 +10:00
Joakim
f72e6d5daf feat: add ReplicateConVar (#751) 2025-01-27 22:10:14 +00:00
samyyc
c8bccb07e0 Remove the characters limit for CenterHtmlMenu (#747) 2025-01-23 13:06:06 +00:00
qstage
2c0640700a fix: ArgumentOutOfRangeException when calling GetArgTargetResult (#745) 2025-01-23 22:53:51 +10:00
Ian Lucas
0f71e1aebe feat: handle quotes for FakeConVar<string> (#743) 2025-01-20 12:09:44 +10:00
dependabot[bot]
ac38ec249b chore(deps): bump libraries/hl2sdk-cs2 from a658a0f to a26ca82 (#739)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-15 23:45:00 +10:00
Roflmuffin
cff24f4321 Revert "Make NetworkedVector support Vector and QAngle (#728)"
This reverts commit bd1105d752.
2025-01-14 00:18:56 +10:00
Michael Wilson
f05cc5e043 fix: NetworkedVector throwing error 2025-01-09 11:07:40 +10:00
Yarukon
bd1105d752 Make NetworkedVector support Vector and QAngle (#728) 2025-01-09 09:14:56 +10:00
Michael Wilson
9b4ee727c7 Fix RemoveMapChangeTimers (#720) 2024-12-24 23:30:44 +10:00
Michael Wilson
38d248defe [no ci] chore: use ninja in linux build (#722) 2024-12-24 16:14:59 +10:00
Michael Wilson
6b4306948b Update Schema to Latest (#721) 2024-12-24 16:01:10 +10:00
Michael Wilson
3fee00e8c4 [no ci] Update getting-started.md 2024-12-24 16:00:36 +10:00
Michael Wilson
d22af142cb [no ci] chore: upgrade to cxx20 (#719) 2024-12-24 15:34:12 +10:00
dependabot[bot]
c1176a3192 [no ci] chore(deps): bump libraries/hl2sdk-cs2 from 14e77af to a658a0f (#718)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-24 15:32:38 +10:00
dependabot[bot]
3c321be5a0 [no ci] chore(deps): bump libraries/Protobufs from 76e070d to b46090a (#717)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-24 15:32:20 +10:00
Michael Wilson
466da1b193 chore: back to using hl2sdk 2024-12-20 23:34:21 +00:00
Michael Wilson
ba860a92d2 fix: temporary patch hl2sdk entity listeners 2024-12-20 12:37:50 +00:00
Ian Lucas
461fc0ea67 Fix GiveNamedItem and CanAcquire signatures (#713) 2024-12-20 22:12:14 +10:00
Michael Wilson
6349c11d07 fix: revert base entity teleport changes, add warning to player controller (#688) 2024-11-27 21:25:12 +10:00
ZoNiCaL
b2046b21c4 [no ci] Shuffle player documentation, add to game event documentation (#685) 2024-11-25 10:48:25 +10:00
Michael Wilson
3c6be481c5 [no ci] Update publish-docs.yml 2024-11-25 10:48:05 +10:00
Michael Wilson
0a6fe0946d [no ci] Allow manual publish-docs.yml 2024-11-25 10:47:01 +10:00
schwarper
79297511e3 Added hitgroup to CTakeDamageInfo (#665)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2024-11-23 10:55:22 +00:00
schwarper
c6d3988902 CBaseEntity player teleport adjustment update (#661)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2024-11-23 10:07:12 +00:00
schwarper
8a063f4fb6 Added PluginConfigExtensions (#675) 2024-11-23 20:00:39 +10:00
Gold KingZ
6cf124bfb6 System.ArgumentException: Player with slot X not found (#667) 2024-11-13 08:08:47 +00:00
schwarper
1f904a52a7 Added TargetType.PlayerAim (#639)
Co-authored-by: KillStr3aK <KillStr3aK@users.noreply.github.com>
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2024-11-06 06:52:28 +00:00
Nexd
32c99b2e49 Implemented entity transmit feature (#608)
Co-authored-by: KillStr3aK <KillStr3aK@users.noreply.github.com>
2024-11-06 16:46:03 +10:00
Nexd
5c9d38b2b0 fix: only close the menu if it has exit button (#622)
Co-authored-by: KillStr3aK <KillStr3aK@users.noreply.github.com>
2024-10-20 23:41:25 +00:00
Nexd
b54f5c3dee fix: gamedata update (#631)
Co-authored-by: KillStr3aK <KillStr3aK@users.noreply.github.com>
2024-10-21 09:35:38 +10:00
schwarper
761380dff6 CCSPlayer_ItemServices_CanAcquire and GetCSWeaponDataFromKey signatures update (#636) 2024-10-19 10:07:07 +10:00
Interesting
71ae253e5e Add GetGameframeTime to NativeAPI (#627)
Co-authored-by: Michael Wilson <roflmuffin@users.noreply.github.com>
2024-10-17 03:32:10 +00:00
schwarper
c2f212df51 Add GetCSWeaponDataFromKey and CCSPlayer_ItemServices_CanAcquire (#628) 2024-10-17 00:44:32 +00:00
Ian Lucas
ad7f7bd365 fix: InvalidOperationException when removing command in its callback (#626) 2024-10-13 09:29:06 +10:00
1940 changed files with 404669 additions and 162637 deletions

View File

@@ -38,7 +38,7 @@ BraceWrapping:
SplitEmptyNamespace: true
PointerAlignment: Left
SortIncludes: CaseSensitive
SortIncludes: Never
IncludeBlocks: Regroup
IncludeCategories:
# External headers in <> with extension or /

View File

@@ -0,0 +1,21 @@
{
"name": "SteamRT Sniper SDK",
"image": "registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest",
"updateContentCommand": "git submodule update --init --recursive",
"postCreateCommand": "cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -G Ninja && cmake --build build -j$(nproc)",
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csdevkit",
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"GitHub.copilot",
"jeff-hykin.better-cpp-syntax"
]
}
},
"features": {
"ghcr.io/devcontainers/features/dotnet": "8.0",
"ghcr.io/devcontainers/features/node": "lts"
}
}

View File

@@ -1,11 +0,0 @@
{
"name": "SteamRT Sniper SDK",
"image": "registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools"
]
}
}
}

270
.github/workflows/build-and-publish.yml vendored Normal file
View File

@@ -0,0 +1,270 @@
name: Build & Publish
env:
BUILD_TYPE: Release
# Remove default permissions of GITHUB_TOKEN for security
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions: {}
on:
push:
paths-ignore:
- "docfx/**"
branches: ["main", "release/*"]
tags:
- "v*"
pull_request:
branches: ["main"]
jobs:
setup:
runs-on: ubuntu-latest
outputs:
gitversion_semver: ${{ steps.gitversion.outputs.semVer }}
gitversion_fullsemver: ${{ steps.gitversion.outputs.fullSemVer }}
gitversion_assemblysemver: ${{ steps.gitversion.outputs.assemblySemVer }}
gitversion_informationalversion: ${{ steps.gitversion.outputs.informationalVersion }}
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: 6.0.x
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Execute GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v1
with:
useConfigFile: true
build_windows:
needs: setup
runs-on: windows-latest
steps:
- name: Prepare env
shell: bash
run: |
echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
echo "SEMVER=${{ needs.setup.outputs.gitversion_semver }}" >> $GITHUB_ENV
- name: Visual Studio environment
shell: cmd
run: |
:: See https://github.com/microsoft/vswhere/wiki/Find-VC
for /f "usebackq delims=*" %%i in (`vswhere -latest -property installationPath`) do (
call "%%i"\Common7\Tools\vsdevcmd.bat -arch=x64 -host_arch=x64
)
:: Loop over all environment variables and make them global.
for /f "delims== tokens=1,2" %%a in ('set') do (
echo>>"%GITHUB_ENV%" %%a=%%b
)
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Build
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ..
cmake --build . --config ${{env.BUILD_TYPE}} -- /m:16
- name: Clean build directory
run: |
mkdir -p build/addons/counterstrikesharp/bin/win64
mv build/${{env.BUILD_TYPE}}/*.dll build/addons/counterstrikesharp/bin/win64
mkdir build/output/
mv build/addons build/output
- uses: actions/upload-artifact@v4
with:
name: counterstrikesharp-windows-${{ needs.setup.outputs.gitversion_semver }}
path: build/output/
build_linux:
needs: setup
runs-on: ubuntu-latest
# Could not figure out how to run in a container only on some matrix paths, so I've split it out into its own build.
container:
image: registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
steps:
- name: Prepare env
shell: bash
run: |
echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
echo "SEMVER=${{ needs.setup.outputs.gitversion_semver }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Build
run: |
mkdir -p build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ..
cmake --build . --config ${{env.BUILD_TYPE}} -- -j16
- name: Clean build directory
run: |
mkdir build/output/
mv build/addons build/output
- uses: actions/upload-artifact@v4
with:
name: counterstrikesharp-linux-${{ needs.setup.outputs.gitversion_semver }}
path: build/output/
build_managed:
needs: setup
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Prepare env
shell: bash
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
# We don't need expensive submodules for the managed side.
- uses: actions/checkout@v4
- name: Build runtime v${{ needs.setup.outputs.gitversion_semver }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: Install dependencies
run: dotnet restore managed/CounterStrikeSharp.sln
- name: Run tests
run: dotnet test --logger trx --results-directory "TestResults-${{ needs.setup.outputs.gitversion_semver }}" managed/CounterStrikeSharp.API.Tests/CounterStrikeSharp.API.Tests.csproj
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: test-results-${{ needs.setup.outputs.gitversion_semver }}
path: TestResults-${{ needs.setup.outputs.gitversion_semver }}
if: ${{ always() }}
- name: Publish artifacts
run: |
dotnet publish -c Release \
/p:Version=${{ needs.setup.outputs.gitversion_semver }} \
/p:AssemblyVersion=${{ needs.setup.outputs.gitversion_assemblySemver }} \
/p:InformationalVersion=${{ needs.setup.outputs.gitversion_informationalversion }} \
managed/CounterStrikeSharp.API
dotnet pack -c Release \
/p:Version=${{ needs.setup.outputs.gitversion_semver }} \
/p:AssemblyVersion=${{ needs.setup.outputs.gitversion_assemblySemver }} \
/p:InformationalVersion=${{ needs.setup.outputs.gitversion_informationalversion }} \
managed/CounterStrikeSharp.API
- uses: actions/upload-artifact@v4
with:
name: counterstrikesharp-api-${{ needs.setup.outputs.gitversion_semver }}
path: managed/CounterStrikeSharp.API/bin/Release
publish:
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'roflmuffin/CounterStrikeSharp' }}
permissions:
contents: write
needs: ["setup", "build_linux", "build_windows", "build_managed"]
runs-on: ubuntu-latest
steps:
- name: Prepare env
shell: bash
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: counterstrikesharp-windows-${{ needs.setup.outputs.gitversion_semver }}
path: build/windows
- uses: actions/download-artifact@v4
with:
name: counterstrikesharp-linux-${{ needs.setup.outputs.gitversion_semver }}
path: build/linux
- uses: actions/download-artifact@v4
with:
name: counterstrikesharp-api-${{ needs.setup.outputs.gitversion_semver }}
path: build/api
# TODO: This stuff should really be in a matrix
- name: Add API to Artifacts
run: |
mkdir -p build/linux/addons/counterstrikesharp/api
mkdir -p build/windows/addons/counterstrikesharp/api
cp -r build/api/net8.0/publish/* build/linux/addons/counterstrikesharp/api
cp -r build/api/net8.0/publish/* build/windows/addons/counterstrikesharp/api
- name: Zip Builds
run: |
(cd build/linux && zip -qq -r ../../counterstrikesharp-linux-${{ needs.setup.outputs.gitversion_semver }}.zip *)
(cd build/windows && zip -qq -r ../../counterstrikesharp-windows-${{ needs.setup.outputs.gitversion_semver }}.zip *)
- name: Add dotnet runtime
run: |
mkdir -p build/linux/addons/counterstrikesharp/dotnet
curl -s -L https://download.visualstudio.microsoft.com/download/pr/c1371dc2-eed2-47be-9af3-ae060dbe3c7d/bd509e0a87629764ed47608466d183e6/aspnetcore-runtime-8.0.3-linux-x64.tar.gz \
| tar xvz -C build/linux/addons/counterstrikesharp/dotnet
mkdir -p build/windows/addons/counterstrikesharp/dotnet
curl -s -L https://download.visualstudio.microsoft.com/download/pr/086d1dd6-57a5-437a-a1ef-549cf702fb48/dd4a8fe6c53a1016a414d6f2925c1323/aspnetcore-runtime-8.0.3-win-x64.zip -o dotnet.zip
unzip -qq dotnet.zip -d build/windows/addons/counterstrikesharp/dotnet
- name: Zip Builds
run: |
(cd build/linux && zip -qq -r ../../counterstrikesharp-with-runtime-linux-${{ needs.setup.outputs.gitversion_semver }}.zip *)
(cd build/windows && zip -qq -r ../../counterstrikesharp-with-runtime-windows-${{ needs.setup.outputs.gitversion_semver }}.zip *)
- name: Generate a changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
args: --current -s footer
- name: Release
id: release
uses: softprops/action-gh-release@v1
with:
append_body: true
body: |
${{ steps.git-cliff.outputs.content }}
Please refer to [CHANGELOG.md](https://github.com/roflmuffin/CounterStrikeSharp/blob/${{ github.ref_name }}/CHANGELOG.md) for details.
files: |
counterstrikesharp-windows-${{ needs.setup.outputs.gitversion_semver }}.zip
counterstrikesharp-with-runtime-windows-${{ needs.setup.outputs.gitversion_semver }}.zip
counterstrikesharp-linux-${{ needs.setup.outputs.gitversion_semver }}.zip
counterstrikesharp-with-runtime-linux-${{ needs.setup.outputs.gitversion_semver }}.zip
- name: Publish NuGet package
run: |
dotnet nuget push build/api/CounterStrikeSharp.API.${{ needs.setup.outputs.gitversion_semver }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push build/api/CounterStrikeSharp.API.${{ needs.setup.outputs.gitversion_semver }}.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Send Notification to Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@0.3.2
with:
args: |
A new release of CS# has been tagged [v${{ needs.setup.outputs.gitversion_semver }}](${{ steps.release.outputs.url }})
${{ steps.git-cliff.outputs.content }}
Please refer to [CHANGELOG.md](https://github.com/roflmuffin/CounterStrikeSharp/blob/${{ github.ref_name }}/CHANGELOG.md) for details.

View File

@@ -1,248 +0,0 @@
name: Build & Publish
on:
push:
paths-ignore:
- "docfx/**"
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev"]
env:
BUILD_TYPE: Release
jobs:
setup:
permissions:
contents: write
runs-on: ubuntu-latest
outputs:
buildnumber: ${{ steps.buildnumber.outputs.build_number }}
steps:
- name: Generate build number
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
id: buildnumber
uses: onyxmueller/build-tag-number@v1
with:
token: ${{secrets.github_token}}
build_windows:
needs: setup
runs-on: windows-latest
steps:
- name: Prepare env
shell: bash
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Fallback build number
if: ${{ github.event_name == 'pull_request' || github.ref != 'refs/heads/main' }}
shell: bash
run: echo "BUILD_NUMBER=0" >> $GITHUB_ENV
- name: Main build number
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: echo "BUILD_NUMBER=${{ needs.setup.outputs.buildnumber }}" >> $GITHUB_ENV
- name: Visual Studio environment
shell: cmd
run: |
:: See https://github.com/microsoft/vswhere/wiki/Find-VC
for /f "usebackq delims=*" %%i in (`vswhere -latest -property installationPath`) do (
call "%%i"\Common7\Tools\vsdevcmd.bat -arch=x64 -host_arch=x64
)
:: Loop over all environment variables and make them global.
for /f "delims== tokens=1,2" %%a in ('set') do (
echo>>"%GITHUB_ENV%" %%a=%%b
)
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Build
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ..
cmake --build . --config ${{env.BUILD_TYPE}} -- /m:16
- name: Clean build directory
run: |
mkdir -p build/addons/counterstrikesharp/bin/win64
mv build/${{env.BUILD_TYPE}}/*.dll build/addons/counterstrikesharp/bin/win64
mkdir build/output/
mv build/addons build/output
- uses: actions/upload-artifact@v3
with:
name: counterstrikesharp-build-windows-${{ env.GITHUB_SHA_SHORT }}
path: build/output/
build_linux:
needs: setup
runs-on: ubuntu-latest
# Could not figure out how to run in a container only on some matrix paths, so I've split it out into its own build.
container:
image: registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
steps:
- name: Prepare env
shell: bash
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Fallback build number
if: ${{ github.event_name == 'pull_request' || github.ref != 'refs/heads/main' }}
shell: bash
run: echo "BUILD_NUMBER=0" >> $GITHUB_ENV
- name: Main build number
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: echo "BUILD_NUMBER=${{ needs.setup.outputs.buildnumber }}" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Build
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ..
cmake --build . --config ${{env.BUILD_TYPE}} -- -j16
- name: Clean build directory
run: |
mkdir build/output/
mv build/addons build/output
- uses: actions/upload-artifact@v3
with:
name: counterstrikesharp-build-linux-${{ env.GITHUB_SHA_SHORT }}
path: build/output/
build_managed:
needs: setup
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Prepare env
shell: bash
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Fallback build number
if: ${{ github.event_name == 'pull_request' || github.ref != 'refs/heads/main' }}
shell: bash
run: echo "BUILD_NUMBER=0" >> $GITHUB_ENV
- name: Main build number
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: echo "BUILD_NUMBER=${{ needs.setup.outputs.buildnumber }}" >> $GITHUB_ENV
# We don't need expensive submodules for the managed side.
- uses: actions/checkout@v3
- name: Build runtime v${{ env.BUILD_NUMBER }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
- name: Install dependencies
run: dotnet restore managed/CounterStrikeSharp.sln
- name: Run tests
run: dotnet test --logger trx --results-directory "TestResults-${{ env.GITHUB_SHA_SHORT }}" managed/CounterStrikeSharp.API.Tests/CounterStrikeSharp.API.Tests.csproj
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: test-results-${{ env.GITHUB_SHA_SHORT }}
path: TestResults-${{ env.GITHUB_SHA_SHORT }}
if: ${{ always() }}
- name: Publish artifacts
run: |
dotnet publish -c Release /p:Version=1.0.${{ env.BUILD_NUMBER }} managed/CounterStrikeSharp.API
dotnet pack -c Release /p:Version=1.0.${{ env.BUILD_NUMBER }} managed/CounterStrikeSharp.API
- uses: actions/upload-artifact@v3
with:
name: counterstrikesharp-build-api-${{ env.GITHUB_SHA_SHORT }}
path: managed/CounterStrikeSharp.API/bin/Release
publish:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
permissions:
contents: write
needs: ["setup", "build_linux", "build_windows", "build_managed"]
runs-on: ubuntu-latest
steps:
- name: Prepare env
shell: bash
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
- uses: actions/download-artifact@v3
with:
name: counterstrikesharp-build-windows-${{ env.GITHUB_SHA_SHORT }}
path: build/windows
- uses: actions/download-artifact@v3
with:
name: counterstrikesharp-build-linux-${{ env.GITHUB_SHA_SHORT }}
path: build/linux
- uses: actions/download-artifact@v3
with:
name: counterstrikesharp-build-api-${{ env.GITHUB_SHA_SHORT }}
path: build/api
# TODO: This stuff should really be in a matrix
- name: Add API to Artifacts
run: |
mkdir -p build/linux/addons/counterstrikesharp/api
mkdir -p build/windows/addons/counterstrikesharp/api
cp -r build/api/net8.0/publish/* build/linux/addons/counterstrikesharp/api
cp -r build/api/net8.0/publish/* build/windows/addons/counterstrikesharp/api
- name: Zip Builds
run: |
(cd build/linux && zip -qq -r ../../counterstrikesharp-build-${{ needs.setup.outputs.buildnumber }}-linux-${{ env.GITHUB_SHA_SHORT }}.zip *)
(cd build/windows && zip -qq -r ../../counterstrikesharp-build-${{ needs.setup.outputs.buildnumber }}-windows-${{ env.GITHUB_SHA_SHORT }}.zip *)
- name: Add dotnet runtime
run: |
mkdir -p build/linux/addons/counterstrikesharp/dotnet
curl -s -L https://download.visualstudio.microsoft.com/download/pr/c1371dc2-eed2-47be-9af3-ae060dbe3c7d/bd509e0a87629764ed47608466d183e6/aspnetcore-runtime-8.0.3-linux-x64.tar.gz \
| tar xvz -C build/linux/addons/counterstrikesharp/dotnet
mkdir -p build/windows/addons/counterstrikesharp/dotnet
curl -s -L https://download.visualstudio.microsoft.com/download/pr/086d1dd6-57a5-437a-a1ef-549cf702fb48/dd4a8fe6c53a1016a414d6f2925c1323/aspnetcore-runtime-8.0.3-win-x64.zip -o dotnet.zip
unzip -qq dotnet.zip -d build/windows/addons/counterstrikesharp/dotnet
- name: Zip Builds
run: |
(cd build/linux && zip -qq -r ../../counterstrikesharp-with-runtime-build-${{ needs.setup.outputs.buildnumber }}-linux-${{ env.GITHUB_SHA_SHORT }}.zip *)
(cd build/windows && zip -qq -r ../../counterstrikesharp-with-runtime-build-${{ needs.setup.outputs.buildnumber }}-windows-${{ env.GITHUB_SHA_SHORT }}.zip *)
- name: Release
id: release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ needs.setup.outputs.buildnumber }}
files: |
counterstrikesharp-build-${{ needs.setup.outputs.buildnumber }}-windows-${{ env.GITHUB_SHA_SHORT }}.zip
counterstrikesharp-with-runtime-build-${{ needs.setup.outputs.buildnumber }}-windows-${{ env.GITHUB_SHA_SHORT }}.zip
counterstrikesharp-build-${{ needs.setup.outputs.buildnumber }}-linux-${{ env.GITHUB_SHA_SHORT }}.zip
counterstrikesharp-with-runtime-build-${{ needs.setup.outputs.buildnumber }}-linux-${{ env.GITHUB_SHA_SHORT }}.zip
- name: Publish NuGet package
run: |
dotnet nuget push build/api/CounterStrikeSharp.API.1.0.${{ needs.setup.outputs.buildnumber }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push build/api/CounterStrikeSharp.API.1.0.${{ needs.setup.outputs.buildnumber }}.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Send Notification to Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@0.3.2
with:
args: "A new release of CS# has been tagged (v${{ needs.setup.outputs.buildnumber }}) at ${{ steps.release.outputs.url }}"

25
.github/workflows/lint-code.yaml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Code format checks
on:
pull_request:
paths:
- '.github/workflows/**'
- 'src/**'
- '.clang-format'
push:
paths:
- '.github/workflows/**'
- 'src/**'
- '.clang-format'
jobs:
lint:
name: Lint code with clang-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jidicula/clang-format-action@4726374d1aa3c6aecf132e5197e498979588ebc8
with:
clang-format-version: '20'
check-path: 'src'
exclude-regex: '(sdk|\.proto)'

View File

@@ -2,6 +2,7 @@ on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
@@ -22,10 +23,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Dotnet Setup
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
@@ -34,13 +35,13 @@ jobs:
- run: docfx docfx/docfx.json
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: "docfx/_site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4

50
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,50 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "sync-linux",
"type": "shell",
"command": "lftp -c \"open -u $LINUX_SERVER_SFTP_USERNAME,$LINUX_SERVER_SFTP_PASSWORD $LINUX_SERVER_SFTP_HOST; mirror -R ${workspaceFolder}/build/addons /game/csgo/addons; mirror -R ${workspaceFolder}/managed/CounterStrikeSharp.API/bin/Release/net8.0/ /game/csgo/addons/counterstrikesharp/api; mirror -R ${workspaceFolder}/managed/CounterStrikeSharp.Tests.Native/bin/Debug/net8.0/ /game/csgo/addons/counterstrikesharp/plugins/NativeTestsPlugin\"",
"dependsOn": [
"build",
"build-api",
"build-test-plugin"
],
"problemMatcher": []
},
{
"label": "build",
"type": "shell",
"group": "build",
"command": "cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -G Ninja && cmake --build build -j$(nproc)",
},
{
"label": "build-api",
"type": "shell",
"group": "build",
"command": "dotnet build -c Release",
"options": {
"cwd": "${workspaceFolder}/managed/CounterStrikeSharp.API"
}
},
{
"label": "build-test-plugin",
"type": "shell",
"group": "build",
"command": "dotnet build -c Debug",
"options": {
"cwd": "${workspaceFolder}/managed/CounterStrikeSharp.Tests.Native"
}
},
{
"label": "generate-schema",
"type": "shell",
"command": "dotnet run -- ../CounterStrikeSharp.API/Core/Schema",
"options": {
"cwd": "${workspaceFolder}/managed/CounterStrikeSharp.SchemaGen"
}
}
]
}

1528
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,11 @@ include("makefiles/shared.cmake")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(FUNCHOOK_BUILD_TESTS OFF CACHE BOOL "Disable building tests for funchook." FORCE)
set(ZYDIS_BUILD_EXAMPLES OFF CACHE BOOL "Disable building examples for Zydis." FORCE)
set(ZYDIS_BUILD_TOOLS OFF CACHE BOOL "Disable building tools for Zydis." FORCE)
set(DYNOHOOK_BUILD_TESTS OFF CACHE BOOL "Disable building tests for funchook." FORCE)
add_subdirectory(libraries/spdlog)
add_subdirectory(libraries/dyncall)
add_subdirectory(libraries/funchook)
@@ -43,6 +48,8 @@ set(SOURCE_FILES
src/core/coreconfig.cpp
src/core/gameconfig.h
src/core/gameconfig.cpp
src/core/gameconfig_updater.h
src/core/gameconfig_updater.cpp
src/core/log.h
src/core/log.cpp
src/scripting/script_engine.h
@@ -70,6 +77,7 @@ set(SOURCE_FILES
src/core/managers/con_command_manager.cpp
src/core/managers/con_command_manager.h
src/scripting/natives/natives_commands.cpp
src/scripting/natives/natives_convars.cpp
src/core/memory_module.h
src/core/memory_module.cpp
src/core/cs2_sdk/interfaces/cgameresourceserviceserver.h
@@ -83,6 +91,9 @@ set(SOURCE_FILES
src/scripting/natives/natives_schema.cpp
src/scripting/natives/natives_entities.cpp
src/scripting/natives/natives_voice.cpp
src/scripting/natives/natives_metamod.cpp
src/scripting/natives/natives_cvariant.cpp
src/scripting/natives/natives_cutil.cpp
src/core/managers/entity_manager.cpp
src/core/managers/entity_manager.h
src/core/managers/chat_manager.cpp

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
WORKDIR /workspace
RUN apt update && apt install -y \
clang-16 \
cmake \
ninja-build \
git \
zlib1g-dev \
libssl-dev \
libprotobuf-dev \
protobuf-compiler \
pkg-config \
curl && \
ln -sf /usr/bin/clang-16 /usr/bin/clang && \
ln -sf /usr/bin/clang++-16 /usr/bin/clang++

1
GitVersion.yml Normal file
View File

@@ -0,0 +1 @@
workflow: GitHubFlow/v1

85
cliff.toml Normal file
View File

@@ -0,0 +1,85 @@
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration
[remote.github]
owner = "roflmuffin"
repo = "CounterStrikeSharp"
# token = ""
[changelog]
# A Tera template to be rendered for each release in the changelog.
# See https://keats.github.io/tera/docs/#introduction
body = """
## What's Changed
{%- if version %} in {{ version }}{%- endif -%}
{% for commit in commits %}
* {{ commit.message | split(pat="\n") | first | trim }}\
{% if commit.remote.username and commit.remote.username != remote.github.owner %} by \
[@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}) \
{%- endif -%}
{% if commit.remote.pr_number %} in \
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }})\
{%- endif %}
{%- if commit.id %} ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url()}}/commit/{{ commit.id }})){%- endif -%}
{%- endfor -%}
{%- if github -%}
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
{% raw %}\n{% endraw -%}
## New Contributors
{%- endif %}\
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
* [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) made their first contribution
{%- if contributor.pr_number %} in \
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
{%- endif %}
{%- endfor -%}
{%- endif -%}
{% if version %}
{% else -%}
{% raw %}\n{% endraw %}
{% endif %}
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
"""
# Remove leading and trailing whitespaces from the changelog's body.
trim = true
# A Tera template to be rendered as the changelog's footer.
# See https://keats.github.io/tera/docs/#introduction
footer = """
<!-- generated by git-cliff -->
"""
# An array of regex based postprocessors to modify the changelog.
# Replace the placeholder `<REPO>` with a URL.
postprocessors = []
[git]
# Parse commits according to the conventional commits specification.
# See https://www.conventionalcommits.org
conventional_commits = false
# Exclude commits that do not match the conventional commits specification.
filter_unconventional = true
# Split commits on newlines, treating each line as an individual commit.
split_commits = false
# An array of regex based parsers to modify commit messages prior to further processing.
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
{ pattern = '\[no ci\]', replace = "" }
]
commit_parsers = [
{ message = "^release:", skip = true }
]
# Exclude commits that are not matched by any commit parser.
filter_commits = false
# Order releases topologically instead of chronologically.
topo_order = false
# Order of commits in each group/release within the changelog.
# Allowed values: newest, oldest
sort_commits = "newest"
tag_pattern = "v[0-9]+\\.[0-9]+\\.[0-9]+"

View File

@@ -4,7 +4,10 @@
"FollowCS2ServerGuidelines": true,
"PluginHotReloadEnabled": true,
"PluginAutoLoadEnabled": true,
"PluginResolveNugetPackages": false,
"ServerLanguage": "en",
"UnlockConCommands": true,
"UnlockConVars": true
"UnlockConVars": true,
"AutoUpdateEnabled": true,
"AutoUpdateURL": "http://gamedata.cssharp.dev"
}

View File

@@ -2,62 +2,62 @@
"UTIL_ClientPrintAll": {
"signatures": {
"library": "server",
"windows": "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 81 EC 70 01 ? ? 8B E9",
"linux": "55 48 89 E5 41 57 49 89 D7 41 56 49 89 F6 41 55 41 89 FD"
"windows": "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 60 8B E9",
"linux": "55 48 89 E5 41 57 4D 89 CF 41 56 4D 89 C6 41 55 49 89 CD 41 54 49 89 D4 53 48 8D"
}
},
"ClientPrint": {
"signatures": {
"library": "server",
"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"
"linux": "55 48 8D 05 ? ? ? ? 48 89 E5 41 57 41 89 F7 31 F6"
}
},
"CCSPlayerController_SwitchTeam": {
"signatures": {
"library": "server",
"windows": "40 56 57 48 81 EC ? ? ? ? 48 8B F9 8B F2 8B CA",
"linux": "55 48 89 E5 41 55 49 89 FD 89 F7"
"windows": "40 53 57 48 81 EC ? ? ? ? 48 8B D9 8B FA",
"linux": "55 48 89 E5 41 54 49 89 FC 89 F7"
}
},
"CCSPlayerController_ChangeTeam": {
"offsets": {
"windows": 100,
"linux": 99
"windows": 109,
"linux": 108
}
},
"CCSPlayerController_Respawn": {
"offsets": {
"windows": 257,
"linux": 259
"windows": 277,
"linux": 279
}
},
"CBasePlayerController_SetPawn": {
"signatures": {
"library": "server",
"windows": "48 89 74 24 ? 55 41 54 41 55 41 56 41 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 4C 8B F9",
"linux": "55 48 89 E5 41 57 41 56 41 55 49 89 FD 41 54 45 89 C4"
"windows": "44 88 4C 24 ? 53 57",
"linux": "55 48 8D 87 ? ? ? ? 48 89 E5 41 57 41 56 41 89 CE 41 55 45 89 CD"
}
},
"CCSPlayerPawnBase_PostThink": {
"signatures": {
"library": "server",
"windows": "48 ? ? 55 53 56 57 41 ? 48 ? ? ? 48 ? ? ? ? ? ? 4C 89 68",
"linux": "55 48 89 E5 41 56 41 55 41 54 53 48 89 FB 48 83 EC 40 E8"
"linux": "55 48 89 E5 41 56 41 55 41 54 53 48 89 FB 48 83 EC 40 E8 ? ? ? ? F3 0F 10 83"
}
},
"CGameEventManager_Init": {
"signatures": {
"library": "server",
"windows": "40 53 48 83 EC 20 48 8B 01 48 8B D9 FF 50 10",
"linux": "55 48 89 E5 41 54 49 89 FC 48 83 EC 08 48 8B 07 FF 50 18"
"linux": "55 48 89 E5 53 48 89 FB 48 83 EC 08 48 8B 07 FF 50 18"
}
},
"GiveNamedItem": {
"signatures": {
"library": "server",
"windows": "48 89 5C 24 ? 48 89 74 24 ? 55 57 41 ? 41 ? 41 ? 48 ? ? ? ? 48 ? ? ? ? ? ? 4D ? ? 48",
"linux": "55 48 89 E5 41 57 41 56 49 89 D6 41 55 49 89 CD 41 54 49 89 F4 53 48 89 FB 48 8D 3D"
"windows": "48 89 5C 24 ? 48 89 74 24 ? 55 57 41 55 41 56 41 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 4D 8B F9",
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 53 48 81 EC D8 00 00 00 48 89 8D 18 FF FF FF"
}
},
"UTIL_Remove": {
@@ -67,43 +67,50 @@
"linux": "48 89 FE 48 85 FF 74 ? 48 8D 05 ? ? ? ? 48"
}
},
"Host_Say": {
"signatures": {
"library": "server",
"windows": "44 89 4C 24 20 44 88 44 24 18",
"linux": "55 48 89 E5 41 57 41 56 49 89 F6 41 55 4D 89 C5"
}
},
"CBaseModelEntity_SetModel": {
"signatures": {
"library": "server",
"windows": "48 89 5C 24 ? 48 89 7C 24 ? 55 48 8B EC 48 83 EC 50 48 8B F9 4C 8B C2",
"linux": "55 48 89 F2 48 89 E5 41 54 49 89 FC 48 8D 7D E0 48 83 EC ? 48 8D 05 ? ? ? ? 48 8B 30 48 8B 06"
"windows": "40 53 48 83 EC ? 48 8B D9 4C 8B C2 48 8B 0D ? ? ? ? 48 8D 54 24 ? 48 8B 01 FF 50 ? 48 8B 44 24 ? 48 8D 54 24 ? 48 8B CB 48 89 44 24 ? E8 ? ? ? ? 48 83 C4 ? 5B C3 CC CC CC CC CC 48 89 5C 24",
"linux": "55 48 89 F2 48 89 E5 53 48 89 FB 48 8D 7D ? 48 83 EC ? 48 8D 05 ? ? ? ? 48 8B 30 48 8B 06 FF 50 ? 48 8B 45 ? 48 8D 75 ? 48 89 DF 48 89 45 ? E8 ? ? ? ? 48 8B 5D ? C9 C3 CC CC CC 55"
}
},
"CCSPlayer_WeaponServices_CanUse": {
"signatures": {
"library": "server",
"windows": "48 89 5C 24 ? 48 89 6C 24 ? 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"
"windows": "48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 56 48 83 EC ? 48 8B 01 48 8B FA",
"linux": "55 48 8D 15 ? ? ? ? 48 89 E5 41 55 41 54 49 89 FC 53 48 89 F3 48 83 EC ? 48 8B 07 48 8B 80 ? ? ? ?"
}
},
"CCSPlayer_ItemServices_CanAcquire": {
"signatures": {
"library": "server",
"windows": "44 89 44 24 ? 48 89 54 24 ? 48 89 4C 24 ? 55 53 56 57 41 55 41 56 41 57 48 8B EC",
"linux": "55 48 89 E5 41 57 41 56 41 55 49 89 CD 41 54 49 89 FC 53 48 89 F3 48 83 EC 78"
}
},
"GetCSWeaponDataFromKey": {
"signatures": {
"library": "server",
"windows": "48 89 5C 24 ? 57 48 83 EC ? 33 FF 4C 8B CA 8B D9",
"linux": "55 31 D2 48 89 E5 41 56 41 55 41 54"
}
},
"CCSPlayer_ItemServices_GiveNamedItem": {
"offsets": {
"windows": 19,
"linux": 20
"windows": 18,
"linux": 19
}
},
"CCSPlayer_ItemServices_DropActivePlayerWeapon": {
"offsets": {
"windows": 20,
"linux": 21
"windows": 21,
"linux": 22
}
},
"CCSPlayer_ItemServices_RemoveWeapons": {
"offsets": {
"windows": 21,
"linux": 22
"windows": 22,
"linux": 23
}
},
"CGameSceneNode_GetSkeletonInstance": {
@@ -115,8 +122,20 @@
"CCSGameRules_TerminateRound": {
"signatures": {
"library": "server",
"windows": "48 8B C4 4C 89 48 ? 48 89 48 ? 55 41 55",
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 49 89 FC 53 48 81 EC 88 00 00 00 48 8D 05 ? ? ? ?"
"windows": "48 8B C4 4C 89 48 ? 48 89 48 ? 55 56",
"linux": "55 48 89 E5 41 57 41 56 49 89 FE 41 55 41 54 53 48 81 EC ? ? ? ? 48 8D 05 ? ? ? ? F3 0F 11 85"
}
},
"CCSGameRules_FindPickerEntity": {
"offsets": {
"windows": 25,
"linux": 26
}
},
"CTakeDamageInfo_HitGroup": {
"offsets": {
"windows": 104,
"linux": 104
}
},
"UTIL_CreateEntityByName": {
@@ -130,61 +149,68 @@
"signatures": {
"library": "server",
"windows": "48 89 5C 24 10 57 48 83 EC 30 48 8B DA 48 8B F9 48 85 C9",
"linux": "48 85 FF 74 ? 55 48 89 E5 41 56"
"linux": "48 85 FF 74 ? 55 48 89 E5 41 55 49 89 FD"
}
},
"CBaseEntity_EmitSoundFilter": {
"signatures": {
"library": "server",
"windows": "40 53 48 83 EC ? 4C 89 4C 24 ? 48 8B D9 45 8B C8",
"linux": "55 48 89 E5 53 48 89 FB 48 83 EC ? E8 ? ? ? ? 48 89 D8 48 8B 5D ? C9 C3 CC CC CC CC CC CC 48 B8"
}
},
"CEntityInstance_AcceptInput": {
"signatures": {
"library": "server",
"windows": "48 89 5C 24 10 48 89 74 24 18 57 48 83 EC 40 49 8B F0",
"linux": "55 48 89 E5 41 57 49 89 FF 41 56 48 8D 7D C0"
"windows": "89 5C 24 ? 48 89 74 24 ? 57 48 83 EC ? 49 8B F0 48 8B D9 48 8B 0D",
"linux": "55 48 89 F0 48 89 E5 41 57 49 89 FF 41 56 48 8D 7D C0"
}
},
"CEntitySystem_AddEntityIOEvent": {
"signatures": {
"library": "server",
"windows": "48 89 5C 24 ? 48 89 74 24 ? 57 48 ? ? ? 49 ? ? 48 ? ? 48 ? ? 74",
"linux": "55 41 BA FF FF FF FF"
"windows": "48 89 5C 24 ? 4C 89 4C 24 ? 48 89 4C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 83 EC ? 49 8B F9",
"linux": "55 48 89 E5 41 55 49 89 CD 41 54 49 89 FC"
}
},
"LegacyGameEventListener": {
"signatures": {
"library": "server",
"windows": "48 8B 15 ? ? ? ? 48 85 D2 74 ? 85 C9 74",
"linux": "48 8B 05 ? ? ? ? 48 85 C0 74 ? 85 FF"
"windows": "48 8B 15 ? ? ? ? 48 85 D2 74 ? 83 F9 ? 77 ? 48 63 C1 48 C1 E0",
"linux": "48 8B 05 ? ? ? ? 48 85 C0 74 ? 83 FF ? 77 ? 48 63 FF 48 C1 E7 ? 48 8D 44 38"
}
},
"CBasePlayerPawn_CommitSuicide": {
"offsets": {
"windows": 377,
"linux": 377
"windows": 408,
"linux": 408
}
},
"CBasePlayerPawn_RemovePlayerItem": {
"signatures": {
"library": "server",
"windows": "48 ? ? 0F 84 ? ? ? ? 48 89 5C 24 ? 57 48 ? ? ? 48 ? ? 48 ? ? E8",
"linux": "55 48 89 ? 41 ? 49 89 ? 41 ? 49 89 ? E8 ? ? ? ? 49 39"
"linux": "55 48 89 E5 41 54 49 89 FC 53 48 89 F3 E8 ? ? ? ? 48 39 C3 74 ? 4C 89 E7 E8 ? ? ? ? 48 39 C3 74 ? 4C 89 E7 48 89 DE E8 ? ? ? ? 48 89 DF 5B 41 5C 5D E9 ? ? ? ? 0F 1F 44 00 00"
}
},
"CBaseEntity_Teleport": {
"offsets": {
"windows": 157,
"linux": 156
"windows": 168,
"linux": 167
}
},
"CBaseEntity_TakeDamageOld": {
"signatures": {
"library": "server",
"windows": "48 89 74 24 ? 57 48 81 EC 80 00 00 00 48 8B 41",
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 49 89 FC 53 48 83 EC 58 4C 8D 3D"
"windows": "40 55 41 54 41 55 41 56 41 57 48 81 EC ? ? ? ? 48 8D 6C 24 ? 48 89 9D ? ? ? ? 45 33 ED",
"linux": "55 48 89 E5 41 57 41 56 49 89 F6 41 55 41 54 49 89 FC 53 48 89 D3 48 83 EC ? 48 85 D2"
}
},
"CBaseTrigger_StartTouch": {
"signatures": {
"library": "server",
"windows": "40 57 41 57 48 83 EC 28 48 8B 01",
"linux": "55 48 89 E5 41 56 49 89 F6 41 55 49 89 FD 41 54 53 BB"
"windows": "40 57 41 56 48 83 EC ? 48 8B 01",
"linux": "55 48 89 E5 41 56 41 55 49 89 F5 41 54 53 48 89 FB 48 83 EC 10 48 8B 07"
}
},
"CBaseTrigger_EndTouch": {
@@ -194,20 +220,6 @@
"linux": "55 BA FF FF FF FF 48 89 E5 41 57 41 56 41 55 49 89 F5 41"
}
},
"StateChanged": {
"signatures": {
"library": "server",
"windows": "40 55 53 56 41 56 41 57 48 8D 6C 24 ? 48 81 EC 70 01 00 00",
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 53 89 D3"
}
},
"NetworkStateChanged": {
"signatures": {
"library": "server",
"windows": "4C 8B C9 48 8B 09 48 85 C9 74 ? 48 8B 41 10",
"linux": "4C 8B 07 4D 85 C0 74 ? 49 8B 40 10"
}
},
"GameEntitySystem": {
"offsets": {
"windows": 88,
@@ -223,15 +235,15 @@
"CEntityIOOutput_FireOutputInternal": {
"signatures": {
"library": "server",
"windows": "4C 89 4C 24 20 53 55 57 41 54 41 56 48 81 EC",
"linux": "55 48 89 E5 41 57 41 56 41 55 41 54 49 89 D4 53 48 89 F3 48 83 EC 58"
"windows": "4C 89 4C 24 ? 48 89 4C 24 ? 53 56",
"linux": "55 48 89 E5 41 57 49 89 FF 41 56 41 55 41 54 49 89 D4 53 48 89 F3"
}
},
"IGameSystem_InitAllSystems_pFirst": {
"signatures": {
"library": "server",
"windows": "48 8B 3D ? ? ? ? 48 85 FF 0F 84 ? ? ? ? BE",
"linux": "4C 8B 35 ? ? ? ? 4D 85 F6 75 ? E9"
"windows": "48 8B 1D ? ? ? ? 48 85 DB 0F 84 ? ? ? ? BD",
"linux": "4C 8B 35 ? ? ? ? 4D 85 F6 75"
}
},
"CEntityResourceManifest_AddResource": {
@@ -239,5 +251,44 @@
"windows": 2,
"linux": 0
}
},
"CheckTransmit": {
"signatures": {
"library": "server",
"windows": "48 8B C4 4C 89 48 ? 48 89 50 ? 48 89 48 ? 55 48 8D A8",
"linux": "55 48 89 E5 41 57 49 89 FF 41 56 48 8D 3D ? ? ? ? 41 55 41 89 D5"
}
},
"CheckTransmitPlayerSlot": {
"offsets": {
"windows": 576,
"linux": 576
}
},
"NetworkStateChanged": {
"signatures": {
"library": "server",
"windows": "4C 8B C2 48 8B D1 48 8B 09",
"linux": "48 8B 07 48 85 C0 74 ? 48 8B 50 10"
}
},
"SetStateChanged": {
"offsets": {
"windows": 25,
"linux": 26
}
},
"ISource2GameEntities::CheckTransmit": {
"offsets": {
"windows": 12,
"linux": 13
}
},
"Host_Say": {
"signatures": {
"library": "server",
"windows": "44 89 4C 24 20 44 88 44 24 18",
"linux": "55 48 89 E5 41 57 49 89 F7 41 56 41 55 41 54 4D 89 C4"
}
}
}

View File

@@ -0,0 +1,27 @@
{
"menu.button.previous": "Prev",
"menu.button.next": "Next",
"menu.button.close": "Close",
"all": "all players",
"bots": "bots",
"humans": "humans",
"alive": "alive players",
"dead": "dead players",
"notme": "all players except self",
"ct": "ct players",
"t": "t players",
"spec": "spec players",
"No matching client": "No matching client was found.",
"No matching clients": "No matching clients were found.",
"Target must be alive": "This command can only be used on alive players.",
"Target must be dead": "This command can only be used on dead players.",
"Unable to target": "You cannot target this player.",
"Cannot target bot": "Unable to perform this command on a bot.",
"More than one client matched": "More than one client matched the given pattern.",
"Missing permissions": "You are missing the correct permissions",
"Missing one permission": "You do not have one of the correct permissions",
"Command permission denied": "[CSS] {0} ({1}) to execute this command."
}

View File

@@ -0,0 +1,27 @@
{
"menu.button.previous": "Anterior",
"menu.button.next": "Siguiente",
"menu.button.close": "Cerrar",
"all": "todos los jugadores",
"bots": "bots",
"humans": "humanos",
"alive": "jugadores vivos",
"dead": "jugadores muertos",
"notme": "todos los jugadores excepto yo",
"ct": "jugadores CT",
"t": "jugadores T",
"spec": "espectadores",
"No matching client": "No se encontró ningún cliente que coincida.",
"No matching clients": "No se encontraron clientes que coincidan.",
"Target must be alive": "Este comando solo puede usarse en jugadores vivos.",
"Target must be dead": "Este comando solo puede usarse en jugadores muertos.",
"Unable to target": "No puedes seleccionar a este jugador.",
"Cannot target bot": "No se puede ejecutar este comando en un bot.",
"More than one client matched": "Más de un cliente coincidió con el patrón dado.",
"Missing permissions": "No tienes los permisos correctos",
"Missing one permission": "No tienes uno de los permisos correctos",
"Command permission denied": "[CSS] {0} ({1}) para ejecutar este comando."
}

View File

@@ -0,0 +1,27 @@
{
"menu.button.previous": "Geri",
"menu.button.next": "İleri",
"menu.button.close": ıkış",
"all": "tüm oyuncular",
"bots": "botlar",
"humans": "insanlar",
"alive": "hayatta olan oyuncular",
"dead": "ölü oyuncular",
"notme": "kendi hariç tüm oyuncular",
"ct": "CT oyuncular",
"t": "T oyuncular",
"spec": "izleyici oyuncular",
"No matching client": "{white}Eşleşen bir istemci bulunamadı.",
"No matching clients": "{white}Eşleşen istemciler bulunamadı.",
"Target must be alive": "{white}Bu komut yalnızca hayatta olan oyunculara uygulanabilir.",
"Target must be dead": "{white}Bu komut yalnızca ölü oyunculara uygulanabilir.",
"Unable to target": "{white}Bu oyuncu hedeflenemez.",
"Cannot target bot": "{white}Bu komut bir bota uygulanamaz.",
"More than one client matched": "{white}Verilen kalıba birden fazla istemci eşleşti.",
"Missing permissions": "{white}Doğru izinlere sahip değilsiniz",
"Missing one permission": "{white}Doğru izinlerden birine sahip değilsiniz",
"Command permission denied": "[CSS] {0} ({1}) bu komutu çalıştırmak için."
}

80
create-release.sh Executable file
View File

@@ -0,0 +1,80 @@
#!/bin/bash
set -e
DRY_RUN=false
if [[ "$1" == "--dry-run" || "$1" == "-d" ]]; then
DRY_RUN=true
echo "Running in DRY-RUN mode - no changes will be pushed"
fi
echo "Starting automated release process..."
echo "Fetching latest tags from remote..."
git fetch --tags
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v1.0.0")
echo "Latest tag found: $LATEST_TAG"
if [[ $LATEST_TAG =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
MAJOR=${BASH_REMATCH[1]}
MINOR=${BASH_REMATCH[2]}
PATCH=${BASH_REMATCH[3]}
else
echo "Error: Could not parse version from tag $LATEST_TAG"
echo "Expected format: v1.0.x (e.g., v1.0.322)"
exit 1
fi
NEW_PATCH=$((PATCH + 1))
NEW_TAG="v$MAJOR.$MINOR.$NEW_PATCH"
echo "New version will be: $NEW_TAG"
echo "Generating changelog with git-cliff..."
npx git-cliff -o CHANGELOG.md -t "$NEW_TAG"
if ! git diff --quiet CHANGELOG.md; then
echo "Changelog updated successfully"
git add CHANGELOG.md
COMMIT_MSG="release: $NEW_TAG"
echo "Committing changelog with message: $COMMIT_MSG"
if [ "$DRY_RUN" = true ]; then
git commit -m "$COMMIT_MSG"
echo "Creating tag locally: $NEW_TAG"
git tag "$NEW_TAG"
echo "DRY-RUN: Would push commit to remote"
echo "DRY-RUN: Would push tag to remote"
else
git commit -m "$COMMIT_MSG"
echo "Pushing commit to remote..."
git push origin $(git branch --show-current)
echo "Creating and pushing tag: $NEW_TAG"
git tag "$NEW_TAG"
git push origin tag "$NEW_TAG"
fi
echo "Release $NEW_TAG completed successfully!"
echo "Summary:"
echo " - Previous version: $LATEST_TAG"
echo " - New version: $NEW_TAG"
echo " - Changelog updated: Yes"
if [ "$DRY_RUN" = true ]; then
echo " - Commit pushed: (dry-run)"
echo " - Tag created and pushed: (dry-run)"
else
echo " - Commit pushed: Yes"
echo " - Tag created and pushed: Yes"
fi
else
echo "No changes detected in CHANGELOG.md"
echo "This might indicate that there are no new commits since the last release."
exit 1
fi

View File

@@ -54,6 +54,9 @@ The specific subclass of `GameEvent` will provide strongly typed parameters from
These event properties are mutable so you can update them as normal and they will update in the event instance.
> [!CAUTION]
> `GameEvent` instances and their properties will cease to exist after the event listener function is called, which means that you will encounter errors when accessing properties in timers and functions like `Server.NextFrame()`. You should store the value of properties in variables before calling functions like `Server.NextFrame()` so you can read the data safely.
## Preventing Broadcast
You can modify a game event so that it does not get broadcast to clients by modifying the `bool info.DontBroadcast` property. e.g.

View File

@@ -5,6 +5,9 @@ description: How to add inter-plugin communication to CounterStrikeSharp plugins
# Shared Plugin API
> [!NOTE]
> **New (experimental)**: You can now resolve plugin dependencies directly from your local **NuGet packages cache** instead of copying every DLL into the `shared/` folder. See **Dependency Resolution** below. This feature **disabled by default.**
How to expose and use shared plugin APIs between multiple plugins.
## Creating a Contract Library
@@ -65,3 +68,36 @@ balance.Add(500);
```
This value _MUST_ be checked for null, as if there are no plugins providing implementations for a given capability, this method will return null, and you must handle this flow in your plugin.
## Dependency Resolution
CounterStrikeSharp supports two complementary ways to resolve **external** assemblies used by your plugins and shared contracts:
1. **Shared Folder Resolution (manual)**: copy dependency DLLs into `shared/<PackageName>/<Assembly>.dll`.
2. **NuGet Dependency Resolver (auto)**: when enabled, resolves missing assemblies from the local **NuGet packages root**
### Enabling the NuGet Resolver
Add the following property to your core config (disabled by default):
```json
{
...
"PluginResolveNugetPackages": true
...
}
```
> [!NOTE]
> The engine looks for assemblies in the NuGet cache defined by the `NUGET_PACKAGES` environment variable, or falls back to the default user cache (e.g., `~/.nuget/packages` on Linux/macOS, `%UserProfile%\.nuget\packages` on Windows).
### Dependencies Resolution Order
When the NuGet resolver is **enabled**, resolution proceeds in this general order:
1. **Plugins directory** (in-place assemblies)
2. `shared/` **folder** (existing shared assemblies mechanism)
3. **NuGet cache** (auto-resolver)
This lets you keep proven `shared/` workflows while reducing manual copying for common NuGet dependencies.

View File

@@ -0,0 +1,99 @@
---
title: Automatically build/deploy your changes
description: Automatically build and deploy plugin changes to a remote development server as you work.
---
# Automatically build and deploy your changes
<sup>Adapted from the
[original guide](https://github.com/uFloppyDisk/create-cssharp-plugin/blob/c8fca43f86a61a5e874624f2f3ed39c5271c9a55/templates/standard-plugin/docs/auto-live-hot-reloading.md).
</sup>
During development of your plugin, you may find yourself repeating a workflow
similar to the following:
1. Make a change to your plugin
2. Run your build task (ex. `dotnet build`)
3. Upload plugin DLLs to your server using an FTP client
4. Alt-tab to the game
5. Test your changes
6. Repeat
Iterating on your plugin this way is painfully slow and impacts your productivity.
Below, you will find a guide and recommendations on how to setup your dev environment
to watch for file changes and automatically update plugin files on your server as you work.
By following this guide, your new workflow should look like this:
1. Make a change to your plugin
2. Alt-tab to the game
3. Test your changes
4. Repeat
> [!CAUTION]
> Exercise caution when developing your plugin while using this workflow.
> Build time errors are mostly caught by .NET SDK before files are committed
> but incomplete implementation may lead to issues such as server crashes.
> Avoid using this workflow on a production server meant for players.
## Setup
#### 1. Build plugin on file changes
The `dotnet` CLI, included with the .NET SDK, offers a convenient command for
automatically watching for source file changes. If you have access to the `dotnet`
CLI, run the following command to start watching your source code.
```shell
dotnet watch build --project path/to/projectName.csproj
```
<sup>By default, `dotnet watch` executes the `dotnet run` command on file changes
so specifying `build` as the first argument is required.</sup>
Your plugin will now build automatically on file change. By default, your builds
should be placed in `bin/<config>/<framework>` in the same directory as your `.csproj`.
```txt
projectDirectory
├── projectName.csproj
├── bin
│   └── Debug
│   └── net8.0
│      └── PLUGIN BUILDS HERE
```
> [!TIP]
> You can have your plugin build to a more convenient location by setting the
> `<OutDir>` build property in your `.csproj` file.
> Example: `<OutDir>./build/$(MSBuildProjectName)</OutDir>`
#### 2. Setup automatic uploads
##### Using WinSCP (Windows only)
Once connected to your server:
1. Go to the `Commands` tab at the top of the WinSCP window
and click `Keep Remote Directory up to Date`.
2. Select the plugin build directory containing your DLLs.
3. Select the plugin destination.
(`csgo/addons/counterstrikesharp/plugins/<projectName>`)
4. Click `Start`
> [!IMPORTANT]
> **For WSL users:**
> Applications running on Windows, such as WinSCP, cannot watch your Linux subsystem for file
> changes. Try using [this workaround](#using-winscp-while-developing-in-wsl) or consider
> moving development to Windows.
##### Using `lsyncd` (Linux)
> **TODO:** in-depth guide for setting up lsyncd
Learn more about `lsyncd`: https://github.com/lsyncd/lsyncd
___
#### Using WinSCP while developing in WSL
Run the following watch command in place of the one mentioned in
[Step 1](#1-build-plugin-on-file-changes) to build to a directory in your Windows filesystem
```shell
dotnet watch build --project path/to/<projectName>.csproj --property:OutDir=/mnt/<drive-letter>/some/path/<projectName>`
```
and have [WinSCP in Step 2](#2-setup-automatic-uploads) watch that path instead.
[Learn about Windows filesystem mounts in WSL](https://blogs.windows.com/windowsdeveloper/2016/07/22/fun-with-the-windows-subsystem-for-linux/#Working%20with%20Windows%20files:~:text=Working%20with%20Windows%20files)

View File

@@ -10,7 +10,7 @@ In this guide you will learn how to install CounterStrikeSharp onto your vanilla
If you're more of a visual person, here is a <a href="https://www.youtube.com/watch?v=FlsKzStHJuY" target="_blank">Youtube video</a> that covers everything.
## Prerequisites
- <a href="https://www.sourcemm.net/downloads.php/?branch=master" target="_blank">Metamod: Source 2.X Dev Build</a>
- <a href="https://www.metamodsource.net/downloads.php/?branch=master" target="_blank">Metamod: Source 2.X Dev Build</a>
- <a href="https://github.com/roflmuffin/CounterStrikeSharp/releases" target="_blank">CounterStrikeSharp With Runtime</a>
## Installing Metamod

View File

@@ -6,3 +6,9 @@
- name: Dependency Injection
href: dependency-injection.md
- name: Referencing Players
href: referencing-players.md
- name: Automatically build and deploy your changes
href: auto-build-and-deploy.md

View File

@@ -47,3 +47,10 @@ When enabled, will remove the `FCVAR_HIDDEN`,`FCVAR_DEVELOPMENTONLY`, `FCVAR_MIS
## UnlockConVars
When enabled, will remove the `FCVAR_HIDDEN`,`FCVAR_DEVELOPMENTONLY`, `FCVAR_MISSING0`, `FCVAR_MISSING1`, `FCVAR_MISSING2`, `FCVAR_MISSING3` flags from all console variables.
## AutoUpdateEnabled
When enabled, CS# will check for any updates to the gamedata.json file and automatically update it if a new version is available.
## AutoUpdateURL
The URL to use for the auto-update feature. This URL should point to a JSON file that contains the latest version of the gamedata.json file.

View File

@@ -1,5 +1,2 @@
- name: Core Configuration
href: core-configuration.md
- name: Referencing Players
href: referencing-players.md
href: core-configuration.md

View File

@@ -16,6 +16,7 @@
using System;
using System.Drawing;
using System.Numerics;
using WarcraftPlugin.Effects;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Events;
@@ -67,10 +68,10 @@ namespace WarcraftPlugin.Races
private void Dash(float distance)
{
var directionVec = new Vector();
var directionVec = new Vector3();
NativeAPI.AngleVectors(Player.PlayerPawn.Value.EyeAngles.Handle, directionVec.Handle, IntPtr.Zero,
IntPtr.Zero);
// NativeAPI.AngleVectors(&Player.PlayerPawn.Value.EyeAngles, directionVec.Handle, IntPtr.Zero,
// IntPtr.Zero);
// Always shoot us up a little bit if were on the ground and not aiming up.
if (Player.GroundEntity.IsValid != null && directionVec.Z < 0.275)
@@ -80,9 +81,7 @@ namespace WarcraftPlugin.Races
directionVec *= distance;
Player.PlayerPawn.Value.AbsVelocity.X = directionVec.X;
Player.PlayerPawn.Value.AbsVelocity.Y = directionVec.Y;
Player.PlayerPawn.Value.AbsVelocity.Z = directionVec.Z;
Player.PlayerPawn.Value.AbsVelocity = directionVec;
}
private void PlayerHurtOther(GameEvent obj)
@@ -196,4 +195,4 @@ namespace WarcraftPlugin.Races
Console.WriteLine("Freeze finished");
}
}
}
}

View File

@@ -0,0 +1,2 @@
# With CheckTransmit
This example shows how to work with the `CheckTransmit` listener.

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\managed\CounterStrikeSharp.API\CounterStrikeSharp.API.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,115 @@
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Core.Attributes;
namespace WithCheckTransmit;
[MinimumApiVersion(276)]
public class WithCheckTransmitPlugin : BasePlugin
{
public override string ModuleName => "Example: With CheckTransmit";
public override string ModuleVersion => "1.0.0";
public override string ModuleAuthor => "CounterStrikeSharp & Contributors";
public override string ModuleDescription => "A simple plugin that uses the CheckTransmit listener!";
private Dictionary<int, bool> ShouldSeeDoors = new Dictionary<int, bool>();
public override void Load(bool hotReload)
{
// This command is related to the following example.
AddCommand("nodoors", "Toggle door transmit", (player, info) =>
{
if (player == null)
return;
if (ShouldSeeDoors.ContainsKey(player.Slot))
{
ShouldSeeDoors[player.Slot] = !ShouldSeeDoors[player.Slot];
} else
{
ShouldSeeDoors.Add(player.Slot, false);
}
info.ReplyToCommand($"You should {(ShouldSeeDoors[player.Slot] ? "see" : "not see")} doors");
});
// In this example, we will hide every door for players that have enabled the option with the command 'nodoors'
RegisterListener<Listeners.CheckTransmit>((CCheckTransmitInfoList infoList) =>
{
// Get the list of the currently available doors (prop_door_rotating)
IEnumerable<CPropDoorRotating> doors = Utilities.FindAllEntitiesByDesignerName<CPropDoorRotating>("prop_door_rotating");
// Do nothing if there is none.
if (!doors.Any())
return;
// Go through every received info
foreach ((CCheckTransmitInfo info, CCSPlayerController? player) in infoList)
{
// If no player is found, we can continue
if (player == null)
continue;
// Otherwise, lets do the work:
// Check if we should clear or not:
// If we have no data saved for this player, then we should not continue
if (!ShouldSeeDoors.ContainsKey(player.Slot))
continue;
// If this value is true, then this player should see doors
if (ShouldSeeDoors[player.Slot])
continue;
// Otherwise, lets remove the door entity indexes from the info list so they won't be transmitted
foreach (CPropDoorRotating door in doors)
{
info.TransmitEntities.Remove(door);
}
// NOTE: this is a barebone example, saving data and doing sanity checks is up to you.
}
});
// In this example, we will hide other players in the same team as the player.
// NOTE: 'Hiding' players requires extra work to do, killing non-transmitted players results in crash.
RegisterListener<Listeners.CheckTransmit>((CCheckTransmitInfoList infoList) =>
{
// Get the list of the current players, we only work with this value later on
List<CCSPlayerController> players = Utilities.GetPlayers();
// Go through every received info
foreach ((CCheckTransmitInfo info, CCSPlayerController? player) in infoList)
{
// If no player is found, we can continue
if (player == null)
continue;
// Otherwise, lets do the work:
// as an example, lets hide everyone for this player who is in the same team.
IEnumerable<CCSPlayerController> targetPlayers = players.Where(p =>
// is the player and its pawn valid
p.IsValid && p.Pawn.IsValid &&
// we shouldn't hide ourselves
p.Slot != player.Slot &&
// is the player is in the same team
p.Team == player.Team &&
// is alive
p.PlayerPawn.Value?.LifeState == (byte)LifeState_t.LIFE_ALIVE
);
foreach (CCSPlayerController targetPlayer in targetPlayers)
{
// Calling 'Remove' will clear the entity index of the target player pawn from the transmission list
// so it won't be transmitted for the 'player'.
info.TransmitEntities.Remove(targetPlayer.Pawn.EntityIndex);
}
}
});
}
}

View File

@@ -1,38 +1,60 @@
using System.Text.Json.Serialization;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Core.Attributes;
namespace WithConfig;
public class SampleConfig : BasePluginConfig
{
[JsonPropertyName("ChatPrefix")] public string ChatPrefix { get; set; } = "My Cool Plugin";
[JsonPropertyName("ChatInterval")] public float ChatInterval { get; set; } = 60;
}
[MinimumApiVersion(80)]
public class WithConfigPlugin : BasePlugin, IPluginConfig<SampleConfig>
{
public override string ModuleName => "Example: With Config";
public override string ModuleVersion => "1.0.0";
public SampleConfig Config { get; set; }
public void OnConfigParsed(SampleConfig config)
{
// Do manual verification of the config and override any invalid values
if (config.ChatInterval > 60)
{
config.ChatInterval = 60;
}
if (config.ChatPrefix.Length > 25)
{
throw new Exception($"Invalid value has been set to config value 'ChatPrefix': {config.ChatPrefix}");
}
// Once we've validated the config, we can set it to the instance
Config = config;
}
}
using System.Text.Json.Serialization;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Core.Attributes;
using CounterStrikeSharp.API.Core.Attributes.Registration;
using CounterStrikeSharp.API.Modules.Admin;
using CounterStrikeSharp.API.Modules.Commands;
using CounterStrikeSharp.API.Modules.Config;
using CounterStrikeSharp.API.Modules.Extensions;
namespace WithConfig;
public class SampleConfig : BasePluginConfig
{
[JsonPropertyName("ChatPrefix")] public string ChatPrefix { get; set; } = "My Cool Plugin";
[JsonPropertyName("ChatInterval")] public float ChatInterval { get; set; } = 60;
}
[MinimumApiVersion(80)]
public class WithConfigPlugin : BasePlugin, IPluginConfig<SampleConfig>
{
public override string ModuleName => "Example: With Config";
public override string ModuleVersion => "1.0.0";
public SampleConfig Config { get; set; }
public void OnConfigParsed(SampleConfig config)
{
// Do manual verification of the config and override any invalid values
if (config.ChatInterval > 60)
{
config.ChatInterval = 60;
}
if (config.ChatPrefix.Length > 25)
{
throw new Exception($"Invalid value has been set to config value 'ChatPrefix': {config.ChatPrefix}");
}
// Once we've validated the config, we can set it to the instance
Config = config;
}
[ConsoleCommand("css_reload_config", "Reloads the plugin config")]
public void OnReloadConfig(CCSPlayerController? player, CommandInfo commandInfo)
{
commandInfo.ReplyToCommand("Chat Interval before reload: " + Config.ChatInterval);
Config.Reload();
commandInfo.ReplyToCommand("Chat Interval after reload: " + Config.ChatInterval);
}
[ConsoleCommand("css_reset_config", "Resets the plugin config")]
public void OnResetConfig(CCSPlayerController? player, CommandInfo commandInfo)
{
commandInfo.ReplyToCommand("Chat Interval before reset: " + Config.ChatInterval);
Config.ChatInterval = 60;
Config.Update();
commandInfo.ReplyToCommand("Chat Interval after reset: " + Config.ChatInterval);
}
}

12818
libraries/httplib/httplib.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof -Wno-reorder")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse -msse -fno-strict-aliasing")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics -v -fvisibility=default")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs=libprotobuf.a")
set(

View File

@@ -11,7 +11,7 @@ set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING
FORCE
)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
if(LINUX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
@@ -35,10 +35,10 @@ else()
add_definitions(-DGITHUB_SHA="Local")
endif()
if(DEFINED ENV{BUILD_NUMBER})
add_definitions(-DBUILD_NUMBER="$ENV{BUILD_NUMBER}")
if(DEFINED ENV{SEMVER})
add_definitions(-DSEMVER="$ENV{SEMVER}")
else()
add_definitions(-DBUILD_NUMBER="0")
add_definitions(-DSEMVER="Local")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
@@ -58,7 +58,6 @@ include_directories(
${SOURCESDK}/public/tier1
${SOURCESDK}/public/entity2
${SOURCESDK}/public/game/server
${SOURCESDK}/public/entity2
${SOURCESDK}/public/schemasystem
${METAMOD_DIR}/core
${METAMOD_DIR}/core/sourcehook

View File

@@ -11,8 +11,10 @@ using CounterStrikeSharp.API.Core.Plugin;
using CounterStrikeSharp.API.Core.Plugin.Host;
using CounterStrikeSharp.API.Core.Translations;
using CounterStrikeSharp.API.Modules.Admin;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Serilog;
@@ -44,7 +46,11 @@ public static class Bootstrap
services.AddSingleton<IPluginManager, PluginManager>();
services.AddSingleton<IPlayerLanguageManager, PlayerLanguageManager>();
services.AddScoped<IPluginContextQueryHandler, PluginContextQueryHandler>();
services.AddSingleton<ICommandManager, CommandManager>();
services.AddSingleton<ICommandManager, CommandManager>();
services.TryAddSingleton<IStringLocalizerFactory, CoreJsonStringLocalizerFactory>();
services.TryAddTransient(typeof(IStringLocalizer<>), typeof(StringLocalizer<>));
services.TryAddTransient(typeof(IStringLocalizer), typeof(StringLocalizer));
services.Scan(i => i.FromCallingAssembly()
.AddClasses(c => c.AssignableTo<IStartupService>())
@@ -71,4 +77,4 @@ public static class Bootstrap
return 0;
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -17,6 +17,7 @@
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CounterStrikeSharp.API.Core.Commands;
using CounterStrikeSharp.API.Core.Hosting;
using CounterStrikeSharp.API.Core.Plugin;
@@ -28,6 +29,7 @@ using CounterStrikeSharp.API.Modules.Entities;
using CounterStrikeSharp.API.Modules.Menu;
using CounterStrikeSharp.API.Modules.Utils;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
namespace CounterStrikeSharp.API.Core
@@ -35,6 +37,8 @@ namespace CounterStrikeSharp.API.Core
public sealed class Application
{
private static Application _instance = null!;
public static IStringLocalizer Localizer => Instance._localizer;
public ILogger Logger { get; }
public static Application Instance => _instance!;
@@ -48,11 +52,12 @@ namespace CounterStrikeSharp.API.Core
private readonly IPluginContextQueryHandler _pluginContextQueryHandler;
private readonly IPlayerLanguageManager _playerLanguageManager;
private readonly ICommandManager _commandManager;
private readonly IStringLocalizer _localizer;
public Application(ILoggerFactory loggerFactory, IScriptHostConfiguration scriptHostConfiguration,
GameDataProvider gameDataProvider, CoreConfig coreConfig, IPluginManager pluginManager,
IPluginContextQueryHandler pluginContextQueryHandler, IPlayerLanguageManager playerLanguageManager,
ICommandManager commandManager)
ICommandManager commandManager, IStringLocalizer localizer)
{
Logger = loggerFactory.CreateLogger("Core");
_scriptHostConfiguration = scriptHostConfiguration;
@@ -62,11 +67,28 @@ namespace CounterStrikeSharp.API.Core
_pluginContextQueryHandler = pluginContextQueryHandler;
_playerLanguageManager = playerLanguageManager;
_commandManager = commandManager;
_localizer = localizer;
_instance = this;
}
public void Start()
{
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
{
if ((e.ExceptionObject as Exception) is PluginTerminationException pluginEx)
{
return;
}
};
TaskScheduler.UnobservedTaskException += (sender, e) =>
{
if (e.Exception.InnerExceptions.Any(ex => ex is PluginTerminationException))
{
e.SetObserved();
}
};
Logger.LogInformation("CounterStrikeSharp is starting up...");
_coreConfig.Load();
@@ -122,123 +144,135 @@ namespace CounterStrikeSharp.API.Core
switch (info.GetArg(1))
{
case "list":
{
info.ReplyToCommand(
$" List of all plugins currently loaded by CounterStrikeSharp: {_pluginManager.GetLoadedPlugins().Count()} plugins loaded.");
foreach (var plugin in _pluginManager.GetLoadedPlugins())
{
var sb = new StringBuilder();
sb.AppendFormat(" [#{0}:{1}]: \"{2}\" ({3})", plugin.PluginId,
plugin.State.ToString().ToUpper(), plugin.Plugin?.ModuleName ?? "Unknown",
plugin.Plugin?.ModuleVersion ?? "Unknown");
if (!string.IsNullOrEmpty(plugin.Plugin?.ModuleAuthor))
sb.AppendFormat(" by {0}", plugin.Plugin.ModuleAuthor);
if (!string.IsNullOrEmpty(plugin.Plugin?.ModuleDescription))
{
sb.Append("\n");
sb.Append(" ");
sb.Append(plugin.Plugin.ModuleDescription);
}
info.ReplyToCommand(sb.ToString());
}
break;
}
case "start":
case "load":
{
if (info.ArgCount < 3)
{
info.ReplyToCommand(
"Valid usage: css_plugins start/load [relative plugin path || absolute plugin path] (e.g \"TestPlugin\", \"plugins/TestPlugin/TestPlugin.dll\")\n");
$" List of all plugins currently loaded by CounterStrikeSharp: {_pluginManager.GetLoadedPlugins().Count()} plugins loaded.");
foreach (var plugin in _pluginManager.GetLoadedPlugins())
{
var sb = new StringBuilder();
sb.AppendFormat(" [#{0}:{1}]: \"{2}\" ({3})", plugin.PluginId,
plugin.State.ToString().ToUpper(), plugin.Plugin?.ModuleName ?? "Unknown",
plugin.Plugin?.ModuleVersion ?? "Unknown");
if (!string.IsNullOrEmpty(plugin.Plugin?.ModuleAuthor))
sb.AppendFormat(" by {0}", plugin.Plugin.ModuleAuthor);
if (!string.IsNullOrEmpty(plugin.Plugin?.ModuleDescription))
{
sb.Append("\n");
sb.Append(" ");
sb.Append(plugin.Plugin.ModuleDescription);
}
if (plugin.State == PluginState.Unloaded && !string.IsNullOrEmpty(plugin.TerminationReason))
{
sb.Append("\n");
sb.AppendFormat(" Termination Reason: {0}", plugin.TerminationReason);
}
info.ReplyToCommand(sb.ToString());
}
break;
}
// 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);
path = Path.Combine(_scriptHostConfiguration.RootPath, !path.EndsWith(".dll") ? $"plugins/{path}/{path}.dll" : path);
var plugin = _pluginContextQueryHandler.FindPluginByModulePath(path);
if (plugin == null)
case "start":
case "load":
{
try
if (info.ArgCount < 3)
{
_pluginManager.LoadPlugin(path);
plugin = _pluginContextQueryHandler.FindPluginByModulePath(path);
info.ReplyToCommand(
"Valid usage: css_plugins start/load [relative plugin path || absolute plugin path] (e.g \"TestPlugin\", \"plugins/TestPlugin/TestPlugin.dll\")\n");
break;
}
// 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);
path = Path.Combine(
_scriptHostConfiguration.RootPath,
!path.EndsWith(".dll")
? $"plugins/{path}/{Path.GetFileName(path)}.dll"
: path
);
var plugin = _pluginContextQueryHandler.FindPluginByModulePath(path);
if (plugin == null)
{
try
{
_pluginManager.LoadPlugin(path);
plugin = _pluginContextQueryHandler.FindPluginByModulePath(path);
plugin.Plugin.OnAllPluginsLoaded(false);
}
catch (Exception e)
{
info.ReplyToCommand($"Could not load plugin \"{path}\"");
Logger.LogError(e, "Could not load plugin \"{Path}\"", path);
}
}
else
{
plugin.Load(false);
plugin.Plugin.OnAllPluginsLoaded(false);
}
catch (Exception e)
{
info.ReplyToCommand($"Could not load plugin \"{path}\"");
Logger.LogError(e, "Could not load plugin \"{Path}\"", path);
}
}
else
{
plugin.Load(false);
plugin.Plugin.OnAllPluginsLoaded(false);
}
break;
}
break;
}
case "stop":
case "unload":
{
if (info.ArgCount < 3)
{
info.ReplyToCommand(
"Valid usage: css_plugins stop/unload [plugin name || #plugin id] (e.g \"TestPlugin\", \"1\")\n");
if (info.ArgCount < 3)
{
info.ReplyToCommand(
"Valid usage: css_plugins stop/unload [plugin name || #plugin id] (e.g \"TestPlugin\", \"1\")\n");
break;
}
var pluginIdentifier = info.GetArg(2);
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}\"");
break;
}
plugin.Unload(false);
break;
}
var pluginIdentifier = info.GetArg(2);
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}\"");
break;
}
plugin.Unload(false);
break;
}
case "restart":
case "reload":
{
if (info.ArgCount < 3)
{
info.ReplyToCommand(
"Valid usage: css_plugins restart/reload [plugin name || #plugin id] (e.g \"TestPlugin\", \"#1\")\n");
if (info.ArgCount < 3)
{
info.ReplyToCommand(
"Valid usage: css_plugins restart/reload [plugin name || #plugin id] (e.g \"TestPlugin\", \"#1\")\n");
break;
}
var pluginIdentifier = info.GetArg(2);
var plugin = _pluginContextQueryHandler.FindPluginByIdOrName(pluginIdentifier);
if (plugin == null)
{
info.ReplyToCommand($"Could not reload plugin \"{pluginIdentifier}\"");
break;
}
plugin.Unload(true);
plugin.Load(true);
plugin.Plugin.OnAllPluginsLoaded(true);
break;
}
var pluginIdentifier = info.GetArg(2);
var plugin = _pluginContextQueryHandler.FindPluginByIdOrName(pluginIdentifier);
if (plugin == null)
{
info.ReplyToCommand($"Could not reload plugin \"{pluginIdentifier}\"");
break;
}
plugin.Unload(true);
plugin.Load(true);
plugin.Plugin.OnAllPluginsLoaded(true);
break;
}
default:
info.ReplyToCommand("Valid usage: css_plugins [option]\n" +
" list - List all plugins currently loaded.\n" +

View File

@@ -0,0 +1,9 @@
using System;
namespace CounterStrikeSharp.API.Core.Attributes.Registration;
[AttributeUsage(AttributeTargets.Method)]
public class ListenerHandlerAttribute<T> : Attribute
where T: Delegate
{
}

View File

@@ -53,20 +53,27 @@ namespace CounterStrikeSharp.API.Core
public abstract string ModuleName { get; }
public abstract string ModuleVersion { get; }
public virtual string ModuleAuthor { get; }
public virtual string ModuleDescription { get; }
public string ModulePath { get; set; }
public string ModuleDirectory => Path.GetDirectoryName(ModulePath);
public ILogger Logger { get; set; }
public ICommandManager CommandManager { get; set; }
public IStringLocalizer Localizer { get; set; }
internal Plugin.ISelfPluginControl SelfControl { get; set; }
public void TerminateSelf(string reason)
{
SelfControl?.TerminateSelf(reason);
}
public virtual void Load(bool hotReload)
{
}
@@ -74,7 +81,7 @@ namespace CounterStrikeSharp.API.Core
public virtual void Unload(bool hotReload)
{
}
public virtual void OnAllPluginsLoaded(bool hotReload)
{
}
@@ -116,7 +123,7 @@ namespace CounterStrikeSharp.API.Core
public readonly Dictionary<Delegate, CallbackSubscriber> Handlers =
new Dictionary<Delegate, CallbackSubscriber>();
public readonly Dictionary<Delegate, CallbackSubscriber> CommandListeners =
new Dictionary<Delegate, CallbackSubscriber>();
@@ -132,7 +139,7 @@ namespace CounterStrikeSharp.API.Core
public readonly List<CommandDefinition> CommandDefinitions = new List<CommandDefinition>();
public readonly List<Timer> Timers = new List<Timer>();
public delegate HookResult GameEventHandler<T>(T @event, GameEventInfo info) where T : GameEvent;
private void RegisterEventHandlerInternal<T>(string name, GameEventHandler<T> handler, bool post)
@@ -156,7 +163,7 @@ namespace CounterStrikeSharp.API.Core
var name = typeof(T).GetCustomAttribute<EventNameAttribute>()?.Name;
RegisterEventHandlerInternal(name, handler, hookMode == HookMode.Post);
}
/// <summary>
/// De-registers a game event handler.
/// </summary>
@@ -164,7 +171,7 @@ namespace CounterStrikeSharp.API.Core
public void DeregisterEventHandler<T>(GameEventHandler<T> handler, HookMode hookMode = HookMode.Post) where T : GameEvent
{
var name = typeof(T).GetCustomAttribute<EventNameAttribute>()!.Name;
if (!Handlers.TryGetValue(handler, out var subscriber)) return;
NativeAPI.UnhookEvent(name, subscriber.GetInputArgument(), hookMode == HookMode.Post);
@@ -195,7 +202,7 @@ namespace CounterStrikeSharp.API.Core
CommandDefinitions.Add(definition);
CommandManager.RegisterCommand(definition);
}
private void AddCommand(CommandDefinition definition)
{
CommandDefinitions.Add(definition);
@@ -319,9 +326,9 @@ namespace CounterStrikeSharp.API.Core
throw new ArgumentException("Listener of type T is invalid and does not have a name attribute",
nameof(T));
}
if (!Listeners.TryGetValue(handler, out var subscriber)) return;
NativeAPI.RemoveListener(listenerName, subscriber.GetInputArgument());
FunctionReference.Remove(subscriber.GetReferenceIdentifier());
Listeners.Remove(handler);
@@ -396,20 +403,26 @@ namespace CounterStrikeSharp.API.Core
}
/// <summary>
/// Registers all game event handlers that are decorated with the <see cref="GameEventHandlerAttribute"/> attribute.
/// Registers all game event handlers that are decorated with the <see cref="GameEventHandlerAttribute"/> and <see cref="ListenerHandlerAttribute{T}"/> attribute.
/// </summary>
/// <param name="instance">The instance of the object where the event handlers are defined.</param>
public void RegisterAttributeHandlers(object instance)
{
var eventHandlers = instance.GetType()
.GetMethods()
var methods = instance.GetType().GetMethods();
var eventHandlers = methods
.Where(method => method.GetCustomAttribute<GameEventHandlerAttribute>() != null)
.Where(method =>
method.GetParameters().FirstOrDefault()?.ParameterType.IsSubclassOf(typeof(GameEvent)) == true)
.ToArray();
var method = typeof(BasePlugin).GetMethod("RegisterEventHandlerInternal", BindingFlags.NonPublic |
var listenerHandlers = methods
.Where(method => method.GetCustomAttribute(typeof(ListenerHandlerAttribute<>)) != null)
.ToArray();
var registerEvent = typeof(BasePlugin).GetMethod(nameof(RegisterEventHandlerInternal), BindingFlags.NonPublic |
BindingFlags.Instance)!;
var registerListener = GetType().GetMethod(nameof(RegisterListener))!;
foreach (var eventHandler in eventHandlers)
{
@@ -421,8 +434,22 @@ namespace CounterStrikeSharp.API.Core
var actionType = typeof(GameEventHandler<>).MakeGenericType(parameterType);
var action = Delegate.CreateDelegate(actionType, instance, eventHandler);
var generic = method.MakeGenericMethod(parameterType);
generic.Invoke(this, new object[] { eventName, action, hookMode == HookMode.Post });
var registerEventGeneric = registerEvent.MakeGenericMethod(parameterType);
registerEventGeneric.Invoke(this, [eventName, action, hookMode == HookMode.Post]);
}
foreach (var listnerHandler in listenerHandlers)
{
var attribute = listnerHandler.GetCustomAttribute(typeof(ListenerHandlerAttribute<>))!;
var listenerType = attribute.GetType().GetGenericArguments().First();
if (listenerType.GetCustomAttribute<ListenerNameAttribute>() == null)
throw new ArgumentException("Listener of type T is invalid and does not have a name attribute",
listenerType.Name);
var listenerDelegate = Delegate.CreateDelegate(listenerType, instance, listnerHandler);
registerListener.MakeGenericMethod(listenerType).Invoke(this, [listenerDelegate]);
}
}
@@ -482,29 +509,29 @@ namespace CounterStrikeSharp.API.Core
{
var convars = type
.GetFields(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)
.Where(prop => prop.FieldType.IsGenericType &&
.Where(prop => prop.FieldType.IsGenericType &&
prop.FieldType.GetGenericTypeDefinition() == typeof(FakeConVar<>));
foreach (var prop in convars)
{
object propValue = prop.GetValue(instance); // FakeConvar<?> instance
var propValueType = prop.FieldType.GenericTypeArguments[0];
var name = prop.FieldType.GetProperty("Name", BindingFlags.Public | BindingFlags.Instance)
.GetValue(propValue);
var description = prop.FieldType.GetProperty("Description", BindingFlags.Public | BindingFlags.Instance)
.GetValue(propValue);
MethodInfo executeCommandMethod = prop.FieldType
.GetMethod("ExecuteCommand", BindingFlags.Instance | BindingFlags.NonPublic);
this.AddCommand((string)name, (string) description, (caller, command) =>
this.AddCommand((string)name, (string)description, (caller, command) =>
{
executeCommandMethod.Invoke(propValue, new object[] {caller, command});
executeCommandMethod.Invoke(propValue, new object[] { caller, command });
});
}
}
/// <summary>
/// Used to bind a fake ConVar to a plugin command. Only required for ConVars that are not public properties of the plugin class.
/// </summary>
@@ -529,7 +556,7 @@ namespace CounterStrikeSharp.API.Core
NativeAPI.HookEntityOutput(classname, outputName, subscriber.GetInputArgument(), mode);
EntityOutputHooks[handler] = subscriber;
}
public void HookUserMessage(int messageId, UserMessage.UserMessageHandler handler, HookMode mode = HookMode.Pre)
{
var subscriber = new CallbackSubscriber(handler, handler,
@@ -538,7 +565,7 @@ namespace CounterStrikeSharp.API.Core
NativeAPI.HookUsermessage(messageId, subscriber.GetInputArgument(), mode);
Handlers[handler] = subscriber;
}
public void UnhookUserMessage(int messageId, UserMessage.UserMessageHandler handler, HookMode mode = HookMode.Pre)
{
if (!Handlers.TryGetValue(handler, out var subscriber)) return;
@@ -621,7 +648,7 @@ namespace CounterStrikeSharp.API.Core
{
subscriber.Dispose();
}
foreach (var subscriber in CommandListeners.Values)
{
subscriber.Dispose();

View File

@@ -65,18 +65,23 @@ public class CommandManager : ICommandManager
var info = new CommandInfo(commandInfo, caller);
var name = info.GetArg(0).ToLower();
using var temporaryCulture = new WithTemporaryCulture(caller.GetLanguage());
if (_commandDefinitions.TryGetValue(name, out var handler))
{
foreach (var command in handler)
foreach (var command in handler.ToList())
{
if (!handler.Contains(command))
{
continue;
}
var methodInfo = command.Callback?.GetMethodInfo();
// We do not need to do permission checks on commands executed from the server console.
// The server will always be allowed to execute commands (unless marked as client only like above)
if (caller != null)
if (caller != null)
{
// Do not execute command if we do not have the correct permissions.
var adminData = AdminManager.GetPlayerAdminData(caller!.AuthorizedSteamID);
@@ -115,11 +120,12 @@ public class CommandManager : ICommandManager
if (!attr.CanExecuteCommand(caller))
{
var responseStr = (attr.GetType() == typeof(RequiresPermissions)) ?
"You are missing the correct permissions" : "You do not have one of the correct permissions";
Application.Localizer["Missing permissions"] :
Application.Localizer["Missing one permission"];
var flags = attr.Permissions.Except(adminData?.GetAllFlags() ?? new HashSet<string>());
flags = flags.Except(adminData?.Groups ?? new HashSet<string>());
info.ReplyToCommand($"[CSS] {responseStr} ({string.Join(", ", flags)}) to execute this command.");
info.ReplyToCommand(Application.Localizer["Command permission denied", responseStr, string.Join(", ", flags)]);
return;
}

View File

@@ -53,6 +53,9 @@ namespace CounterStrikeSharp.API.Core
[JsonPropertyName("PluginAutoLoadEnabled")]
public bool PluginAutoLoadEnabled { get; set; } = true;
[JsonPropertyName("PluginResolveNugetPackages")]
public bool PluginResolveNugetPackages { get; set; }
[JsonPropertyName("ServerLanguage")]
public string ServerLanguage { get; set; } = "en";
@@ -61,6 +64,12 @@ namespace CounterStrikeSharp.API.Core
[JsonPropertyName("UnlockConVars")]
public bool UnlockConVars { get; set; } = true;
[JsonPropertyName("AutoUpdateEnabled")]
public bool AutoUpdateEnabled { get; set; } = true;
[JsonPropertyName("AutoUpdateURL")]
public string AutoUpdateURL { get; set; } = "http://gamedata.cssharp.dev";
}
/// <summary>
@@ -109,6 +118,8 @@ namespace CounterStrikeSharp.API.Core
/// </summary>
public static bool PluginAutoLoadEnabled => _coreConfig.PluginAutoLoadEnabled;
public static bool PluginResolveNugetPackages => _coreConfig.PluginResolveNugetPackages;
public static string ServerLanguage => _coreConfig.ServerLanguage;
public static bool UnlockConCommands => _coreConfig.UnlockConCommands;
@@ -157,7 +168,7 @@ namespace CounterStrikeSharp.API.Core
{
var data = JsonSerializer.Deserialize<CoreConfigData>(File.ReadAllText(_coreConfigPath),
new JsonSerializerOptions() { ReadCommentHandling = JsonCommentHandling.Skip });
if (data != null)
{
_coreConfig = data;

View File

@@ -1,4 +1,4 @@
/*
/*
* This file is part of CounterStrikeSharp.
* CounterStrikeSharp is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,6 +15,7 @@
*/
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
@@ -26,7 +27,7 @@ namespace CounterStrikeSharp.API.Core
/// </summary>
public enum FunctionLifetime
{
/// <summary>Delegate will be removed after the first invocation.</summary>
/// <summary>Delegate will be removed after the first invocation.</summary>
SingleUse,
/// <summary>Delegate will remain in memory for the lifetime of the application (or until <see cref="FunctionReference.Remove"/> is called).</summary>
@@ -57,7 +58,7 @@ namespace CounterStrikeSharp.API.Core
_targetMethod = method;
_nativeCallback = CreateWrappedCallback();
}
/// <summary>
/// <inheritdoc cref="FunctionLifetime"/>
/// </summary>
@@ -106,6 +107,11 @@ namespace CounterStrikeSharp.API.Core
}
catch (Exception e)
{
if ((e.InnerException ?? e) is Plugin.PluginTerminationException pluginEx)
{
return;
}
Application.Instance.Logger.LogError(e, "Error invoking callback");
}
finally
@@ -176,4 +182,4 @@ namespace CounterStrikeSharp.API.Core
}
}
}
}
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Runtime.CompilerServices;
using CounterStrikeSharp.API.Natives;
namespace CounterStrikeSharp.API.Core;
@@ -10,4 +11,4 @@ public class GameEventInfo : NativeObject
}
public unsafe ref bool DontBroadcast => ref Unsafe.AsRef<bool>((void*)Handle);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -30,4 +30,4 @@ namespace CounterStrikeSharp.API.Core
[DllImport(dllPath, EntryPoint = "InvokeNative")]
public static extern void InvokeNative(IntPtr ptr);
}
}
}

View File

@@ -34,5 +34,11 @@ public interface IScriptHostConfiguration
/// Gets the absolute path to the directory that contains CounterStrikeSharp game data.
/// e.g. /game/csgo/addons/counterstrikesharp/gamedata
/// </summary>
string GameDataPath { get; }
}
string GameDataPath { get; }
/// <summary>
/// Gets the absolute path to the directory that contains CounterStrikeSharp translation files.
/// e.g. /game/csgo/addons/counterstrikesharp/lang
/// </summary>
string LanguagePath { get; }
}

View File

@@ -9,7 +9,8 @@ internal sealed class ScriptHostConfiguration : IScriptHostConfiguration
public string PluginPath { get; }
public string SharedPath { get; }
public string ConfigsPath { get; }
public string GameDataPath { get; }
public string GameDataPath { get; }
public string LanguagePath { get; }
public ScriptHostConfiguration(IHostEnvironment hostEnvironment)
{
@@ -17,6 +18,7 @@ internal sealed class ScriptHostConfiguration : IScriptHostConfiguration
SharedPath = Path.Join(new[] { hostEnvironment.ContentRootPath, "shared" });
PluginPath = Path.Join(new[] { hostEnvironment.ContentRootPath, "plugins" });
ConfigsPath = Path.Join(new[] { hostEnvironment.ContentRootPath, "configs" });
GameDataPath = Path.Join(new[] { hostEnvironment.ContentRootPath, "gamedata" });
GameDataPath = Path.Join(new[] { hostEnvironment.ContentRootPath, "gamedata" });
LanguagePath = Path.Join(new[] { hostEnvironment.ContentRootPath, "lang" });
}
}
}

View File

@@ -18,6 +18,7 @@ using System;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Security;
using CounterStrikeSharp.API.Natives;
namespace CounterStrikeSharp.API.Core
{
@@ -125,13 +126,13 @@ namespace CounterStrikeSharp.API.Core
{
return new InputArgument(value);
}
[SecurityCritical]
public static implicit operator InputArgument(NativeObject value)
{
return new InputArgument(value.Handle);
}
[SecurityCritical]
public static implicit operator InputArgument(NativeEntity value)
{
@@ -144,4 +145,4 @@ namespace CounterStrikeSharp.API.Core
return new InputArgument(new IntPtr(value));
}
}
}
}

View File

@@ -6,8 +6,8 @@ using CounterStrikeSharp.API.Modules.Utils;
namespace CounterStrikeSharp.API.Core
{
public class Listeners {
public class Listeners
{
/// <summary>
/// Called when an entity is spawned.
/// </summary>
@@ -44,6 +44,18 @@ namespace CounterStrikeSharp.API.Core
[ListenerName("OnTick")]
public delegate void OnTick();
/// <summary>
/// Called on every server frame before entities think.
/// </summary>
[ListenerName("OnServerPreEntityThink")]
public delegate void OnServerPreEntityThink();
/// <summary>
/// Called on every server frame after entities think.
/// </summary>
[ListenerName("OnServerPostEntityThink")]
public delegate void OnServerPostEntityThink();
/// <summary>
/// Called when a new map is loaded.
/// </summary>
@@ -107,7 +119,7 @@ namespace CounterStrikeSharp.API.Core
/// <param name="playerSlot">The player slot of the authorized client.</param>
/// <param name="steamId">The Steam ID of the authorized client.</param>
[ListenerName("OnClientAuthorized")]
public delegate void OnClientAuthorized(int playerSlot, [CastFrom(typeof(ulong))]SteamID steamId);
public delegate void OnClientAuthorized(int playerSlot, [CastFrom(typeof(ulong))] SteamID steamId);
/// <summary>
/// Called when the server is updating the hibernation state.
@@ -163,5 +175,37 @@ namespace CounterStrikeSharp.API.Core
/// <param name="manifest">Resource Manifest</param>
[ListenerName("OnServerPrecacheResources")]
public delegate void OnServerPrecacheResources(ResourceManifest manifest);
/// <summary>
/// Called when checking transmit on entities.
/// </summary>
/// <param name="infoList">Transmit info list</param>
[ListenerName("CheckTransmit")]
public delegate void CheckTransmit([CastFrom(typeof(nint))] CCheckTransmitInfoList infoList);
/// <summary>
/// Called in the entity pre-think when the player's buttons have changed.
/// </summary>
/// <param name="player"></param>
/// <param name="pressed"></param>
/// <param name="released"></param>
[ListenerName("OnPlayerButtonsChanged")]
public delegate void OnPlayerButtonsChanged(CCSPlayerController player, PlayerButtons pressed, PlayerButtons released);
/// <summary>
/// Called when a player sends a chat message.
/// </summary>
/// <param name="player">The player who sent the chat message.</param>
/// <param name="message">The content of the chat message.</param>
/// <param name="teamChat">If the chat message was sent to team only.</param>
[ListenerName("OnPlayerChat")]
public delegate void OnPlayerChat(CCSPlayerController player, string message, bool teamChat);
/// <summary>
/// Called when all metamod plugins are loaded.
/// </summary>
[ListenerName("OnMetamodAllPluginsLoaded")]
public delegate void OnMetamodAllPluginsLoaded();
}
}
}

View File

@@ -1,4 +1,5 @@
using System;
using System.Numerics;
using System.Runtime.InteropServices;
using CounterStrikeSharp.API.Modules.Memory;
using CounterStrikeSharp.API.Modules.Utils;
@@ -7,20 +8,45 @@ namespace CounterStrikeSharp.API.Core;
public partial class CBaseEntity
{
/// <summary>
/// Teleports the entity to the specified position, angles, and velocity using Vector3 parameters.
/// This overload is optimized for memory efficiency by directly working with a Vector3 struct.
/// </summary>
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
/// <exception cref="ArgumentNullException">No valid argument</exception>
public void Teleport(Vector? position = null, QAngle? angles = null, Vector? velocity = null)
/// <exception cref="ArgumentException">At least one parameter must be specified</exception>
public void Teleport(Vector3? position = null, QAngle? angles = null, Vector3? velocity = null)
{
Guard.IsValidEntity(this);
if (position == null && angles == null && velocity == null)
throw new ArgumentNullException("No valid argument");
nint _position = position?.Handle ?? 0;
nint _angles = angles?.Handle ?? 0;
nint _velocity = velocity?.Handle ?? 0;
VirtualFunction.CreateVoid<IntPtr, IntPtr, IntPtr, IntPtr>(Handle, GameData.GetOffset("CBaseEntity_Teleport"))(Handle, _position, _angles, _velocity);
throw new ArgumentException("At least one parameter must be specified");
unsafe
{
void* positionPtr = null, anglePtr = null, velocityPtr = null;
if (position.HasValue)
{
var pos = position.Value;
positionPtr = &pos;
}
if (angles.HasValue)
{
var ang = angles.Value;
anglePtr = &ang;
}
if (velocity.HasValue)
{
var vel = velocity.Value;
velocityPtr = &vel;
}
VirtualFunction.CreateVoid<IntPtr, IntPtr, IntPtr, IntPtr>(Handle, GameData.GetOffset("CBaseEntity_Teleport"))(Handle,
(nint)positionPtr,
(nint)anglePtr, (nint)velocityPtr);
}
}
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
@@ -34,7 +60,20 @@ public partial class CBaseEntity
/// <summary>
/// Shorthand for accessing an entity's CBodyComponent?.SceneNode?.AbsOrigin;
/// </summary>
public Vector? AbsOrigin => CBodyComponent?.SceneNode?.AbsOrigin;
public Vector3 AbsOrigin
{
get => CBodyComponent?.SceneNode?.AbsOrigin ?? Vector3.Zero;
set
{
Guard.IsValidEntity(this);
if (CBodyComponent?.SceneNode == null)
{
throw new InvalidOperationException("Entity does not have a CBodyComponent.");
}
CBodyComponent.SceneNode.AbsOrigin = value;
}
}
/// <summary>
/// Shorthand for accessing an entity's CBodyComponent?.SceneNode?.AbsRotation;
@@ -48,4 +87,25 @@ public partial class CBaseEntity
return (T)Activator.CreateInstance(typeof(T), Marshal.ReadIntPtr(SubclassID.Handle + 4));
}
/// <summary>
/// Emit a soundevent to all players.
/// </summary>
/// <param name="soundEventName">The name of the soundevent to emit.</param>
/// <param name="recipients">The recipients of the soundevent.</param>
/// <param name="volume">The volume of the soundevent.</param>
/// <param name="pitch">The pitch of the soundevent.</param>
/// <returns>The sound event guid.</returns>
public uint EmitSound(string soundEventName, RecipientFilter? recipients = null, float volume = 1f, float pitch = 0)
{
Guard.IsValidEntity(this);
if (recipients == null)
{
recipients = new RecipientFilter();
recipients.AddAllPlayers();
}
return NativeAPI.EmitSoundFilter(recipients.GetRecipientMask(), this.Index, soundEventName, volume, pitch);
}
}

View File

@@ -14,8 +14,11 @@
* along with CounterStrikeSharp. If not, see <https://www.gnu.org/licenses/>. *
*/
using System.Runtime.InteropServices;
using CounterStrikeSharp.API.Modules.Entities.Constants;
using CounterStrikeSharp.API.Modules.Memory;
using CounterStrikeSharp.API.Modules.Utils;
namespace CounterStrikeSharp.API.Core;
@@ -28,4 +31,49 @@ public partial class CCSGameRules
{
VirtualFunctions.TerminateRound(Handle, roundEndReason, delay, 0, 0);
}
}
internal CBaseEntity? FindPickerEntityInternal(CBasePlayerController player)
{
// TODO: TEST!
// the third parameter seems to be something like `CDefaultTypedEntityInstanceFilter<CBaseEntity>` but its optional (earlier it was a string?)
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
VirtualFunctionWithReturn<CCSGameRules, CBasePlayerController, IntPtr?, CBaseEntity?> CCSGameRules_FindPickerEntity = new(Handle, GameData.GetOffset("CCSGameRules_FindPickerEntity"));
return CCSGameRules_FindPickerEntity.Invoke(this, player, null);
}
else
{
VirtualFunctionWithReturn<CCSGameRules, CBasePlayerController, IntPtr?, double, double, CBaseEntity?> CCSGameRules_FindPickerEntity = new(Handle, GameData.GetOffset("CCSGameRules_FindPickerEntity"));
return CCSGameRules_FindPickerEntity.Invoke(this, player, null, 0, 0); // on linux we have a fourth and fifth parameter aswell, but they are unused because the condition for them is always unmet.
}
}
public T? FindPickerEntity<T>(CBasePlayerController player)
where T : CBaseEntity
{
CBaseEntity? entity = FindPickerEntityInternal(player);
if (entity == null || !entity.IsValid)
{
return null;
}
return entity.As<T>();
}
public CCSPlayerController? GetClientAimTarget(CCSPlayerController player)
{
CCSPlayerPawn? pawn = FindPickerEntity<CCSPlayerPawn>(player);
if (pawn == null || !pawn.IsValid)
return null;
if (pawn.DesignerName == "player")
{
return pawn.OriginalController.Value;
}
return null;
}
}

View File

@@ -1,4 +1,5 @@
using System;
using System.Numerics;
using CounterStrikeSharp.API.Modules.Cvars;
using CounterStrikeSharp.API.Modules.Entities;
using CounterStrikeSharp.API.Modules.Entities.Constants;
@@ -50,7 +51,7 @@ public partial class CCSPlayerController
{
Guard.IsValidEntity(this);
VirtualFunctions.ClientPrint(Handle, HudDestination.Chat, message, 0, 0, 0, 0);
NativeAPI.ClientPrint(this.Slot, (int)HudDestination.Chat, message);
}
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
@@ -58,7 +59,7 @@ public partial class CCSPlayerController
{
Guard.IsValidEntity(this);
VirtualFunctions.ClientPrint(Handle, HudDestination.Center, message, 0, 0, 0, 0);
NativeAPI.ClientPrint(this.Slot, (int)HudDestination.Center, message);
}
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
@@ -66,7 +67,7 @@ public partial class CCSPlayerController
{
Guard.IsValidEntity(this);
VirtualFunctions.ClientPrint(Handle, HudDestination.Alert, message, 0, 0, 0, 0);
NativeAPI.ClientPrint(this.Slot, (int)HudDestination.Alert, message);
}
public void PrintToCenterHtml(string message) => PrintToCenterHtml(message, 5);
@@ -340,4 +341,16 @@ public partial class CCSPlayerController
NativeAPI.SetClientVoiceFlags(Handle, (Byte)value);
}
}
[Obsolete(
"You are trying to call Teleport on a non-physical player. Maybe you mean Pawn? (See: https://docs.cssharp.dev/docs/guides/referencing-players.html#controllers--pawns)")]
public new void Teleport(Vector3? position = null, QAngle? angles = null, Vector3? velocity = null)
{
base.Teleport(position, angles, velocity);
}
public void ReplicateConVar(string conVar, string value)
{
NativeAPI.ReplicateConvar(Slot, conVar, value);
}
}

View File

@@ -15,6 +15,8 @@
*/
using CounterStrikeSharp.API.Modules.Memory;
using CounterStrikeSharp.API.Modules.Memory.DynamicFunctions;
using CounterStrikeSharp.API.Modules.Utils;
namespace CounterStrikeSharp.API.Core;
@@ -54,4 +56,9 @@ public partial class CCSPlayer_ItemServices
return (T)Activator.CreateInstance(typeof(T), pointer)!;
}
public AcquireResult CanAcquire(CEconItemView itemView, AcquireMethod method, IntPtr unknown = 0)
{
return VirtualFunctions.CCSPlayer_ItemServices_CanAcquireFunc.Invoke(this, itemView, method, unknown);
}
}

View File

@@ -0,0 +1,107 @@
/*
* This file is part of CounterStrikeSharp.
* CounterStrikeSharp is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CounterStrikeSharp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with CounterStrikeSharp. If not, see <https://www.gnu.org/licenses/>. *
*/
using System.Collections;
using System.Runtime.InteropServices;
using CounterStrikeSharp.API.Natives;
namespace CounterStrikeSharp.API.Core
{
[StructLayout(LayoutKind.Explicit)]
public struct CCheckTransmitInfo
{
/// <summary>
/// Entity n is already marked for transmission
/// </summary>
[FieldOffset(0x0)]
public CFixedBitVecBase TransmitEntities;
/// <summary>
/// Entity n is always send even if not in PVS (HLTV and Replay only)
/// </summary>
[FieldOffset(0x8)]
public CFixedBitVecBase TransmitAlways;
};
public sealed class CCheckTransmitInfoList : NativeObject, IReadOnlyList<(CCheckTransmitInfo info, CCSPlayerController? player)>
{
private int CheckTransmitPlayerSlotOffset = GameData.GetOffset("CheckTransmitPlayerSlot");
private unsafe nint* Inner => (nint*)base.Handle;
public unsafe int Count { get => (int)(*(this.Inner + 1)); }
public unsafe CCheckTransmitInfoList(IntPtr pointer) : base(pointer)
{ }
/// <summary>
/// Get transmit info for the given index.
/// </summary>
/// <param name="index">Index of the info you want to retrieve from the list, should be between 0 and '<see cref="Count"/>' - 1</param>
/// <returns></returns>
public (CCheckTransmitInfo info, CCSPlayerController? player) this[int index]
{
get
{
var (transmit, slot) = this.Get(index);
CCSPlayerController? player = Utilities.GetPlayerFromSlot(slot);
return (transmit, player);
}
}
/// <summary>
/// Get transmit info for the given index.
/// </summary>
/// <param name="index">Index of the info you want to retrieve from the list, should be between 0 and '<see cref="Count"/>' - 1</param>
/// <returns></returns>
private unsafe (CCheckTransmitInfo, int) Get(int index)
{
if (index < 0 || index >= this.Count)
{
throw new ArgumentOutOfRangeException("index");
}
// 'base.Handle' holds the pointer for our 'CCheckTransmitInfoList' wrapper class
// Get the pointer to the array of 'CCheckTransmitInfo'
nint* infoListPtr = *(nint**)this.Inner; // Dereference 'Inner' to get the pointer to the array
// Access the specific 'CCheckTransmitInfo*'
nint infoPtr = *(infoListPtr + index);
// Retrieve the 'CCheckTransmitInfo' from the pointer
CCheckTransmitInfo info = Marshal.PtrToStructure<CCheckTransmitInfo>(infoPtr);
// Get player slot from the 'infoPtr' using the 'CheckTransmitPlayerSlotOffset' offset
int playerSlot = *(int*)((byte*)infoPtr + CheckTransmitPlayerSlotOffset);
return (info, playerSlot);
}
public IEnumerator<(CCheckTransmitInfo, CCSPlayerController?)> GetEnumerator()
{
for (int i = 0; i < this.Count; i++)
{
yield return this[i];
}
}
IEnumerator IEnumerable.GetEnumerator()
{
return this.GetEnumerator();
}
}
}

View File

@@ -1,49 +1,51 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using CounterStrikeSharp.API.Modules.Utils;
using CounterStrikeSharp.API.Natives;
using CounterStrikeSharp.API.Natives.Structs;
namespace CounterStrikeSharp.API.Core;
public partial class CEntityIOOutput
{
public EntityIOConnection_t? Connections => Utilities.GetPointer<EntityIOConnection_t>(Handle + 8);
public EntityIOOutputDesc_t Description => new(Marshal.ReadIntPtr(Handle + 16));
}
public class EntityIOOutputDesc_t : NativeObject
{
public EntityIOOutputDesc_t(IntPtr pointer) : base(pointer)
{
}
public string Name => Utilities.ReadStringUtf8(Handle + 0);
public unsafe ref uint Flags => ref Unsafe.AsRef<uint>((void*)(Handle + 8));
public unsafe ref uint OutputOffset => ref Unsafe.AsRef<uint>((void*)(Handle + 16));
}
public class EntityIOConnection_t : EntityIOConnectionDesc_t
{
public EntityIOConnection_t(IntPtr pointer) : base(pointer)
{
}
public unsafe ref bool MarkedForRemoval => ref Unsafe.AsRef<bool>((void*)(Handle + 40));
public EntityIOConnection_t? Next => Utilities.GetPointer<EntityIOConnection_t>(Handle + 48);
}
public class EntityIOConnectionDesc_t : NativeObject
{
public EntityIOConnectionDesc_t(IntPtr pointer) : base(pointer)
{
}
public string TargetDesc => Utilities.ReadStringUtf8(Handle + 0);
public string TargetInput => Utilities.ReadStringUtf8(Handle + 8);
public string ValueOverride => Utilities.ReadStringUtf8(Handle + 16);
public CEntityHandle Target => new(Handle + 24);
public unsafe ref EntityIOTargetType_t TargetType => ref Unsafe.AsRef<EntityIOTargetType_t>((void*)(Handle + 28));
public unsafe ref int TimesToFire => ref Unsafe.AsRef<int>((void*)(Handle + 32));
public unsafe ref float Delay => ref Unsafe.AsRef<float>((void*)(Handle + 36));
}
public partial class CEntityIOOutput
{
public EntityIOConnection_t? Connections => Utilities.GetPointer<EntityIOConnection_t>(Handle + 8);
public EntityIOOutputDesc_t Description => new(Marshal.ReadIntPtr(Handle + 16));
}
public class EntityIOOutputDesc_t : NativeObject
{
public EntityIOOutputDesc_t(IntPtr pointer) : base(pointer)
{
}
public string Name => Utilities.ReadStringUtf8(Handle + 0);
public unsafe ref uint Flags => ref Unsafe.AsRef<uint>((void*)(Handle + 8));
public unsafe ref uint OutputOffset => ref Unsafe.AsRef<uint>((void*)(Handle + 16));
}
public class EntityIOConnection_t : EntityIOConnectionDesc_t
{
public EntityIOConnection_t(IntPtr pointer) : base(pointer)
{
}
public unsafe ref bool MarkedForRemoval => ref Unsafe.AsRef<bool>((void*)(Handle + 40));
public EntityIOConnection_t? Next => Utilities.GetPointer<EntityIOConnection_t>(Handle + 48);
}
public class EntityIOConnectionDesc_t : NativeObject
{
public EntityIOConnectionDesc_t(IntPtr pointer) : base(pointer)
{
}
public string TargetDesc => Utilities.ReadStringUtf8(Handle + 0);
public string TargetInput => Utilities.ReadStringUtf8(Handle + 8);
public string ValueOverride => Utilities.ReadStringUtf8(Handle + 16);
public unsafe CHandle<CEntityInstance> Target => Unsafe.AsRef<CHandle<CEntityInstance>>((void*)(Handle + 24));
public unsafe ref EntityIOTargetType_t TargetType => ref Unsafe.AsRef<EntityIOTargetType_t>((void*)(Handle + 28));
public unsafe ref int TimesToFire => ref Unsafe.AsRef<int>((void*)(Handle + 32));
public unsafe ref float Delay => ref Unsafe.AsRef<float>((void*)(Handle + 36));
}

View File

@@ -7,6 +7,7 @@ using System.Runtime.InteropServices;
using System.Text;
using CounterStrikeSharp.API.Modules.Memory;
using CounterStrikeSharp.API.Modules.Utils;
using CounterStrikeSharp.API.Natives.Structs;
namespace CounterStrikeSharp.API.Core;
@@ -19,17 +20,17 @@ public partial class CEntityInstance : IEquatable<CEntityInstance>
public CEntityInstance(uint rawHandle) : base(rawHandle)
{
}
/// <summary>
/// Checks that the entity handle is valid and the handle points to a valid entity
/// </summary>
public bool IsValid => EntityHandle.IsValid && Handle != IntPtr.Zero;
[Obsolete("Use Index instead", true)]
public CEntityIndex? EntityIndex => new CEntityIndex(EntityHandle.Index);
public uint Index => EntityHandle.Index;
public CEntityIndex? EntityIndex => new CEntityIndex(EntityHandle.EntityIndex);
public uint Index => EntityHandle.EntityIndex;
public string DesignerName => IsValid ? Entity?.DesignerName : null;
public void Remove()
@@ -38,7 +39,7 @@ public partial class CEntityInstance : IEquatable<CEntityInstance>
VirtualFunctions.UTIL_Remove(this.Handle);
}
public bool Equals(CEntityInstance? other)
{
return this.EntityHandle.Equals(other?.EntityHandle);
@@ -112,5 +113,5 @@ public partial class CEntityInstance : IEquatable<CEntityInstance>
public partial class CEntityIdentity
{
public unsafe CEntityInstance EntityInstance => new(Unsafe.Read<IntPtr>((void*)Handle));
public unsafe CHandle<CEntityInstance> EntityHandle => new(this.Handle + 0x10);
public unsafe CHandle<CEntityInstance> EntityHandle => Unsafe.Read<CHandle<CEntityInstance>>((void*)(this.Handle + 0x10));
}

View File

@@ -0,0 +1,81 @@
/*
* This file is part of CounterStrikeSharp.
* CounterStrikeSharp is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CounterStrikeSharp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with CounterStrikeSharp. If not, see <https://www.gnu.org/licenses/>. *
*/
using System.Runtime.InteropServices;
namespace CounterStrikeSharp.API.Core
{
// credits: qstage
[StructLayout(LayoutKind.Sequential)]
public unsafe struct CFixedBitVecBase
{
private const int LOG2_BITS_PER_INT = 5;
private const int BITS_PER_INT = 32;
private readonly uint* m_Ints;
public void Add(CEntityInstance entityInstance) => Write(entityInstance.Index);
public void Add(int bitNum) => Write(bitNum);
public void Add(uint bitNum) => Write(bitNum);
public void Remove(CEntityInstance entityInstance) => Clear(entityInstance.Index);
public void Remove(int bitNum) => Clear(bitNum);
public void Remove(uint bitNum) => Clear(bitNum);
public bool Contains(CEntityInstance entityInstance) => Contains(entityInstance.Index);
public bool Contains(uint bitNum) => Contains((int)bitNum);
private void Clear(uint bitNum) => Clear((int)bitNum);
private void Write(uint bitNum) => Write((int)bitNum);
private void Clear(int bitNum)
{
if (!(bitNum >= 0 && bitNum < Utilities.MaxEdicts))
return;
uint* pInt = m_Ints + BitVec_Int(bitNum);
*pInt &= ~(uint)BitVec_Bit(bitNum);
}
private void Write(int bitNum)
{
if (!(bitNum >= 0 && bitNum < Utilities.MaxEdicts))
return;
uint* pInt = m_Ints + BitVec_Int(bitNum);
*pInt |= (uint)BitVec_Bit(bitNum);
}
public bool Contains(int bitNum)
{
if (!(bitNum >= 0 && bitNum < Utilities.MaxEdicts))
return false;
uint* pInt = m_Ints + BitVec_Int(bitNum);
return (*pInt & (uint)BitVec_Bit(bitNum)) != 0;
}
private int BitVec_Int(int bitNum) => bitNum >> LOG2_BITS_PER_INT;
private int BitVec_Bit(int bitNum) => 1 << (bitNum & (BITS_PER_INT - 1));
}
}

View File

@@ -1,4 +1,5 @@
using System;
using System.Numerics;
using System.Reflection.Metadata;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -11,7 +12,7 @@ public partial class CNetworkOriginCellCoordQuantizedVector
{
private const int CELL_WIDTH = 1 << 9;
public Vector Vector => new(
public Vector3 Vector => new(
(CellX - 32) * CELL_WIDTH + X,
(CellY - 32) * CELL_WIDTH + Y,
(CellZ - 32) * CELL_WIDTH + Z);

View File

@@ -0,0 +1,32 @@
using System.Runtime.InteropServices;
namespace CounterStrikeSharp.API.Core;
public partial class CTakeDamageInfo
{
/// <summary>
/// Retrieves the hitgroup
/// </summary>
/// <returns>
/// Returns a <see cref="HitGroup_t"/> enumeration representing the player's current hit group,
/// or <see cref="HitGroup_t.HITGROUP_INVALID"/> if the hit group cannot be determined.
/// </returns>
public HitGroup_t GetHitGroup()
{
IntPtr v4 = Marshal.ReadIntPtr(Handle, GameData.GetOffset("CTakeDamageInfo_HitGroup"));
if (v4 == nint.Zero)
{
return HitGroup_t.HITGROUP_INVALID;
}
IntPtr v1 = Marshal.ReadIntPtr(v4, 16);
if (v1 == nint.Zero)
{
return HitGroup_t.HITGROUP_GENERIC;
}
return (HitGroup_t)Marshal.ReadInt32(v1, 56);
}
}

View File

@@ -0,0 +1,20 @@
using CounterStrikeSharp.API.Natives;
namespace CounterStrikeSharp.API.Core;
public class CUtlSymbolLarge : NativeObject
{
public CUtlSymbolLarge(IntPtr pointer) : base(pointer)
{
}
public bool IsValid => Handle != IntPtr.Zero;
public string String
{
get
{
return NativeAPI.GetStringFromSymbolLarge(Handle);
}
}
}

View File

@@ -1,13 +1,57 @@
namespace CounterStrikeSharp.API.Core;
/// <summary>
/// Placeholder for CVariant
/// <see href="https://github.com/alliedmodders/hl2sdk/blob/cs2/public/variant.h"/>
/// <remarks>A lot of entity outputs do not use this value</remarks>
/// </summary>
public class CVariant : NativeObject
{
public CVariant(IntPtr pointer) : base(pointer)
{
}
}
using System.Reflection.Metadata;
using CounterStrikeSharp.API.Natives;
namespace CounterStrikeSharp.API.Core;
public class CVariant : NativeObject
{
public CVariant(IntPtr pointer) : base(pointer)
{
}
public bool IsValid => Handle != IntPtr.Zero;
public fieldtype_t FieldType => (fieldtype_t)NativeAPI.GetVariantType(Handle);
public T Get<T>()
{
var type = typeof(T);
object result = type switch
{
_ when type == typeof(float) => NativeAPI.GetVariantFloat(Handle),
_ when type == typeof(int) => NativeAPI.GetVariantInt(Handle),
_ when type == typeof(uint) => NativeAPI.GetVariantUint(Handle),
_ when type == typeof(string) => NativeAPI.GetVariantString(Handle),
_ when type == typeof(bool) => NativeAPI.GetVariantBool(Handle),
_ => throw new NotSupportedException(),
};
return (T)result;
}
public void Set<T>(T value)
{
var type = typeof(T);
switch (type)
{
case var _ when value is float f:
NativeAPI.SetVariantFloat(Handle, f);
break;
case var _ when value is int i:
NativeAPI.SetVariantInt(Handle, i);
break;
case var _ when value is uint ui:
NativeAPI.SetVariantUint(Handle, ui);
break;
case var _ when value is bool b:
NativeAPI.SetVariantBool(Handle, b);
break;
case var _ when value is string s:
NativeAPI.SetVariantString(Handle, s);
break;
default:
throw new NotSupportedException();
}
}
}

View File

@@ -7,6 +7,8 @@ using System.Runtime.InteropServices;
using System.Text;
using CounterStrikeSharp.API.Modules.Memory;
using CounterStrikeSharp.API.Modules.Utils;
using CounterStrikeSharp.API.Natives;
using CounterStrikeSharp.API.Natives.Structs;
namespace CounterStrikeSharp.API.Core;
@@ -17,7 +19,7 @@ public partial class NetworkedVector<T> : NativeObject, IReadOnlyCollection<T>
}
public unsafe uint Size => Unsafe.Read<uint>((void*)Handle);
public unsafe int Count => NativeAPI.GetNetworkVectorSize(Handle);
public T this[int index]
@@ -28,7 +30,7 @@ public partial class NetworkedVector<T> : NativeObject, IReadOnlyCollection<T>
{
throw new NotSupportedException("Networked vectors currently only support CHandle<T>");
}
return (T)Activator.CreateInstance(typeof(T), NativeAPI.GetNetworkVectorElementAt(Handle, index));
}
}
@@ -50,4 +52,4 @@ public partial class NetworkedVector<T> : NativeObject, IReadOnlyCollection<T>
{
return GetEnumerator();
}
}
}

View File

@@ -0,0 +1,6 @@
namespace CounterStrikeSharp.API.Core.Plugin.Host;
public interface IPluginContextDependencyResolver
{
public string? ResolvePath();
}

View File

@@ -0,0 +1,93 @@
using System.Reflection;
using Microsoft.Extensions.DependencyModel;
namespace CounterStrikeSharp.API.Core.Plugin.Host;
public class PluginContextNuGetDependencyResolver : IPluginContextDependencyResolver
{
private const string NuGetPackagesEnvName = "NUGET_PACKAGES";
private readonly string _rootAssemblyName;
private readonly string _rootAssemblyPath;
private readonly AssemblyName _assemblyName;
public PluginContextNuGetDependencyResolver(string rootAssemblyName,
string rootAssemblyPath,
AssemblyName assemblyName)
{
_rootAssemblyName = rootAssemblyName;
_rootAssemblyPath = rootAssemblyPath;
_assemblyName = assemblyName;
}
public string? ResolvePath()
{
var packagesRoot = GetNuGetPackagesRoot();
if (string.IsNullOrWhiteSpace(packagesRoot))
{
return null;
}
var packageName = _assemblyName.Name;
if (string.IsNullOrWhiteSpace(packageName))
{
return null;
}
var dependenciesPath = Path.Combine(_rootAssemblyPath, $"{_rootAssemblyName}.deps.json");
if (!File.Exists(dependenciesPath))
{
return null;
}
using var dependenciesStream = File.OpenRead(dependenciesPath);
using var dependencyReader = new DependencyContextJsonReader();
var context = dependencyReader.Read(dependenciesStream);
var dependencyPath = string.Empty;
foreach (var dependency in context.RuntimeLibraries)
{
if (dependency.Name == packageName)
{
if (string.IsNullOrWhiteSpace(dependency.Path) || !dependency.RuntimeAssemblyGroups.Any())
{
return null;
}
var runtimeAssemblyGroup = dependency.RuntimeAssemblyGroups[0];
if (!runtimeAssemblyGroup.AssetPaths.Any())
{
return null;
}
dependencyPath = Path.Combine(dependency.Path, runtimeAssemblyGroup.AssetPaths[0]);
break;
}
}
if (string.IsNullOrWhiteSpace(dependencyPath))
{
return null;
}
return Path.Combine(packagesRoot, dependencyPath);
}
private static string? GetNuGetPackagesRoot()
{
var nugetPath = Environment.GetEnvironmentVariable(NuGetPackagesEnvName);
if (!string.IsNullOrWhiteSpace(nugetPath) && Directory.Exists(nugetPath))
{
return nugetPath;
}
var userProfilePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
if (string.IsNullOrWhiteSpace(userProfilePath))
{
return null;
}
return Path.Combine(userProfilePath, ".nuget", "packages");
}
}

View File

@@ -1,127 +1,251 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.Loader;
using CounterStrikeSharp.API.Core.Capabilities;
using CounterStrikeSharp.API.Core.Commands;
using CounterStrikeSharp.API.Core.Hosting;
using McMaster.NETCore.Plugins;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace CounterStrikeSharp.API.Core.Plugin.Host;
public class PluginManager : IPluginManager
{
private readonly HashSet<PluginContext> _loadedPluginContexts = new();
private readonly IScriptHostConfiguration _scriptHostConfiguration;
private readonly ICommandManager _commandManager;
private readonly IServiceProvider _serviceProvider;
private readonly ILogger<PluginManager> _logger;
private readonly Dictionary<string, Assembly> _sharedAssemblies = new();
private bool _loadedSharedLibs = false;
public PluginManager(IScriptHostConfiguration scriptHostConfiguration, ICommandManager commandManager,
ILogger<PluginManager> logger, IServiceProvider serviceProvider, IServiceScopeFactory serviceScopeFactory)
{
_scriptHostConfiguration = scriptHostConfiguration;
_commandManager = commandManager;
_logger = logger;
_serviceProvider = serviceProvider;
}
private void LoadLibrary(string path)
{
var loader = PluginLoader.CreateFromAssemblyFile(path, new[] { typeof(IPlugin), typeof(PluginCapability<>), typeof(PlayerCapability<>) },
config => { config.PreferSharedTypes = true; });
var assembly = loader.LoadDefaultAssembly();
_sharedAssemblies[assembly.GetName().Name] = assembly;
}
private void LoadSharedLibraries()
{
var sharedDirectory = Directory.GetDirectories(_scriptHostConfiguration.SharedPath);
var sharedAssemblyPaths = sharedDirectory
.Select(dir => Path.Combine(dir, Path.GetFileName(dir) + ".dll"))
.Where(File.Exists)
.ToArray();
foreach (var sharedAssemblyPath in sharedAssemblyPaths)
{
try
{
LoadLibrary(sharedAssemblyPath);
}
catch (Exception e)
{
_logger.LogError(e, "Failed to load shared assembly from {Path}", sharedAssemblyPath);
}
}
}
public void Load()
{
var pluginDirectories = Directory.GetDirectories(_scriptHostConfiguration.PluginPath);
var pluginAssemblyPaths = pluginDirectories
.Select(dir => Path.Combine(dir, Path.GetFileName(dir) + ".dll"))
.Where(File.Exists)
.ToArray();
AssemblyLoadContext.Default.Resolving += (context, name) =>
{
if (!_loadedSharedLibs)
{
LoadSharedLibraries();
_loadedSharedLibs = true;
}
if (!_sharedAssemblies.TryGetValue(name.Name, out var assembly))
{
return null;
}
return assembly;
};
if (CoreConfig.PluginAutoLoadEnabled)
{
foreach (var path in pluginAssemblyPaths)
{
try
{
LoadPlugin(path);
}
catch (Exception e)
{
_logger.LogError(e, "Failed to load plugin from {Path}", path);
}
}
}
foreach (var plugin in _loadedPluginContexts)
{
try
{
plugin.Plugin?.OnAllPluginsLoaded(false);
}
catch (Exception e)
{
_logger.LogError(e, "OnAllPluginsLoaded failed");
}
}
}
public IEnumerable<PluginContext> GetLoadedPlugins()
{
return _loadedPluginContexts;
}
public void LoadPlugin(string path)
{
var plugin = new PluginContext(_serviceProvider, _commandManager, _scriptHostConfiguration, path,
_loadedPluginContexts.Select(x => x.PluginId).DefaultIfEmpty(0).Max() + 1);
_loadedPluginContexts.Add(plugin);
plugin.Load();
}
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.Loader;
using CounterStrikeSharp.API.Core.Capabilities;
using CounterStrikeSharp.API.Core.Commands;
using CounterStrikeSharp.API.Core.Hosting;
using McMaster.NETCore.Plugins;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace CounterStrikeSharp.API.Core.Plugin.Host;
public class PluginManager : IPluginManager
{
private readonly HashSet<PluginContext> _loadedPluginContexts = new();
private readonly IScriptHostConfiguration _scriptHostConfiguration;
private readonly ICommandManager _commandManager;
private readonly IServiceProvider _serviceProvider;
private readonly ILogger<PluginManager> _logger;
private readonly Dictionary<string, Assembly> _sharedAssemblies = new();
private bool _loadedSharedLibs = false;
public PluginManager(IScriptHostConfiguration scriptHostConfiguration, ICommandManager commandManager,
ILogger<PluginManager> logger, IServiceProvider serviceProvider, IServiceScopeFactory serviceScopeFactory)
{
_scriptHostConfiguration = scriptHostConfiguration;
_commandManager = commandManager;
_logger = logger;
_serviceProvider = serviceProvider;
}
private void LoadLibrary(string path)
{
var loader = PluginLoader.CreateFromAssemblyFile(path, new[] { typeof(IPlugin), typeof(PluginCapability<>), typeof(PlayerCapability<>) },
config => { config.PreferSharedTypes = true; });
var assembly = loader.LoadDefaultAssembly();
if (CoreConfig.PluginResolveNugetPackages)
{
foreach (var assemblyName in assembly.GetReferencedAssemblies())
{
if (TryLoadDependency(path, assembly.GetName().Name, assemblyName, out var dependency))
{
_sharedAssemblies.TryAdd(dependency.GetName().Name, dependency);
}
}
}
_sharedAssemblies[assembly.GetName().Name] = assembly;
}
private void LoadSharedLibraries()
{
var sharedDirectory = Directory.GetDirectories(_scriptHostConfiguration.SharedPath);
var sharedAssemblyPaths = sharedDirectory
.Select(dir => Path.Combine(dir, Path.GetFileName(dir) + ".dll"))
.Where(File.Exists)
.ToArray();
foreach (var sharedAssemblyPath in sharedAssemblyPaths)
{
try
{
LoadLibrary(sharedAssemblyPath);
}
catch (Exception e)
{
_logger.LogError(e, "Failed to load shared assembly from {Path}", sharedAssemblyPath);
}
}
}
public void Load()
{
var pluginAssemblyPaths = GetPluginsAssemblyPaths();
AssemblyLoadContext.Default.Resolving += (context, name) =>
{
if (!_loadedSharedLibs)
{
LoadSharedLibraries();
_loadedSharedLibs = true;
}
if (!_sharedAssemblies.TryGetValue(name.Name, out var assembly))
{
if (CoreConfig.PluginResolveNugetPackages && TryLoadExternalLibrary(name, out assembly))
{
return assembly;
}
return null;
}
return assembly;
};
if (CoreConfig.PluginAutoLoadEnabled)
{
foreach (var path in pluginAssemblyPaths)
{
try
{
LoadPlugin(path);
}
catch (Exception e)
{
_logger.LogError(e, "Failed to load plugin from {Path}", path);
}
}
}
foreach (var plugin in _loadedPluginContexts)
{
try
{
plugin.Plugin?.OnAllPluginsLoaded(false);
}
catch (Exception e)
{
_logger.LogError(e, "OnAllPluginsLoaded failed");
}
}
}
private bool TryLoadExternalLibrary(AssemblyName assemblyName, out Assembly? assembly)
{
assembly = null;
if (!TryResolveReflectionAssemblyPath(out var pluginName, out var pluginPath))
{
return false;
}
if (!TryLoadDependency(pluginPath, pluginName, assemblyName, out assembly))
{
return false;
}
return true;
}
private bool TryLoadDependency(string pluginAssemblyPath,
string pluginAssemblyName,
AssemblyName dependencyAssemblyName,
out Assembly? assembly)
{
assembly = null;
var dependencyName = dependencyAssemblyName.Name!;
if (string.IsNullOrEmpty(pluginAssemblyPath) || _sharedAssemblies.ContainsKey(dependencyName))
{
return false;
}
var resolver = new PluginContextNuGetDependencyResolver(
rootAssemblyName: pluginAssemblyName,
rootAssemblyPath: Path.GetDirectoryName(pluginAssemblyPath)!,
assemblyName: dependencyAssemblyName);
var dependencyPath = resolver.ResolvePath();
if (string.IsNullOrWhiteSpace(dependencyPath))
{
return false;
}
var loader = PluginLoader.CreateFromAssemblyFile(dependencyPath, configure: c =>
{
c.PreferSharedTypes = true;
});
assembly = loader.LoadDefaultAssembly();
_sharedAssemblies[dependencyAssemblyName.Name!] = assembly;
return true;
}
public IEnumerable<PluginContext> GetLoadedPlugins()
{
return _loadedPluginContexts;
}
public void LoadPlugin(string path)
{
var plugin = new PluginContext(_serviceProvider, _commandManager, _scriptHostConfiguration, path,
_loadedPluginContexts.Select(x => x.PluginId).DefaultIfEmpty(0).Max() + 1);
_loadedPluginContexts.Add(plugin);
plugin.Load();
}
private static bool TryResolveReflectionAssemblyPath(out string? assemblyName, out string? assemblyPath)
{
assemblyPath = null;
assemblyName = null;
if (AssemblyLoadContext.CurrentContextualReflectionContext is var reflectionContext && reflectionContext is null)
{
return false;
}
var mainAssemblyPathField = reflectionContext
.GetType()
.GetField("_mainAssemblyPath", BindingFlags.NonPublic | BindingFlags.Instance);
if (mainAssemblyPathField is null)
{
return false;
}
assemblyPath = (string)mainAssemblyPathField.GetValue(reflectionContext)!;
return !string.IsNullOrEmpty(assemblyPath);
}
private string[] GetPluginsAssemblyPaths()
{
// Skip "disabled" at root level
var rootSubDirs = Directory.GetDirectories(_scriptHostConfiguration.PluginPath)
.Where(d => !Path.GetFileName(d).Equals("disabled", StringComparison.OrdinalIgnoreCase));
var pluginDirectories = new List<string>();
foreach (var subDir in rootSubDirs)
{
var stack = new Stack<string>();
stack.Push(subDir);
while (stack.Count > 0)
{
var currentDir = stack.Pop();
var dirName = Path.GetFileName(currentDir);
var expectedDll = Path.Combine(currentDir, dirName + ".dll");
if (File.Exists(expectedDll))
{
pluginDirectories.Add(currentDir);
// Stop scanning deeper in this directory
continue;
}
// Add subdirectories to stack for further scanning
foreach (var child in Directory.GetDirectories(currentDir))
stack.Push(child);
}
}
return pluginDirectories
.Select(d => Path.Combine(d, Path.GetFileName(d) + ".dll"))
.ToArray();
}
}

View File

@@ -31,10 +31,17 @@ using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Serilog;
using ILogger = Microsoft.Extensions.Logging.ILogger;
using System.Threading;
using System;
namespace CounterStrikeSharp.API.Core.Plugin
{
public class PluginContext : IPluginContext
public interface ISelfPluginControl
{
void TerminateSelf(string reason);
}
public class PluginContext : IPluginContext, ISelfPluginControl
{
public PluginState State { get; set; } = PluginState.Unregistered;
public IPlugin Plugin { get; private set; }
@@ -50,10 +57,12 @@ namespace CounterStrikeSharp.API.Core.Plugin
private readonly string _path;
private readonly FileSystemWatcher _fileWatcher;
private readonly IServiceProvider _applicationServiceProvider;
public string FilePath => _path;
private IServiceScope _serviceScope;
public string TerminationReason { get; private set; }
// TOOD: ServiceCollection
private ILogger _logger = CoreLogging.Factory.CreateLogger<PluginContext>();
@@ -65,7 +74,7 @@ namespace CounterStrikeSharp.API.Core.Plugin
_hostConfiguration = hostConfiguration;
_path = path;
PluginId = id;
Loader = PluginLoader.CreateFromAssemblyFile(path,
new[]
{
@@ -77,7 +86,7 @@ namespace CounterStrikeSharp.API.Core.Plugin
config.IsUnloadable = true;
config.PreferSharedTypes = true;
});
if (CoreConfig.PluginHotReloadEnabled)
{
_fileWatcher = new FileSystemWatcher
@@ -113,14 +122,14 @@ namespace CounterStrikeSharp.API.Core.Plugin
Load(hotReload: true);
Plugin.OnAllPluginsLoaded(hotReload: true);
});
return Task.CompletedTask;
}
public void Load(bool hotReload = false)
{
if (State == PluginState.Loaded) return;
using (Loader.EnterContextualReflection())
{
var defaultAssembly = Loader.LoadDefaultAssembly();
@@ -178,7 +187,7 @@ namespace CounterStrikeSharp.API.Core.Plugin
method?.Invoke(pluginServiceCollection, new object[] { serviceCollection });
}
}
serviceCollection.AddScoped<ICommandManager>(c => _commandManager);
serviceCollection.DecorateSingleton<ICommandManager, PluginCommandManagerDecorator>();
@@ -215,7 +224,33 @@ namespace CounterStrikeSharp.API.Core.Plugin
Plugin.Logger = ServiceProvider.GetRequiredService<ILoggerFactory>().CreateLogger(pluginType);
Plugin.InitializeConfig(Plugin, pluginType);
Plugin.Load(hotReload);
if (Plugin is BasePlugin basePlugin)
{
basePlugin.SelfControl = this;
}
this.TerminationReason = string.Empty;
try
{
Plugin.Load(hotReload);
}
catch (Exception ex)
{
if ((ex.InnerException ?? ex) is PluginTerminationException pluginEx)
{
_logger.LogCritical("Terminating plugin {Name} with reason: {Reason}", Plugin.ModuleName, pluginEx.TerminationReason);
this.TerminationReason = pluginEx.TerminationReason;
}
else
{
_logger.LogError(ex, "Failed to load plugin {Name}", Plugin.ModuleName);
this.TerminationReason = ex.Message ?? "Unknown";
}
Unload(hotReload);
return;
}
_logger.LogInformation("Finished loading plugin {Name}", Plugin.ModuleName);
@@ -233,12 +268,60 @@ namespace CounterStrikeSharp.API.Core.Plugin
_logger.LogInformation("Unloading plugin {Name}", Plugin.ModuleName);
Plugin.Unload(hotReload);
Plugin.Dispose();
_serviceScope.Dispose();
try
{
Plugin.Unload(hotReload);
}
catch
{
_logger.LogError("Failed to unload {Name} during error recovery, forcing cleanup", Plugin.ModuleName);
return;
}
finally
{
Plugin.Dispose();
_serviceScope.Dispose();
}
_logger.LogInformation("Finished unloading plugin {Name}", cachedName);
}
public void TerminateWithReason(string reason)
{
this.TerminationReason = reason;
switch (State)
{
case PluginState.Unloaded:
case PluginState.Loading:
break;
case PluginState.Loaded:
_logger.LogInformation("Terminating plugin {Name} with reason: {Reason}", Plugin.ModuleName, reason);
Unload(false);
break;
}
// Force execution flow interruption via globally-handled exception to prevent stack unwinding
throw new PluginTerminationException(reason);
}
void ISelfPluginControl.TerminateSelf(string reason)
{
if (State != PluginState.Unloaded)
{
if (Thread.CurrentThread.IsThreadPoolThread)
{
Server.NextFrame(() => TerminateWithReason(reason));
}
else
{
TerminateWithReason(reason);
}
// **Failsafe mechanism** ensures execution termination
// Prevents control flow leakage back to plugin execution context
throw new NotImplementedException();
}
}
}
}

View File

@@ -0,0 +1,32 @@
using System;
namespace CounterStrikeSharp.API.Core.Plugin
{
public class PluginTerminationException : Exception
{
public string PluginName { get; }
public string TerminationReason { get; }
public PluginTerminationException(string reason) : base($"Plugin terminated: {reason}")
{
TerminationReason = reason;
}
public PluginTerminationException(string pluginName, string reason) : base($"Plugin '{pluginName}' terminated: {reason}")
{
PluginName = pluginName;
TerminationReason = reason;
}
public PluginTerminationException(string reason, Exception innerException) : base($"Plugin terminated: {reason}", innerException)
{
TerminationReason = reason;
}
public PluginTerminationException(string pluginName, string reason, Exception innerException) : base($"Plugin '{pluginName}' terminated: {reason}", innerException)
{
PluginName = pluginName;
TerminationReason = reason;
}
}
}

View File

@@ -1,49 +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 CAISound : CPointEntity
{
public CAISound (IntPtr pointer) : base(pointer) {}
// m_iSoundType
[SchemaMember("CAISound", "m_iSoundType")]
public ref SoundTypes_t SoundType => ref Schema.GetRef<SoundTypes_t>(this.Handle, "CAISound", "m_iSoundType");
// m_iSoundFlags
[SchemaMember("CAISound", "m_iSoundFlags")]
public ref SoundFlags_t SoundFlags => ref Schema.GetRef<SoundFlags_t>(this.Handle, "CAISound", "m_iSoundFlags");
// m_iVolume
[SchemaMember("CAISound", "m_iVolume")]
public ref Int32 Volume => ref Schema.GetRef<Int32>(this.Handle, "CAISound", "m_iVolume");
// m_iSoundIndex
[SchemaMember("CAISound", "m_iSoundIndex")]
public ref Int32 SoundIndex => ref Schema.GetRef<Int32>(this.Handle, "CAISound", "m_iSoundIndex");
// m_flDuration
[SchemaMember("CAISound", "m_flDuration")]
public ref float Duration => ref Schema.GetRef<float>(this.Handle, "CAISound", "m_flDuration");
// m_iszProxyEntityName
[SchemaMember("CAISound", "m_iszProxyEntityName")]
public string ProxyEntityName
{
get { return Schema.GetUtf8String(this.Handle, "CAISound", "m_iszProxyEntityName"); }
set { Schema.SetString(this.Handle, "CAISound", "m_iszProxyEntityName", value); }
}
}

View File

@@ -1,61 +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 CAI_Expresser : NativeObject
{
public CAI_Expresser (IntPtr pointer) : base(pointer) {}
// m_flStopTalkTime
[SchemaMember("CAI_Expresser", "m_flStopTalkTime")]
public ref float StopTalkTime => ref Schema.GetRef<float>(this.Handle, "CAI_Expresser", "m_flStopTalkTime");
// m_flStopTalkTimeWithoutDelay
[SchemaMember("CAI_Expresser", "m_flStopTalkTimeWithoutDelay")]
public ref float StopTalkTimeWithoutDelay => ref Schema.GetRef<float>(this.Handle, "CAI_Expresser", "m_flStopTalkTimeWithoutDelay");
// m_flBlockedTalkTime
[SchemaMember("CAI_Expresser", "m_flBlockedTalkTime")]
public ref float BlockedTalkTime => ref Schema.GetRef<float>(this.Handle, "CAI_Expresser", "m_flBlockedTalkTime");
// m_voicePitch
[SchemaMember("CAI_Expresser", "m_voicePitch")]
public ref Int32 VoicePitch => ref Schema.GetRef<Int32>(this.Handle, "CAI_Expresser", "m_voicePitch");
// m_flLastTimeAcceptedSpeak
[SchemaMember("CAI_Expresser", "m_flLastTimeAcceptedSpeak")]
public ref float LastTimeAcceptedSpeak => ref Schema.GetRef<float>(this.Handle, "CAI_Expresser", "m_flLastTimeAcceptedSpeak");
// m_bAllowSpeakingInterrupts
[SchemaMember("CAI_Expresser", "m_bAllowSpeakingInterrupts")]
public ref bool AllowSpeakingInterrupts => ref Schema.GetRef<bool>(this.Handle, "CAI_Expresser", "m_bAllowSpeakingInterrupts");
// m_bConsiderSceneInvolvementAsSpeech
[SchemaMember("CAI_Expresser", "m_bConsiderSceneInvolvementAsSpeech")]
public ref bool ConsiderSceneInvolvementAsSpeech => ref Schema.GetRef<bool>(this.Handle, "CAI_Expresser", "m_bConsiderSceneInvolvementAsSpeech");
// m_bSceneEntityDisabled
[SchemaMember("CAI_Expresser", "m_bSceneEntityDisabled")]
public ref bool SceneEntityDisabled => ref Schema.GetRef<bool>(this.Handle, "CAI_Expresser", "m_bSceneEntityDisabled");
// m_nLastSpokenPriority
[SchemaMember("CAI_Expresser", "m_nLastSpokenPriority")]
public ref Int32 LastSpokenPriority => ref Schema.GetRef<Int32>(this.Handle, "CAI_Expresser", "m_nLastSpokenPriority");
// m_pOuter
[SchemaMember("CAI_Expresser", "m_pOuter")]
public CBaseFlex? Outer => Schema.GetPointer<CBaseFlex>(this.Handle, "CAI_Expresser", "m_pOuter");
}

View File

@@ -1,69 +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 CAmbientGeneric : CPointEntity
{
public CAmbientGeneric (IntPtr pointer) : base(pointer) {}
// m_radius
[SchemaMember("CAmbientGeneric", "m_radius")]
public ref float Radius => ref Schema.GetRef<float>(this.Handle, "CAmbientGeneric", "m_radius");
// m_flMaxRadius
[SchemaMember("CAmbientGeneric", "m_flMaxRadius")]
public ref float MaxRadius => ref Schema.GetRef<float>(this.Handle, "CAmbientGeneric", "m_flMaxRadius");
// m_iSoundLevel
[SchemaMember("CAmbientGeneric", "m_iSoundLevel")]
public ref soundlevel_t SoundLevel => ref Schema.GetRef<soundlevel_t>(this.Handle, "CAmbientGeneric", "m_iSoundLevel");
// m_dpv
[SchemaMember("CAmbientGeneric", "m_dpv")]
public dynpitchvol_t Dpv => Schema.GetDeclaredClass<dynpitchvol_t>(this.Handle, "CAmbientGeneric", "m_dpv");
// m_fActive
[SchemaMember("CAmbientGeneric", "m_fActive")]
public ref bool Active => ref Schema.GetRef<bool>(this.Handle, "CAmbientGeneric", "m_fActive");
// m_fLooping
[SchemaMember("CAmbientGeneric", "m_fLooping")]
public ref bool Looping => ref Schema.GetRef<bool>(this.Handle, "CAmbientGeneric", "m_fLooping");
// m_iszSound
[SchemaMember("CAmbientGeneric", "m_iszSound")]
public string Sound
{
get { return Schema.GetUtf8String(this.Handle, "CAmbientGeneric", "m_iszSound"); }
set { Schema.SetString(this.Handle, "CAmbientGeneric", "m_iszSound", value); }
}
// m_sSourceEntName
[SchemaMember("CAmbientGeneric", "m_sSourceEntName")]
public string SourceEntName
{
get { return Schema.GetUtf8String(this.Handle, "CAmbientGeneric", "m_sSourceEntName"); }
set { Schema.SetString(this.Handle, "CAmbientGeneric", "m_sSourceEntName", value); }
}
// m_hSoundSource
[SchemaMember("CAmbientGeneric", "m_hSoundSource")]
public CHandle<CBaseEntity> SoundSource => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CAmbientGeneric", "m_hSoundSource");
// m_nSoundSourceEntIndex
[SchemaMember("CAmbientGeneric", "m_nSoundSourceEntIndex")]
public CEntityIndex SoundSourceEntIndex => Schema.GetDeclaredClass<CEntityIndex>(this.Handle, "CAmbientGeneric", "m_nSoundSourceEntIndex");
}

View File

@@ -1,117 +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 CAnimGraphNetworkedVariables : NativeObject
{
public CAnimGraphNetworkedVariables (IntPtr pointer) : base(pointer) {}
// m_PredNetBoolVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_PredNetBoolVariables")]
public NetworkedVector<UInt32> PredNetBoolVariables => Schema.GetDeclaredClass<NetworkedVector<UInt32>>(this.Handle, "CAnimGraphNetworkedVariables", "m_PredNetBoolVariables");
// m_PredNetByteVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_PredNetByteVariables")]
public NetworkedVector<byte> PredNetByteVariables => Schema.GetDeclaredClass<NetworkedVector<byte>>(this.Handle, "CAnimGraphNetworkedVariables", "m_PredNetByteVariables");
// m_PredNetUInt16Variables
[SchemaMember("CAnimGraphNetworkedVariables", "m_PredNetUInt16Variables")]
public NetworkedVector<UInt16> PredNetUInt16Variables => Schema.GetDeclaredClass<NetworkedVector<UInt16>>(this.Handle, "CAnimGraphNetworkedVariables", "m_PredNetUInt16Variables");
// m_PredNetIntVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_PredNetIntVariables")]
public NetworkedVector<Int32> PredNetIntVariables => Schema.GetDeclaredClass<NetworkedVector<Int32>>(this.Handle, "CAnimGraphNetworkedVariables", "m_PredNetIntVariables");
// m_PredNetUInt32Variables
[SchemaMember("CAnimGraphNetworkedVariables", "m_PredNetUInt32Variables")]
public NetworkedVector<UInt32> PredNetUInt32Variables => Schema.GetDeclaredClass<NetworkedVector<UInt32>>(this.Handle, "CAnimGraphNetworkedVariables", "m_PredNetUInt32Variables");
// m_PredNetUInt64Variables
[SchemaMember("CAnimGraphNetworkedVariables", "m_PredNetUInt64Variables")]
public NetworkedVector<UInt64> PredNetUInt64Variables => Schema.GetDeclaredClass<NetworkedVector<UInt64>>(this.Handle, "CAnimGraphNetworkedVariables", "m_PredNetUInt64Variables");
// m_PredNetFloatVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_PredNetFloatVariables")]
public NetworkedVector<float> PredNetFloatVariables => Schema.GetDeclaredClass<NetworkedVector<float>>(this.Handle, "CAnimGraphNetworkedVariables", "m_PredNetFloatVariables");
// m_PredNetVectorVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_PredNetVectorVariables")]
public NetworkedVector<Vector> PredNetVectorVariables => Schema.GetDeclaredClass<NetworkedVector<Vector>>(this.Handle, "CAnimGraphNetworkedVariables", "m_PredNetVectorVariables");
// m_PredNetQuaternionVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_PredNetQuaternionVariables")]
public NetworkedVector<Quaternion> PredNetQuaternionVariables => Schema.GetDeclaredClass<NetworkedVector<Quaternion>>(this.Handle, "CAnimGraphNetworkedVariables", "m_PredNetQuaternionVariables");
// m_PredNetGlobalSymbolVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_PredNetGlobalSymbolVariables")]
public NetworkedVector<string> PredNetGlobalSymbolVariables => Schema.GetDeclaredClass<NetworkedVector<string>>(this.Handle, "CAnimGraphNetworkedVariables", "m_PredNetGlobalSymbolVariables");
// m_OwnerOnlyPredNetBoolVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetBoolVariables")]
public NetworkedVector<UInt32> OwnerOnlyPredNetBoolVariables => Schema.GetDeclaredClass<NetworkedVector<UInt32>>(this.Handle, "CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetBoolVariables");
// m_OwnerOnlyPredNetByteVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetByteVariables")]
public NetworkedVector<byte> OwnerOnlyPredNetByteVariables => Schema.GetDeclaredClass<NetworkedVector<byte>>(this.Handle, "CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetByteVariables");
// m_OwnerOnlyPredNetUInt16Variables
[SchemaMember("CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetUInt16Variables")]
public NetworkedVector<UInt16> OwnerOnlyPredNetUInt16Variables => Schema.GetDeclaredClass<NetworkedVector<UInt16>>(this.Handle, "CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetUInt16Variables");
// m_OwnerOnlyPredNetIntVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetIntVariables")]
public NetworkedVector<Int32> OwnerOnlyPredNetIntVariables => Schema.GetDeclaredClass<NetworkedVector<Int32>>(this.Handle, "CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetIntVariables");
// m_OwnerOnlyPredNetUInt32Variables
[SchemaMember("CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetUInt32Variables")]
public NetworkedVector<UInt32> OwnerOnlyPredNetUInt32Variables => Schema.GetDeclaredClass<NetworkedVector<UInt32>>(this.Handle, "CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetUInt32Variables");
// m_OwnerOnlyPredNetUInt64Variables
[SchemaMember("CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetUInt64Variables")]
public NetworkedVector<UInt64> OwnerOnlyPredNetUInt64Variables => Schema.GetDeclaredClass<NetworkedVector<UInt64>>(this.Handle, "CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetUInt64Variables");
// m_OwnerOnlyPredNetFloatVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetFloatVariables")]
public NetworkedVector<float> OwnerOnlyPredNetFloatVariables => Schema.GetDeclaredClass<NetworkedVector<float>>(this.Handle, "CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetFloatVariables");
// m_OwnerOnlyPredNetVectorVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetVectorVariables")]
public NetworkedVector<Vector> OwnerOnlyPredNetVectorVariables => Schema.GetDeclaredClass<NetworkedVector<Vector>>(this.Handle, "CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetVectorVariables");
// m_OwnerOnlyPredNetQuaternionVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetQuaternionVariables")]
public NetworkedVector<Quaternion> OwnerOnlyPredNetQuaternionVariables => Schema.GetDeclaredClass<NetworkedVector<Quaternion>>(this.Handle, "CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetQuaternionVariables");
// m_OwnerOnlyPredNetGlobalSymbolVariables
[SchemaMember("CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetGlobalSymbolVariables")]
public NetworkedVector<string> OwnerOnlyPredNetGlobalSymbolVariables => Schema.GetDeclaredClass<NetworkedVector<string>>(this.Handle, "CAnimGraphNetworkedVariables", "m_OwnerOnlyPredNetGlobalSymbolVariables");
// m_nBoolVariablesCount
[SchemaMember("CAnimGraphNetworkedVariables", "m_nBoolVariablesCount")]
public ref Int32 BoolVariablesCount => ref Schema.GetRef<Int32>(this.Handle, "CAnimGraphNetworkedVariables", "m_nBoolVariablesCount");
// m_nOwnerOnlyBoolVariablesCount
[SchemaMember("CAnimGraphNetworkedVariables", "m_nOwnerOnlyBoolVariablesCount")]
public ref Int32 OwnerOnlyBoolVariablesCount => ref Schema.GetRef<Int32>(this.Handle, "CAnimGraphNetworkedVariables", "m_nOwnerOnlyBoolVariablesCount");
// m_nRandomSeedOffset
[SchemaMember("CAnimGraphNetworkedVariables", "m_nRandomSeedOffset")]
public ref Int32 RandomSeedOffset => ref Schema.GetRef<Int32>(this.Handle, "CAnimGraphNetworkedVariables", "m_nRandomSeedOffset");
// m_flLastTeleportTime
[SchemaMember("CAnimGraphNetworkedVariables", "m_flLastTeleportTime")]
public ref float LastTeleportTime => ref Schema.GetRef<float>(this.Handle, "CAnimGraphNetworkedVariables", "m_flLastTeleportTime");
}

View File

@@ -1,41 +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 CAttributeManager : NativeObject
{
public CAttributeManager (IntPtr pointer) : base(pointer) {}
// m_Providers
[SchemaMember("CAttributeManager", "m_Providers")]
public NetworkedVector<CHandle<CBaseEntity>> Providers => Schema.GetDeclaredClass<NetworkedVector<CHandle<CBaseEntity>>>(this.Handle, "CAttributeManager", "m_Providers");
// m_iReapplyProvisionParity
[SchemaMember("CAttributeManager", "m_iReapplyProvisionParity")]
public ref Int32 ReapplyProvisionParity => ref Schema.GetRef<Int32>(this.Handle, "CAttributeManager", "m_iReapplyProvisionParity");
// m_hOuter
[SchemaMember("CAttributeManager", "m_hOuter")]
public CHandle<CBaseEntity> Outer => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CAttributeManager", "m_hOuter");
// m_bPreventLoopback
[SchemaMember("CAttributeManager", "m_bPreventLoopback")]
public ref bool PreventLoopback => ref Schema.GetRef<bool>(this.Handle, "CAttributeManager", "m_bPreventLoopback");
// m_ProviderType
[SchemaMember("CAttributeManager", "m_ProviderType")]
public ref attributeprovidertypes_t ProviderType => ref Schema.GetRef<attributeprovidertypes_t>(this.Handle, "CAttributeManager", "m_ProviderType");
}

View File

@@ -1,321 +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 CBarnLight : CBaseModelEntity
{
public CBarnLight (IntPtr pointer) : base(pointer) {}
// m_bEnabled
[SchemaMember("CBarnLight", "m_bEnabled")]
public ref bool Enabled => ref Schema.GetRef<bool>(this.Handle, "CBarnLight", "m_bEnabled");
// m_nColorMode
[SchemaMember("CBarnLight", "m_nColorMode")]
public ref Int32 ColorMode => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nColorMode");
// m_Color
[SchemaMember("CBarnLight", "m_Color")]
public Color Color
{
get { return Schema.GetCustomMarshalledType<Color>(this.Handle, "CBarnLight", "m_Color"); }
set { Schema.SetCustomMarshalledType<Color>(this.Handle, "CBarnLight", "m_Color", value); }
}
// m_flColorTemperature
[SchemaMember("CBarnLight", "m_flColorTemperature")]
public ref float ColorTemperature => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flColorTemperature");
// m_flBrightness
[SchemaMember("CBarnLight", "m_flBrightness")]
public ref float Brightness => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flBrightness");
// m_flBrightnessScale
[SchemaMember("CBarnLight", "m_flBrightnessScale")]
public ref float BrightnessScale => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flBrightnessScale");
// m_nDirectLight
[SchemaMember("CBarnLight", "m_nDirectLight")]
public ref Int32 DirectLight => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nDirectLight");
// m_nBakedShadowIndex
[SchemaMember("CBarnLight", "m_nBakedShadowIndex")]
public ref Int32 BakedShadowIndex => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nBakedShadowIndex");
// m_nLuminaireShape
[SchemaMember("CBarnLight", "m_nLuminaireShape")]
public ref Int32 LuminaireShape => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nLuminaireShape");
// m_flLuminaireSize
[SchemaMember("CBarnLight", "m_flLuminaireSize")]
public ref float LuminaireSize => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flLuminaireSize");
// m_flLuminaireAnisotropy
[SchemaMember("CBarnLight", "m_flLuminaireAnisotropy")]
public ref float LuminaireAnisotropy => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flLuminaireAnisotropy");
// m_LightStyleString
[SchemaMember("CBarnLight", "m_LightStyleString")]
public string LightStyleString
{
get { return Schema.GetUtf8String(this.Handle, "CBarnLight", "m_LightStyleString"); }
set { Schema.SetString(this.Handle, "CBarnLight", "m_LightStyleString", value); }
}
// m_flLightStyleStartTime
[SchemaMember("CBarnLight", "m_flLightStyleStartTime")]
public ref float LightStyleStartTime => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flLightStyleStartTime");
// m_QueuedLightStyleStrings
[SchemaMember("CBarnLight", "m_QueuedLightStyleStrings")]
public NetworkedVector<string> QueuedLightStyleStrings => Schema.GetDeclaredClass<NetworkedVector<string>>(this.Handle, "CBarnLight", "m_QueuedLightStyleStrings");
// m_LightStyleEvents
[SchemaMember("CBarnLight", "m_LightStyleEvents")]
public NetworkedVector<string> LightStyleEvents => Schema.GetDeclaredClass<NetworkedVector<string>>(this.Handle, "CBarnLight", "m_LightStyleEvents");
// m_LightStyleTargets
[SchemaMember("CBarnLight", "m_LightStyleTargets")]
public NetworkedVector<CHandle<CBaseModelEntity>> LightStyleTargets => Schema.GetDeclaredClass<NetworkedVector<CHandle<CBaseModelEntity>>>(this.Handle, "CBarnLight", "m_LightStyleTargets");
// m_StyleEvent
[SchemaMember("CBarnLight", "m_StyleEvent")]
public Span<CEntityIOOutput> StyleEvent => Schema.GetFixedArray<CEntityIOOutput>(this.Handle, "CBarnLight", "m_StyleEvent", 4);
// m_hLightCookie
[SchemaMember("CBarnLight", "m_hLightCookie")]
public CStrongHandle<InfoForResourceTypeCTextureBase> LightCookie => Schema.GetDeclaredClass<CStrongHandle<InfoForResourceTypeCTextureBase>>(this.Handle, "CBarnLight", "m_hLightCookie");
// m_flShape
[SchemaMember("CBarnLight", "m_flShape")]
public ref float Shape => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flShape");
// m_flSoftX
[SchemaMember("CBarnLight", "m_flSoftX")]
public ref float SoftX => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flSoftX");
// m_flSoftY
[SchemaMember("CBarnLight", "m_flSoftY")]
public ref float SoftY => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flSoftY");
// m_flSkirt
[SchemaMember("CBarnLight", "m_flSkirt")]
public ref float Skirt => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flSkirt");
// m_flSkirtNear
[SchemaMember("CBarnLight", "m_flSkirtNear")]
public ref float SkirtNear => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flSkirtNear");
// m_vSizeParams
[SchemaMember("CBarnLight", "m_vSizeParams")]
public Vector SizeParams => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vSizeParams");
// m_flRange
[SchemaMember("CBarnLight", "m_flRange")]
public ref float Range => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flRange");
// m_vShear
[SchemaMember("CBarnLight", "m_vShear")]
public Vector Shear => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vShear");
// m_nBakeSpecularToCubemaps
[SchemaMember("CBarnLight", "m_nBakeSpecularToCubemaps")]
public ref Int32 BakeSpecularToCubemaps => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nBakeSpecularToCubemaps");
// m_vBakeSpecularToCubemapsSize
[SchemaMember("CBarnLight", "m_vBakeSpecularToCubemapsSize")]
public Vector BakeSpecularToCubemapsSize => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vBakeSpecularToCubemapsSize");
// m_nCastShadows
[SchemaMember("CBarnLight", "m_nCastShadows")]
public ref Int32 CastShadows => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nCastShadows");
// m_nShadowMapSize
[SchemaMember("CBarnLight", "m_nShadowMapSize")]
public ref Int32 ShadowMapSize => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nShadowMapSize");
// m_nShadowPriority
[SchemaMember("CBarnLight", "m_nShadowPriority")]
public ref Int32 ShadowPriority => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nShadowPriority");
// m_bContactShadow
[SchemaMember("CBarnLight", "m_bContactShadow")]
public ref bool ContactShadow => ref Schema.GetRef<bool>(this.Handle, "CBarnLight", "m_bContactShadow");
// m_nBounceLight
[SchemaMember("CBarnLight", "m_nBounceLight")]
public ref Int32 BounceLight => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nBounceLight");
// m_flBounceScale
[SchemaMember("CBarnLight", "m_flBounceScale")]
public ref float BounceScale => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flBounceScale");
// m_flMinRoughness
[SchemaMember("CBarnLight", "m_flMinRoughness")]
public ref float MinRoughness => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flMinRoughness");
// m_vAlternateColor
[SchemaMember("CBarnLight", "m_vAlternateColor")]
public Vector AlternateColor => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vAlternateColor");
// m_fAlternateColorBrightness
[SchemaMember("CBarnLight", "m_fAlternateColorBrightness")]
public ref float AlternateColorBrightness => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_fAlternateColorBrightness");
// m_nFog
[SchemaMember("CBarnLight", "m_nFog")]
public ref Int32 Fog => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nFog");
// m_flFogStrength
[SchemaMember("CBarnLight", "m_flFogStrength")]
public ref float FogStrength => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flFogStrength");
// m_nFogShadows
[SchemaMember("CBarnLight", "m_nFogShadows")]
public ref Int32 FogShadows => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nFogShadows");
// m_flFogScale
[SchemaMember("CBarnLight", "m_flFogScale")]
public ref float FogScale => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flFogScale");
// m_bFogMixedShadows
[SchemaMember("CBarnLight", "m_bFogMixedShadows")]
public ref bool FogMixedShadows => ref Schema.GetRef<bool>(this.Handle, "CBarnLight", "m_bFogMixedShadows");
// m_flFadeSizeStart
[SchemaMember("CBarnLight", "m_flFadeSizeStart")]
public ref float FadeSizeStart => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flFadeSizeStart");
// m_flFadeSizeEnd
[SchemaMember("CBarnLight", "m_flFadeSizeEnd")]
public ref float FadeSizeEnd => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flFadeSizeEnd");
// m_flShadowFadeSizeStart
[SchemaMember("CBarnLight", "m_flShadowFadeSizeStart")]
public ref float ShadowFadeSizeStart => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flShadowFadeSizeStart");
// m_flShadowFadeSizeEnd
[SchemaMember("CBarnLight", "m_flShadowFadeSizeEnd")]
public ref float ShadowFadeSizeEnd => ref Schema.GetRef<float>(this.Handle, "CBarnLight", "m_flShadowFadeSizeEnd");
// m_bPrecomputedFieldsValid
[SchemaMember("CBarnLight", "m_bPrecomputedFieldsValid")]
public ref bool PrecomputedFieldsValid => ref Schema.GetRef<bool>(this.Handle, "CBarnLight", "m_bPrecomputedFieldsValid");
// m_vPrecomputedBoundsMins
[SchemaMember("CBarnLight", "m_vPrecomputedBoundsMins")]
public Vector PrecomputedBoundsMins => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedBoundsMins");
// m_vPrecomputedBoundsMaxs
[SchemaMember("CBarnLight", "m_vPrecomputedBoundsMaxs")]
public Vector PrecomputedBoundsMaxs => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedBoundsMaxs");
// m_vPrecomputedOBBOrigin
[SchemaMember("CBarnLight", "m_vPrecomputedOBBOrigin")]
public Vector PrecomputedOBBOrigin => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBOrigin");
// m_vPrecomputedOBBAngles
[SchemaMember("CBarnLight", "m_vPrecomputedOBBAngles")]
public QAngle PrecomputedOBBAngles => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBarnLight", "m_vPrecomputedOBBAngles");
// m_vPrecomputedOBBExtent
[SchemaMember("CBarnLight", "m_vPrecomputedOBBExtent")]
public Vector PrecomputedOBBExtent => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBExtent");
// m_nPrecomputedSubFrusta
[SchemaMember("CBarnLight", "m_nPrecomputedSubFrusta")]
public ref Int32 PrecomputedSubFrusta => ref Schema.GetRef<Int32>(this.Handle, "CBarnLight", "m_nPrecomputedSubFrusta");
// m_vPrecomputedOBBOrigin0
[SchemaMember("CBarnLight", "m_vPrecomputedOBBOrigin0")]
public Vector PrecomputedOBBOrigin0 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBOrigin0");
// m_vPrecomputedOBBAngles0
[SchemaMember("CBarnLight", "m_vPrecomputedOBBAngles0")]
public QAngle PrecomputedOBBAngles0 => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBarnLight", "m_vPrecomputedOBBAngles0");
// m_vPrecomputedOBBExtent0
[SchemaMember("CBarnLight", "m_vPrecomputedOBBExtent0")]
public Vector PrecomputedOBBExtent0 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBExtent0");
// m_vPrecomputedOBBOrigin1
[SchemaMember("CBarnLight", "m_vPrecomputedOBBOrigin1")]
public Vector PrecomputedOBBOrigin1 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBOrigin1");
// m_vPrecomputedOBBAngles1
[SchemaMember("CBarnLight", "m_vPrecomputedOBBAngles1")]
public QAngle PrecomputedOBBAngles1 => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBarnLight", "m_vPrecomputedOBBAngles1");
// m_vPrecomputedOBBExtent1
[SchemaMember("CBarnLight", "m_vPrecomputedOBBExtent1")]
public Vector PrecomputedOBBExtent1 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBExtent1");
// m_vPrecomputedOBBOrigin2
[SchemaMember("CBarnLight", "m_vPrecomputedOBBOrigin2")]
public Vector PrecomputedOBBOrigin2 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBOrigin2");
// m_vPrecomputedOBBAngles2
[SchemaMember("CBarnLight", "m_vPrecomputedOBBAngles2")]
public QAngle PrecomputedOBBAngles2 => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBarnLight", "m_vPrecomputedOBBAngles2");
// m_vPrecomputedOBBExtent2
[SchemaMember("CBarnLight", "m_vPrecomputedOBBExtent2")]
public Vector PrecomputedOBBExtent2 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBExtent2");
// m_vPrecomputedOBBOrigin3
[SchemaMember("CBarnLight", "m_vPrecomputedOBBOrigin3")]
public Vector PrecomputedOBBOrigin3 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBOrigin3");
// m_vPrecomputedOBBAngles3
[SchemaMember("CBarnLight", "m_vPrecomputedOBBAngles3")]
public QAngle PrecomputedOBBAngles3 => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBarnLight", "m_vPrecomputedOBBAngles3");
// m_vPrecomputedOBBExtent3
[SchemaMember("CBarnLight", "m_vPrecomputedOBBExtent3")]
public Vector PrecomputedOBBExtent3 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBExtent3");
// m_vPrecomputedOBBOrigin4
[SchemaMember("CBarnLight", "m_vPrecomputedOBBOrigin4")]
public Vector PrecomputedOBBOrigin4 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBOrigin4");
// m_vPrecomputedOBBAngles4
[SchemaMember("CBarnLight", "m_vPrecomputedOBBAngles4")]
public QAngle PrecomputedOBBAngles4 => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBarnLight", "m_vPrecomputedOBBAngles4");
// m_vPrecomputedOBBExtent4
[SchemaMember("CBarnLight", "m_vPrecomputedOBBExtent4")]
public Vector PrecomputedOBBExtent4 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBExtent4");
// m_vPrecomputedOBBOrigin5
[SchemaMember("CBarnLight", "m_vPrecomputedOBBOrigin5")]
public Vector PrecomputedOBBOrigin5 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBOrigin5");
// m_vPrecomputedOBBAngles5
[SchemaMember("CBarnLight", "m_vPrecomputedOBBAngles5")]
public QAngle PrecomputedOBBAngles5 => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBarnLight", "m_vPrecomputedOBBAngles5");
// m_vPrecomputedOBBExtent5
[SchemaMember("CBarnLight", "m_vPrecomputedOBBExtent5")]
public Vector PrecomputedOBBExtent5 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBarnLight", "m_vPrecomputedOBBExtent5");
// m_bPvsModifyEntity
[SchemaMember("CBarnLight", "m_bPvsModifyEntity")]
public ref bool PvsModifyEntity => ref Schema.GetRef<bool>(this.Handle, "CBarnLight", "m_bPvsModifyEntity");
// m_VisClusters
[SchemaMember("CBarnLight", "m_VisClusters")]
public NetworkedVector<UInt16> VisClusters => Schema.GetDeclaredClass<NetworkedVector<UInt16>>(this.Handle, "CBarnLight", "m_VisClusters");
}

View File

@@ -1,61 +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 CBaseAnimGraph : CBaseModelEntity
{
public CBaseAnimGraph (IntPtr pointer) : base(pointer) {}
// m_bInitiallyPopulateInterpHistory
[SchemaMember("CBaseAnimGraph", "m_bInitiallyPopulateInterpHistory")]
public ref bool InitiallyPopulateInterpHistory => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraph", "m_bInitiallyPopulateInterpHistory");
// m_pChoreoServices
[SchemaMember("CBaseAnimGraph", "m_pChoreoServices")]
public IChoreoServices? ChoreoServices => Schema.GetPointer<IChoreoServices>(this.Handle, "CBaseAnimGraph", "m_pChoreoServices");
// m_bAnimGraphUpdateEnabled
[SchemaMember("CBaseAnimGraph", "m_bAnimGraphUpdateEnabled")]
public ref bool AnimGraphUpdateEnabled => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraph", "m_bAnimGraphUpdateEnabled");
// m_flMaxSlopeDistance
[SchemaMember("CBaseAnimGraph", "m_flMaxSlopeDistance")]
public ref float MaxSlopeDistance => ref Schema.GetRef<float>(this.Handle, "CBaseAnimGraph", "m_flMaxSlopeDistance");
// m_vLastSlopeCheckPos
[SchemaMember("CBaseAnimGraph", "m_vLastSlopeCheckPos")]
public Vector LastSlopeCheckPos => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseAnimGraph", "m_vLastSlopeCheckPos");
// m_bAnimationUpdateScheduled
[SchemaMember("CBaseAnimGraph", "m_bAnimationUpdateScheduled")]
public ref bool AnimationUpdateScheduled => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraph", "m_bAnimationUpdateScheduled");
// m_vecForce
[SchemaMember("CBaseAnimGraph", "m_vecForce")]
public Vector Force => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseAnimGraph", "m_vecForce");
// m_nForceBone
[SchemaMember("CBaseAnimGraph", "m_nForceBone")]
public ref Int32 ForceBone => ref Schema.GetRef<Int32>(this.Handle, "CBaseAnimGraph", "m_nForceBone");
// m_RagdollPose
[SchemaMember("CBaseAnimGraph", "m_RagdollPose")]
public PhysicsRagdollPose_t RagdollPose => Schema.GetDeclaredClass<PhysicsRagdollPose_t>(this.Handle, "CBaseAnimGraph", "m_RagdollPose");
// m_bRagdollClientSide
[SchemaMember("CBaseAnimGraph", "m_bRagdollClientSide")]
public ref bool RagdollClientSide => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraph", "m_bRagdollClientSide");
}

View File

@@ -1,77 +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 CBaseAnimGraphController : CSkeletonAnimationController
{
public CBaseAnimGraphController (IntPtr pointer) : base(pointer) {}
// m_animGraphNetworkedVars
[SchemaMember("CBaseAnimGraphController", "m_animGraphNetworkedVars")]
public CAnimGraphNetworkedVariables AnimGraphNetworkedVars => Schema.GetDeclaredClass<CAnimGraphNetworkedVariables>(this.Handle, "CBaseAnimGraphController", "m_animGraphNetworkedVars");
// m_bSequenceFinished
[SchemaMember("CBaseAnimGraphController", "m_bSequenceFinished")]
public ref bool SequenceFinished => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraphController", "m_bSequenceFinished");
// m_flSoundSyncTime
[SchemaMember("CBaseAnimGraphController", "m_flSoundSyncTime")]
public ref float SoundSyncTime => ref Schema.GetRef<float>(this.Handle, "CBaseAnimGraphController", "m_flSoundSyncTime");
// m_nActiveIKChainMask
[SchemaMember("CBaseAnimGraphController", "m_nActiveIKChainMask")]
public ref UInt32 ActiveIKChainMask => ref Schema.GetRef<UInt32>(this.Handle, "CBaseAnimGraphController", "m_nActiveIKChainMask");
// m_hSequence
[SchemaMember("CBaseAnimGraphController", "m_hSequence")]
public ref Int32 Sequence => ref Schema.GetRef<Int32>(this.Handle, "CBaseAnimGraphController", "m_hSequence");
// m_flSeqStartTime
[SchemaMember("CBaseAnimGraphController", "m_flSeqStartTime")]
public ref float SeqStartTime => ref Schema.GetRef<float>(this.Handle, "CBaseAnimGraphController", "m_flSeqStartTime");
// m_flSeqFixedCycle
[SchemaMember("CBaseAnimGraphController", "m_flSeqFixedCycle")]
public ref float SeqFixedCycle => ref Schema.GetRef<float>(this.Handle, "CBaseAnimGraphController", "m_flSeqFixedCycle");
// m_nAnimLoopMode
[SchemaMember("CBaseAnimGraphController", "m_nAnimLoopMode")]
public ref AnimLoopMode_t AnimLoopMode => ref Schema.GetRef<AnimLoopMode_t>(this.Handle, "CBaseAnimGraphController", "m_nAnimLoopMode");
// m_flPlaybackRate
[SchemaMember("CBaseAnimGraphController", "m_flPlaybackRate")]
public ref float PlaybackRate => ref Schema.GetRef<float>(this.Handle, "CBaseAnimGraphController", "m_flPlaybackRate");
// m_nNotifyState
[SchemaMember("CBaseAnimGraphController", "m_nNotifyState")]
public ref SequenceFinishNotifyState_t NotifyState => ref Schema.GetRef<SequenceFinishNotifyState_t>(this.Handle, "CBaseAnimGraphController", "m_nNotifyState");
// m_bNetworkedAnimationInputsChanged
[SchemaMember("CBaseAnimGraphController", "m_bNetworkedAnimationInputsChanged")]
public ref bool NetworkedAnimationInputsChanged => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraphController", "m_bNetworkedAnimationInputsChanged");
// m_bNetworkedSequenceChanged
[SchemaMember("CBaseAnimGraphController", "m_bNetworkedSequenceChanged")]
public ref bool NetworkedSequenceChanged => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraphController", "m_bNetworkedSequenceChanged");
// m_bLastUpdateSkipped
[SchemaMember("CBaseAnimGraphController", "m_bLastUpdateSkipped")]
public ref bool LastUpdateSkipped => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraphController", "m_bLastUpdateSkipped");
// m_flPrevAnimUpdateTime
[SchemaMember("CBaseAnimGraphController", "m_flPrevAnimUpdateTime")]
public ref float PrevAnimUpdateTime => ref Schema.GetRef<float>(this.Handle, "CBaseAnimGraphController", "m_flPrevAnimUpdateTime");
}

View File

@@ -1,145 +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 CBaseButton : CBaseToggle
{
public CBaseButton (IntPtr pointer) : base(pointer) {}
// m_angMoveEntitySpace
[SchemaMember("CBaseButton", "m_angMoveEntitySpace")]
public QAngle MoveEntitySpace => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBaseButton", "m_angMoveEntitySpace");
// m_fStayPushed
[SchemaMember("CBaseButton", "m_fStayPushed")]
public ref bool StayPushed => ref Schema.GetRef<bool>(this.Handle, "CBaseButton", "m_fStayPushed");
// m_fRotating
[SchemaMember("CBaseButton", "m_fRotating")]
public ref bool Rotating => ref Schema.GetRef<bool>(this.Handle, "CBaseButton", "m_fRotating");
// m_ls
[SchemaMember("CBaseButton", "m_ls")]
public locksound_t Ls => Schema.GetDeclaredClass<locksound_t>(this.Handle, "CBaseButton", "m_ls");
// m_sUseSound
[SchemaMember("CBaseButton", "m_sUseSound")]
public string UseSound
{
get { return Schema.GetUtf8String(this.Handle, "CBaseButton", "m_sUseSound"); }
set { Schema.SetString(this.Handle, "CBaseButton", "m_sUseSound", value); }
}
// m_sLockedSound
[SchemaMember("CBaseButton", "m_sLockedSound")]
public string LockedSound
{
get { return Schema.GetUtf8String(this.Handle, "CBaseButton", "m_sLockedSound"); }
set { Schema.SetString(this.Handle, "CBaseButton", "m_sLockedSound", value); }
}
// m_sUnlockedSound
[SchemaMember("CBaseButton", "m_sUnlockedSound")]
public string UnlockedSound
{
get { return Schema.GetUtf8String(this.Handle, "CBaseButton", "m_sUnlockedSound"); }
set { Schema.SetString(this.Handle, "CBaseButton", "m_sUnlockedSound", value); }
}
// m_sOverrideAnticipationName
[SchemaMember("CBaseButton", "m_sOverrideAnticipationName")]
public string OverrideAnticipationName
{
get { return Schema.GetUtf8String(this.Handle, "CBaseButton", "m_sOverrideAnticipationName"); }
set { Schema.SetString(this.Handle, "CBaseButton", "m_sOverrideAnticipationName", value); }
}
// m_bLocked
[SchemaMember("CBaseButton", "m_bLocked")]
public ref bool Locked => ref Schema.GetRef<bool>(this.Handle, "CBaseButton", "m_bLocked");
// m_bDisabled
[SchemaMember("CBaseButton", "m_bDisabled")]
public ref bool Disabled => ref Schema.GetRef<bool>(this.Handle, "CBaseButton", "m_bDisabled");
// m_flUseLockedTime
[SchemaMember("CBaseButton", "m_flUseLockedTime")]
public ref float UseLockedTime => ref Schema.GetRef<float>(this.Handle, "CBaseButton", "m_flUseLockedTime");
// m_bSolidBsp
[SchemaMember("CBaseButton", "m_bSolidBsp")]
public ref bool SolidBsp => ref Schema.GetRef<bool>(this.Handle, "CBaseButton", "m_bSolidBsp");
// m_OnDamaged
[SchemaMember("CBaseButton", "m_OnDamaged")]
public CEntityIOOutput OnDamaged => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseButton", "m_OnDamaged");
// m_OnPressed
[SchemaMember("CBaseButton", "m_OnPressed")]
public CEntityIOOutput OnPressed => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseButton", "m_OnPressed");
// m_OnUseLocked
[SchemaMember("CBaseButton", "m_OnUseLocked")]
public CEntityIOOutput OnUseLocked => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseButton", "m_OnUseLocked");
// m_OnIn
[SchemaMember("CBaseButton", "m_OnIn")]
public CEntityIOOutput OnIn => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseButton", "m_OnIn");
// m_OnOut
[SchemaMember("CBaseButton", "m_OnOut")]
public CEntityIOOutput OnOut => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseButton", "m_OnOut");
// m_nState
[SchemaMember("CBaseButton", "m_nState")]
public ref Int32 State => ref Schema.GetRef<Int32>(this.Handle, "CBaseButton", "m_nState");
// m_hConstraint
[SchemaMember("CBaseButton", "m_hConstraint")]
public CHandle<CEntityInstance> Constraint => Schema.GetDeclaredClass<CHandle<CEntityInstance>>(this.Handle, "CBaseButton", "m_hConstraint");
// m_hConstraintParent
[SchemaMember("CBaseButton", "m_hConstraintParent")]
public CHandle<CEntityInstance> ConstraintParent => Schema.GetDeclaredClass<CHandle<CEntityInstance>>(this.Handle, "CBaseButton", "m_hConstraintParent");
// m_bForceNpcExclude
[SchemaMember("CBaseButton", "m_bForceNpcExclude")]
public ref bool ForceNpcExclude => ref Schema.GetRef<bool>(this.Handle, "CBaseButton", "m_bForceNpcExclude");
// m_sGlowEntity
[SchemaMember("CBaseButton", "m_sGlowEntity")]
public string SGlowEntity
{
get { return Schema.GetUtf8String(this.Handle, "CBaseButton", "m_sGlowEntity"); }
set { Schema.SetString(this.Handle, "CBaseButton", "m_sGlowEntity", value); }
}
// m_glowEntity
[SchemaMember("CBaseButton", "m_glowEntity")]
public CHandle<CBaseModelEntity> GlowEntity => Schema.GetDeclaredClass<CHandle<CBaseModelEntity>>(this.Handle, "CBaseButton", "m_glowEntity");
// m_usable
[SchemaMember("CBaseButton", "m_usable")]
public ref bool Usable => ref Schema.GetRef<bool>(this.Handle, "CBaseButton", "m_usable");
// m_szDisplayText
[SchemaMember("CBaseButton", "m_szDisplayText")]
public string DisplayText
{
get { return Schema.GetUtf8String(this.Handle, "CBaseButton", "m_szDisplayText"); }
set { Schema.SetString(this.Handle, "CBaseButton", "m_szDisplayText", value); }
}
}

View File

@@ -1,77 +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 CBaseCSGrenade : CCSWeaponBase
{
public CBaseCSGrenade (IntPtr pointer) : base(pointer) {}
// m_bRedraw
[SchemaMember("CBaseCSGrenade", "m_bRedraw")]
public ref bool Redraw => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenade", "m_bRedraw");
// m_bIsHeldByPlayer
[SchemaMember("CBaseCSGrenade", "m_bIsHeldByPlayer")]
public ref bool IsHeldByPlayer => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenade", "m_bIsHeldByPlayer");
// m_bPinPulled
[SchemaMember("CBaseCSGrenade", "m_bPinPulled")]
public ref bool PinPulled => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenade", "m_bPinPulled");
// m_bJumpThrow
[SchemaMember("CBaseCSGrenade", "m_bJumpThrow")]
public ref bool JumpThrow => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenade", "m_bJumpThrow");
// m_bThrowAnimating
[SchemaMember("CBaseCSGrenade", "m_bThrowAnimating")]
public ref bool ThrowAnimating => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenade", "m_bThrowAnimating");
// m_fThrowTime
[SchemaMember("CBaseCSGrenade", "m_fThrowTime")]
public ref float ThrowTime => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_fThrowTime");
// m_flThrowStrength
[SchemaMember("CBaseCSGrenade", "m_flThrowStrength")]
public ref float ThrowStrength => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_flThrowStrength");
// m_flThrowStrengthApproach
[SchemaMember("CBaseCSGrenade", "m_flThrowStrengthApproach")]
public ref float ThrowStrengthApproach => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_flThrowStrengthApproach");
// m_fDropTime
[SchemaMember("CBaseCSGrenade", "m_fDropTime")]
public ref float DropTime => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_fDropTime");
// m_fPinPullTime
[SchemaMember("CBaseCSGrenade", "m_fPinPullTime")]
public ref float PinPullTime => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_fPinPullTime");
// m_bJustPulledPin
[SchemaMember("CBaseCSGrenade", "m_bJustPulledPin")]
public ref bool JustPulledPin => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenade", "m_bJustPulledPin");
// m_nNextHoldTick
[SchemaMember("CBaseCSGrenade", "m_nNextHoldTick")]
public ref Int32 NextHoldTick => ref Schema.GetRef<Int32>(this.Handle, "CBaseCSGrenade", "m_nNextHoldTick");
// m_flNextHoldFrac
[SchemaMember("CBaseCSGrenade", "m_flNextHoldFrac")]
public ref float NextHoldFrac => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenade", "m_flNextHoldFrac");
// m_hSwitchToWeaponAfterThrow
[SchemaMember("CBaseCSGrenade", "m_hSwitchToWeaponAfterThrow")]
public CHandle<CCSWeaponBase> SwitchToWeaponAfterThrow => Schema.GetDeclaredClass<CHandle<CCSWeaponBase>>(this.Handle, "CBaseCSGrenade", "m_hSwitchToWeaponAfterThrow");
}

View File

@@ -1,89 +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 CBaseCSGrenadeProjectile : CBaseGrenade
{
public CBaseCSGrenadeProjectile (IntPtr pointer) : base(pointer) {}
// m_vInitialPosition
[SchemaMember("CBaseCSGrenadeProjectile", "m_vInitialPosition")]
public Vector InitialPosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseCSGrenadeProjectile", "m_vInitialPosition");
// m_vInitialVelocity
[SchemaMember("CBaseCSGrenadeProjectile", "m_vInitialVelocity")]
public Vector InitialVelocity => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseCSGrenadeProjectile", "m_vInitialVelocity");
// m_nBounces
[SchemaMember("CBaseCSGrenadeProjectile", "m_nBounces")]
public ref Int32 Bounces => ref Schema.GetRef<Int32>(this.Handle, "CBaseCSGrenadeProjectile", "m_nBounces");
// m_nExplodeEffectIndex
[SchemaMember("CBaseCSGrenadeProjectile", "m_nExplodeEffectIndex")]
public CStrongHandle<InfoForResourceTypeIParticleSystemDefinition> ExplodeEffectIndex => Schema.GetDeclaredClass<CStrongHandle<InfoForResourceTypeIParticleSystemDefinition>>(this.Handle, "CBaseCSGrenadeProjectile", "m_nExplodeEffectIndex");
// m_nExplodeEffectTickBegin
[SchemaMember("CBaseCSGrenadeProjectile", "m_nExplodeEffectTickBegin")]
public ref Int32 ExplodeEffectTickBegin => ref Schema.GetRef<Int32>(this.Handle, "CBaseCSGrenadeProjectile", "m_nExplodeEffectTickBegin");
// m_vecExplodeEffectOrigin
[SchemaMember("CBaseCSGrenadeProjectile", "m_vecExplodeEffectOrigin")]
public Vector ExplodeEffectOrigin => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseCSGrenadeProjectile", "m_vecExplodeEffectOrigin");
// m_flSpawnTime
[SchemaMember("CBaseCSGrenadeProjectile", "m_flSpawnTime")]
public ref float SpawnTime => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenadeProjectile", "m_flSpawnTime");
// m_unOGSExtraFlags
[SchemaMember("CBaseCSGrenadeProjectile", "m_unOGSExtraFlags")]
public ref byte OGSExtraFlags => ref Schema.GetRef<byte>(this.Handle, "CBaseCSGrenadeProjectile", "m_unOGSExtraFlags");
// m_bDetonationRecorded
[SchemaMember("CBaseCSGrenadeProjectile", "m_bDetonationRecorded")]
public ref bool DetonationRecorded => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenadeProjectile", "m_bDetonationRecorded");
// m_nItemIndex
[SchemaMember("CBaseCSGrenadeProjectile", "m_nItemIndex")]
public ref UInt16 ItemIndex => ref Schema.GetRef<UInt16>(this.Handle, "CBaseCSGrenadeProjectile", "m_nItemIndex");
// m_vecOriginalSpawnLocation
[SchemaMember("CBaseCSGrenadeProjectile", "m_vecOriginalSpawnLocation")]
public Vector OriginalSpawnLocation => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseCSGrenadeProjectile", "m_vecOriginalSpawnLocation");
// m_flLastBounceSoundTime
[SchemaMember("CBaseCSGrenadeProjectile", "m_flLastBounceSoundTime")]
public ref float LastBounceSoundTime => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenadeProjectile", "m_flLastBounceSoundTime");
// m_vecGrenadeSpin
[SchemaMember("CBaseCSGrenadeProjectile", "m_vecGrenadeSpin")]
public Vector GrenadeSpin => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseCSGrenadeProjectile", "m_vecGrenadeSpin");
// m_vecLastHitSurfaceNormal
[SchemaMember("CBaseCSGrenadeProjectile", "m_vecLastHitSurfaceNormal")]
public Vector LastHitSurfaceNormal => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseCSGrenadeProjectile", "m_vecLastHitSurfaceNormal");
// m_nTicksAtZeroVelocity
[SchemaMember("CBaseCSGrenadeProjectile", "m_nTicksAtZeroVelocity")]
public ref Int32 TicksAtZeroVelocity => ref Schema.GetRef<Int32>(this.Handle, "CBaseCSGrenadeProjectile", "m_nTicksAtZeroVelocity");
// m_bHasEverHitPlayer
[SchemaMember("CBaseCSGrenadeProjectile", "m_bHasEverHitPlayer")]
public ref bool HasEverHitPlayer => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenadeProjectile", "m_bHasEverHitPlayer");
// m_bClearFromPlayers
[SchemaMember("CBaseCSGrenadeProjectile", "m_bClearFromPlayers")]
public ref bool ClearFromPlayers => ref Schema.GetRef<bool>(this.Handle, "CBaseCSGrenadeProjectile", "m_bClearFromPlayers");
}

View File

@@ -1,89 +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 CBaseClientUIEntity : CBaseModelEntity
{
public CBaseClientUIEntity (IntPtr pointer) : base(pointer) {}
// m_bEnabled
[SchemaMember("CBaseClientUIEntity", "m_bEnabled")]
public ref bool Enabled => ref Schema.GetRef<bool>(this.Handle, "CBaseClientUIEntity", "m_bEnabled");
// m_DialogXMLName
[SchemaMember("CBaseClientUIEntity", "m_DialogXMLName")]
public string DialogXMLName
{
get { return Schema.GetUtf8String(this.Handle, "CBaseClientUIEntity", "m_DialogXMLName"); }
set { Schema.SetString(this.Handle, "CBaseClientUIEntity", "m_DialogXMLName", value); }
}
// m_PanelClassName
[SchemaMember("CBaseClientUIEntity", "m_PanelClassName")]
public string PanelClassName
{
get { return Schema.GetUtf8String(this.Handle, "CBaseClientUIEntity", "m_PanelClassName"); }
set { Schema.SetString(this.Handle, "CBaseClientUIEntity", "m_PanelClassName", value); }
}
// m_PanelID
[SchemaMember("CBaseClientUIEntity", "m_PanelID")]
public string PanelID
{
get { return Schema.GetUtf8String(this.Handle, "CBaseClientUIEntity", "m_PanelID"); }
set { Schema.SetString(this.Handle, "CBaseClientUIEntity", "m_PanelID", value); }
}
// m_CustomOutput0
[SchemaMember("CBaseClientUIEntity", "m_CustomOutput0")]
public CEntityIOOutput CustomOutput0 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseClientUIEntity", "m_CustomOutput0");
// m_CustomOutput1
[SchemaMember("CBaseClientUIEntity", "m_CustomOutput1")]
public CEntityIOOutput CustomOutput1 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseClientUIEntity", "m_CustomOutput1");
// m_CustomOutput2
[SchemaMember("CBaseClientUIEntity", "m_CustomOutput2")]
public CEntityIOOutput CustomOutput2 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseClientUIEntity", "m_CustomOutput2");
// m_CustomOutput3
[SchemaMember("CBaseClientUIEntity", "m_CustomOutput3")]
public CEntityIOOutput CustomOutput3 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseClientUIEntity", "m_CustomOutput3");
// m_CustomOutput4
[SchemaMember("CBaseClientUIEntity", "m_CustomOutput4")]
public CEntityIOOutput CustomOutput4 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseClientUIEntity", "m_CustomOutput4");
// m_CustomOutput5
[SchemaMember("CBaseClientUIEntity", "m_CustomOutput5")]
public CEntityIOOutput CustomOutput5 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseClientUIEntity", "m_CustomOutput5");
// m_CustomOutput6
[SchemaMember("CBaseClientUIEntity", "m_CustomOutput6")]
public CEntityIOOutput CustomOutput6 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseClientUIEntity", "m_CustomOutput6");
// m_CustomOutput7
[SchemaMember("CBaseClientUIEntity", "m_CustomOutput7")]
public CEntityIOOutput CustomOutput7 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseClientUIEntity", "m_CustomOutput7");
// m_CustomOutput8
[SchemaMember("CBaseClientUIEntity", "m_CustomOutput8")]
public CEntityIOOutput CustomOutput8 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseClientUIEntity", "m_CustomOutput8");
// m_CustomOutput9
[SchemaMember("CBaseClientUIEntity", "m_CustomOutput9")]
public CEntityIOOutput CustomOutput9 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseClientUIEntity", "m_CustomOutput9");
}

View File

@@ -1,61 +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 CBaseCombatCharacter : CBaseFlex
{
public CBaseCombatCharacter (IntPtr pointer) : base(pointer) {}
// m_bForceServerRagdoll
[SchemaMember("CBaseCombatCharacter", "m_bForceServerRagdoll")]
public ref bool ForceServerRagdoll => ref Schema.GetRef<bool>(this.Handle, "CBaseCombatCharacter", "m_bForceServerRagdoll");
// m_hMyWearables
[SchemaMember("CBaseCombatCharacter", "m_hMyWearables")]
public NetworkedVector<CHandle<CEconWearable>> MyWearables => Schema.GetDeclaredClass<NetworkedVector<CHandle<CEconWearable>>>(this.Handle, "CBaseCombatCharacter", "m_hMyWearables");
// m_impactEnergyScale
[SchemaMember("CBaseCombatCharacter", "m_impactEnergyScale")]
public ref float ImpactEnergyScale => ref Schema.GetRef<float>(this.Handle, "CBaseCombatCharacter", "m_impactEnergyScale");
// m_LastHitGroup
[SchemaMember("CBaseCombatCharacter", "m_LastHitGroup")]
public ref HitGroup_t LastHitGroup => ref Schema.GetRef<HitGroup_t>(this.Handle, "CBaseCombatCharacter", "m_LastHitGroup");
// m_bApplyStressDamage
[SchemaMember("CBaseCombatCharacter", "m_bApplyStressDamage")]
public ref bool ApplyStressDamage => ref Schema.GetRef<bool>(this.Handle, "CBaseCombatCharacter", "m_bApplyStressDamage");
// m_iDamageCount
[SchemaMember("CBaseCombatCharacter", "m_iDamageCount")]
public ref Int32 DamageCount => ref Schema.GetRef<Int32>(this.Handle, "CBaseCombatCharacter", "m_iDamageCount");
// m_strRelationships
[SchemaMember("CBaseCombatCharacter", "m_strRelationships")]
public string StrRelationships
{
get { return Schema.GetUtf8String(this.Handle, "CBaseCombatCharacter", "m_strRelationships"); }
set { Schema.SetString(this.Handle, "CBaseCombatCharacter", "m_strRelationships", value); }
}
// m_eHull
[SchemaMember("CBaseCombatCharacter", "m_eHull")]
public ref Hull_t Hull => ref Schema.GetRef<Hull_t>(this.Handle, "CBaseCombatCharacter", "m_eHull");
// m_nNavHullIdx
[SchemaMember("CBaseCombatCharacter", "m_nNavHullIdx")]
public ref UInt32 NavHullIdx => ref Schema.GetRef<UInt32>(this.Handle, "CBaseCombatCharacter", "m_nNavHullIdx");
}

View File

@@ -1,149 +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 CBaseDoor : CBaseToggle
{
public CBaseDoor (IntPtr pointer) : base(pointer) {}
// m_angMoveEntitySpace
[SchemaMember("CBaseDoor", "m_angMoveEntitySpace")]
public QAngle MoveEntitySpace => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBaseDoor", "m_angMoveEntitySpace");
// m_vecMoveDirParentSpace
[SchemaMember("CBaseDoor", "m_vecMoveDirParentSpace")]
public Vector MoveDirParentSpace => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseDoor", "m_vecMoveDirParentSpace");
// m_ls
[SchemaMember("CBaseDoor", "m_ls")]
public locksound_t Ls => Schema.GetDeclaredClass<locksound_t>(this.Handle, "CBaseDoor", "m_ls");
// m_bForceClosed
[SchemaMember("CBaseDoor", "m_bForceClosed")]
public ref bool ForceClosed => ref Schema.GetRef<bool>(this.Handle, "CBaseDoor", "m_bForceClosed");
// m_bDoorGroup
[SchemaMember("CBaseDoor", "m_bDoorGroup")]
public ref bool DoorGroup => ref Schema.GetRef<bool>(this.Handle, "CBaseDoor", "m_bDoorGroup");
// m_bLocked
[SchemaMember("CBaseDoor", "m_bLocked")]
public ref bool Locked => ref Schema.GetRef<bool>(this.Handle, "CBaseDoor", "m_bLocked");
// m_bIgnoreDebris
[SchemaMember("CBaseDoor", "m_bIgnoreDebris")]
public ref bool IgnoreDebris => ref Schema.GetRef<bool>(this.Handle, "CBaseDoor", "m_bIgnoreDebris");
// m_eSpawnPosition
[SchemaMember("CBaseDoor", "m_eSpawnPosition")]
public ref FuncDoorSpawnPos_t SpawnPosition => ref Schema.GetRef<FuncDoorSpawnPos_t>(this.Handle, "CBaseDoor", "m_eSpawnPosition");
// m_flBlockDamage
[SchemaMember("CBaseDoor", "m_flBlockDamage")]
public ref float BlockDamage => ref Schema.GetRef<float>(this.Handle, "CBaseDoor", "m_flBlockDamage");
// m_NoiseMoving
[SchemaMember("CBaseDoor", "m_NoiseMoving")]
public string NoiseMoving
{
get { return Schema.GetUtf8String(this.Handle, "CBaseDoor", "m_NoiseMoving"); }
set { Schema.SetString(this.Handle, "CBaseDoor", "m_NoiseMoving", value); }
}
// m_NoiseArrived
[SchemaMember("CBaseDoor", "m_NoiseArrived")]
public string NoiseArrived
{
get { return Schema.GetUtf8String(this.Handle, "CBaseDoor", "m_NoiseArrived"); }
set { Schema.SetString(this.Handle, "CBaseDoor", "m_NoiseArrived", value); }
}
// m_NoiseMovingClosed
[SchemaMember("CBaseDoor", "m_NoiseMovingClosed")]
public string NoiseMovingClosed
{
get { return Schema.GetUtf8String(this.Handle, "CBaseDoor", "m_NoiseMovingClosed"); }
set { Schema.SetString(this.Handle, "CBaseDoor", "m_NoiseMovingClosed", value); }
}
// m_NoiseArrivedClosed
[SchemaMember("CBaseDoor", "m_NoiseArrivedClosed")]
public string NoiseArrivedClosed
{
get { return Schema.GetUtf8String(this.Handle, "CBaseDoor", "m_NoiseArrivedClosed"); }
set { Schema.SetString(this.Handle, "CBaseDoor", "m_NoiseArrivedClosed", value); }
}
// m_ChainTarget
[SchemaMember("CBaseDoor", "m_ChainTarget")]
public string ChainTarget
{
get { return Schema.GetUtf8String(this.Handle, "CBaseDoor", "m_ChainTarget"); }
set { Schema.SetString(this.Handle, "CBaseDoor", "m_ChainTarget", value); }
}
// m_OnBlockedClosing
[SchemaMember("CBaseDoor", "m_OnBlockedClosing")]
public CEntityIOOutput OnBlockedClosing => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseDoor", "m_OnBlockedClosing");
// m_OnBlockedOpening
[SchemaMember("CBaseDoor", "m_OnBlockedOpening")]
public CEntityIOOutput OnBlockedOpening => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseDoor", "m_OnBlockedOpening");
// m_OnUnblockedClosing
[SchemaMember("CBaseDoor", "m_OnUnblockedClosing")]
public CEntityIOOutput OnUnblockedClosing => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseDoor", "m_OnUnblockedClosing");
// m_OnUnblockedOpening
[SchemaMember("CBaseDoor", "m_OnUnblockedOpening")]
public CEntityIOOutput OnUnblockedOpening => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseDoor", "m_OnUnblockedOpening");
// m_OnFullyClosed
[SchemaMember("CBaseDoor", "m_OnFullyClosed")]
public CEntityIOOutput OnFullyClosed => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseDoor", "m_OnFullyClosed");
// m_OnFullyOpen
[SchemaMember("CBaseDoor", "m_OnFullyOpen")]
public CEntityIOOutput OnFullyOpen => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseDoor", "m_OnFullyOpen");
// m_OnClose
[SchemaMember("CBaseDoor", "m_OnClose")]
public CEntityIOOutput OnClose => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseDoor", "m_OnClose");
// m_OnOpen
[SchemaMember("CBaseDoor", "m_OnOpen")]
public CEntityIOOutput OnOpen => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseDoor", "m_OnOpen");
// m_OnLockedUse
[SchemaMember("CBaseDoor", "m_OnLockedUse")]
public CEntityIOOutput OnLockedUse => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseDoor", "m_OnLockedUse");
// m_bLoopMoveSound
[SchemaMember("CBaseDoor", "m_bLoopMoveSound")]
public ref bool LoopMoveSound => ref Schema.GetRef<bool>(this.Handle, "CBaseDoor", "m_bLoopMoveSound");
// m_bCreateNavObstacle
[SchemaMember("CBaseDoor", "m_bCreateNavObstacle")]
public ref bool CreateNavObstacle => ref Schema.GetRef<bool>(this.Handle, "CBaseDoor", "m_bCreateNavObstacle");
// m_isChaining
[SchemaMember("CBaseDoor", "m_isChaining")]
public ref bool IsChaining => ref Schema.GetRef<bool>(this.Handle, "CBaseDoor", "m_isChaining");
// m_bIsUsable
[SchemaMember("CBaseDoor", "m_bIsUsable")]
public ref bool IsUsable => ref Schema.GetRef<bool>(this.Handle, "CBaseDoor", "m_bIsUsable");
}

View File

@@ -1,349 +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 CBaseEntity : CEntityInstance
{
public CBaseEntity (IntPtr pointer) : base(pointer) {}
// m_CBodyComponent
[SchemaMember("CBaseEntity", "m_CBodyComponent")]
public CBodyComponent? CBodyComponent => Schema.GetPointer<CBodyComponent>(this.Handle, "CBaseEntity", "m_CBodyComponent");
// m_NetworkTransmitComponent
[SchemaMember("CBaseEntity", "m_NetworkTransmitComponent")]
public CNetworkTransmitComponent NetworkTransmitComponent => Schema.GetDeclaredClass<CNetworkTransmitComponent>(this.Handle, "CBaseEntity", "m_NetworkTransmitComponent");
// m_aThinkFunctions
[SchemaMember("CBaseEntity", "m_aThinkFunctions")]
public NetworkedVector<thinkfunc_t> ThinkFunctions => Schema.GetDeclaredClass<NetworkedVector<thinkfunc_t>>(this.Handle, "CBaseEntity", "m_aThinkFunctions");
// m_iCurrentThinkContext
[SchemaMember("CBaseEntity", "m_iCurrentThinkContext")]
public ref Int32 CurrentThinkContext => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_iCurrentThinkContext");
// m_nLastThinkTick
[SchemaMember("CBaseEntity", "m_nLastThinkTick")]
public ref Int32 LastThinkTick => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_nLastThinkTick");
// m_bDisabledContextThinks
[SchemaMember("CBaseEntity", "m_bDisabledContextThinks")]
public ref bool DisabledContextThinks => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bDisabledContextThinks");
// m_isSteadyState
[SchemaMember("CBaseEntity", "m_isSteadyState")]
public Span<byte> IsSteadyState => Schema.GetFixedArray<byte>(this.Handle, "CBaseEntity", "m_isSteadyState", 8);
// m_lastNetworkChange
[SchemaMember("CBaseEntity", "m_lastNetworkChange")]
public ref float LastNetworkChange => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_lastNetworkChange");
// m_ResponseContexts
[SchemaMember("CBaseEntity", "m_ResponseContexts")]
public NetworkedVector<ResponseContext_t> ResponseContexts => Schema.GetDeclaredClass<NetworkedVector<ResponseContext_t>>(this.Handle, "CBaseEntity", "m_ResponseContexts");
// m_iszResponseContext
[SchemaMember("CBaseEntity", "m_iszResponseContext")]
public string ResponseContext
{
get { return Schema.GetUtf8String(this.Handle, "CBaseEntity", "m_iszResponseContext"); }
set { Schema.SetString(this.Handle, "CBaseEntity", "m_iszResponseContext", value); }
}
// m_iHealth
[SchemaMember("CBaseEntity", "m_iHealth")]
public ref Int32 Health => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_iHealth");
// m_iMaxHealth
[SchemaMember("CBaseEntity", "m_iMaxHealth")]
public ref Int32 MaxHealth => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_iMaxHealth");
// m_lifeState
[SchemaMember("CBaseEntity", "m_lifeState")]
public ref byte LifeState => ref Schema.GetRef<byte>(this.Handle, "CBaseEntity", "m_lifeState");
// m_flDamageAccumulator
[SchemaMember("CBaseEntity", "m_flDamageAccumulator")]
public ref float DamageAccumulator => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flDamageAccumulator");
// m_bTakesDamage
[SchemaMember("CBaseEntity", "m_bTakesDamage")]
public ref bool TakesDamage => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bTakesDamage");
// m_nTakeDamageFlags
[SchemaMember("CBaseEntity", "m_nTakeDamageFlags")]
public ref TakeDamageFlags_t TakeDamageFlags => ref Schema.GetRef<TakeDamageFlags_t>(this.Handle, "CBaseEntity", "m_nTakeDamageFlags");
// m_nPlatformType
[SchemaMember("CBaseEntity", "m_nPlatformType")]
public ref EntityPlatformTypes_t PlatformType => ref Schema.GetRef<EntityPlatformTypes_t>(this.Handle, "CBaseEntity", "m_nPlatformType");
// m_MoveCollide
[SchemaMember("CBaseEntity", "m_MoveCollide")]
public ref MoveCollide_t MoveCollide => ref Schema.GetRef<MoveCollide_t>(this.Handle, "CBaseEntity", "m_MoveCollide");
// m_MoveType
[SchemaMember("CBaseEntity", "m_MoveType")]
public ref MoveType_t MoveType => ref Schema.GetRef<MoveType_t>(this.Handle, "CBaseEntity", "m_MoveType");
// m_nActualMoveType
[SchemaMember("CBaseEntity", "m_nActualMoveType")]
public ref MoveType_t ActualMoveType => ref Schema.GetRef<MoveType_t>(this.Handle, "CBaseEntity", "m_nActualMoveType");
// m_nWaterTouch
[SchemaMember("CBaseEntity", "m_nWaterTouch")]
public ref byte WaterTouch => ref Schema.GetRef<byte>(this.Handle, "CBaseEntity", "m_nWaterTouch");
// m_nSlimeTouch
[SchemaMember("CBaseEntity", "m_nSlimeTouch")]
public ref byte SlimeTouch => ref Schema.GetRef<byte>(this.Handle, "CBaseEntity", "m_nSlimeTouch");
// m_bRestoreInHierarchy
[SchemaMember("CBaseEntity", "m_bRestoreInHierarchy")]
public ref bool RestoreInHierarchy => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bRestoreInHierarchy");
// m_target
[SchemaMember("CBaseEntity", "m_target")]
public string Target
{
get { return Schema.GetUtf8String(this.Handle, "CBaseEntity", "m_target"); }
set { Schema.SetString(this.Handle, "CBaseEntity", "m_target", value); }
}
// m_hDamageFilter
[SchemaMember("CBaseEntity", "m_hDamageFilter")]
public CHandle<CBaseFilter> DamageFilter => Schema.GetDeclaredClass<CHandle<CBaseFilter>>(this.Handle, "CBaseEntity", "m_hDamageFilter");
// m_iszDamageFilterName
[SchemaMember("CBaseEntity", "m_iszDamageFilterName")]
public string DamageFilterName
{
get { return Schema.GetUtf8String(this.Handle, "CBaseEntity", "m_iszDamageFilterName"); }
set { Schema.SetString(this.Handle, "CBaseEntity", "m_iszDamageFilterName", value); }
}
// m_flMoveDoneTime
[SchemaMember("CBaseEntity", "m_flMoveDoneTime")]
public ref float MoveDoneTime => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flMoveDoneTime");
// m_nSubclassID
[SchemaMember("CBaseEntity", "m_nSubclassID")]
public CUtlStringToken SubclassID => Schema.GetDeclaredClass<CUtlStringToken>(this.Handle, "CBaseEntity", "m_nSubclassID");
// m_flAnimTime
[SchemaMember("CBaseEntity", "m_flAnimTime")]
public ref float AnimTime => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flAnimTime");
// m_flSimulationTime
[SchemaMember("CBaseEntity", "m_flSimulationTime")]
public ref float SimulationTime => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flSimulationTime");
// m_flCreateTime
[SchemaMember("CBaseEntity", "m_flCreateTime")]
public ref float CreateTime => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flCreateTime");
// m_bClientSideRagdoll
[SchemaMember("CBaseEntity", "m_bClientSideRagdoll")]
public ref bool ClientSideRagdoll => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bClientSideRagdoll");
// m_ubInterpolationFrame
[SchemaMember("CBaseEntity", "m_ubInterpolationFrame")]
public ref byte InterpolationFrame => ref Schema.GetRef<byte>(this.Handle, "CBaseEntity", "m_ubInterpolationFrame");
// m_vPrevVPhysicsUpdatePos
[SchemaMember("CBaseEntity", "m_vPrevVPhysicsUpdatePos")]
public Vector PrevVPhysicsUpdatePos => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseEntity", "m_vPrevVPhysicsUpdatePos");
// m_iTeamNum
[SchemaMember("CBaseEntity", "m_iTeamNum")]
public ref byte TeamNum => ref Schema.GetRef<byte>(this.Handle, "CBaseEntity", "m_iTeamNum");
// m_iGlobalname
[SchemaMember("CBaseEntity", "m_iGlobalname")]
public string Globalname
{
get { return Schema.GetUtf8String(this.Handle, "CBaseEntity", "m_iGlobalname"); }
set { Schema.SetString(this.Handle, "CBaseEntity", "m_iGlobalname", value); }
}
// m_iSentToClients
[SchemaMember("CBaseEntity", "m_iSentToClients")]
public ref Int32 SentToClients => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_iSentToClients");
// m_flSpeed
[SchemaMember("CBaseEntity", "m_flSpeed")]
public ref float Speed => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flSpeed");
// m_sUniqueHammerID
[SchemaMember("CBaseEntity", "m_sUniqueHammerID")]
public string UniqueHammerID
{
get { return Schema.GetUtf8String(this.Handle, "CBaseEntity", "m_sUniqueHammerID"); }
set { Schema.SetString(this.Handle, "CBaseEntity", "m_sUniqueHammerID", value); }
}
// m_spawnflags
[SchemaMember("CBaseEntity", "m_spawnflags")]
public ref UInt32 Spawnflags => ref Schema.GetRef<UInt32>(this.Handle, "CBaseEntity", "m_spawnflags");
// m_nNextThinkTick
[SchemaMember("CBaseEntity", "m_nNextThinkTick")]
public ref Int32 NextThinkTick => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_nNextThinkTick");
// m_nSimulationTick
[SchemaMember("CBaseEntity", "m_nSimulationTick")]
public ref Int32 SimulationTick => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_nSimulationTick");
// m_OnKilled
[SchemaMember("CBaseEntity", "m_OnKilled")]
public CEntityIOOutput OnKilled => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseEntity", "m_OnKilled");
// m_fFlags
[SchemaMember("CBaseEntity", "m_fFlags")]
public ref UInt32 Flags => ref Schema.GetRef<UInt32>(this.Handle, "CBaseEntity", "m_fFlags");
// m_vecAbsVelocity
[SchemaMember("CBaseEntity", "m_vecAbsVelocity")]
public Vector AbsVelocity => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseEntity", "m_vecAbsVelocity");
// m_vecVelocity
[SchemaMember("CBaseEntity", "m_vecVelocity")]
public CNetworkVelocityVector Velocity => Schema.GetDeclaredClass<CNetworkVelocityVector>(this.Handle, "CBaseEntity", "m_vecVelocity");
// m_vecBaseVelocity
[SchemaMember("CBaseEntity", "m_vecBaseVelocity")]
public Vector BaseVelocity => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseEntity", "m_vecBaseVelocity");
// m_nPushEnumCount
[SchemaMember("CBaseEntity", "m_nPushEnumCount")]
public ref Int32 PushEnumCount => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_nPushEnumCount");
// m_pCollision
[SchemaMember("CBaseEntity", "m_pCollision")]
public CCollisionProperty? Collision => Schema.GetPointer<CCollisionProperty>(this.Handle, "CBaseEntity", "m_pCollision");
// m_hEffectEntity
[SchemaMember("CBaseEntity", "m_hEffectEntity")]
public CHandle<CBaseEntity> EffectEntity => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBaseEntity", "m_hEffectEntity");
// m_hOwnerEntity
[SchemaMember("CBaseEntity", "m_hOwnerEntity")]
public CHandle<CBaseEntity> OwnerEntity => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBaseEntity", "m_hOwnerEntity");
// m_fEffects
[SchemaMember("CBaseEntity", "m_fEffects")]
public ref UInt32 Effects => ref Schema.GetRef<UInt32>(this.Handle, "CBaseEntity", "m_fEffects");
// m_hGroundEntity
[SchemaMember("CBaseEntity", "m_hGroundEntity")]
public CHandle<CBaseEntity> GroundEntity => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBaseEntity", "m_hGroundEntity");
// m_nGroundBodyIndex
[SchemaMember("CBaseEntity", "m_nGroundBodyIndex")]
public ref Int32 GroundBodyIndex => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_nGroundBodyIndex");
// m_flFriction
[SchemaMember("CBaseEntity", "m_flFriction")]
public ref float Friction => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flFriction");
// m_flElasticity
[SchemaMember("CBaseEntity", "m_flElasticity")]
public ref float Elasticity => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flElasticity");
// m_flGravityScale
[SchemaMember("CBaseEntity", "m_flGravityScale")]
public ref float GravityScale => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flGravityScale");
// m_flTimeScale
[SchemaMember("CBaseEntity", "m_flTimeScale")]
public ref float TimeScale => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flTimeScale");
// m_flWaterLevel
[SchemaMember("CBaseEntity", "m_flWaterLevel")]
public ref float WaterLevel => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flWaterLevel");
// m_bAnimatedEveryTick
[SchemaMember("CBaseEntity", "m_bAnimatedEveryTick")]
public ref bool AnimatedEveryTick => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bAnimatedEveryTick");
// m_bDisableLowViolence
[SchemaMember("CBaseEntity", "m_bDisableLowViolence")]
public ref bool DisableLowViolence => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bDisableLowViolence");
// m_nWaterType
[SchemaMember("CBaseEntity", "m_nWaterType")]
public ref byte WaterType => ref Schema.GetRef<byte>(this.Handle, "CBaseEntity", "m_nWaterType");
// m_iEFlags
[SchemaMember("CBaseEntity", "m_iEFlags")]
public ref Int32 EFlags => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_iEFlags");
// m_OnUser1
[SchemaMember("CBaseEntity", "m_OnUser1")]
public CEntityIOOutput OnUser1 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseEntity", "m_OnUser1");
// m_OnUser2
[SchemaMember("CBaseEntity", "m_OnUser2")]
public CEntityIOOutput OnUser2 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseEntity", "m_OnUser2");
// m_OnUser3
[SchemaMember("CBaseEntity", "m_OnUser3")]
public CEntityIOOutput OnUser3 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseEntity", "m_OnUser3");
// m_OnUser4
[SchemaMember("CBaseEntity", "m_OnUser4")]
public CEntityIOOutput OnUser4 => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseEntity", "m_OnUser4");
// m_iInitialTeamNum
[SchemaMember("CBaseEntity", "m_iInitialTeamNum")]
public ref Int32 InitialTeamNum => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_iInitialTeamNum");
// m_flNavIgnoreUntilTime
[SchemaMember("CBaseEntity", "m_flNavIgnoreUntilTime")]
public ref float NavIgnoreUntilTime => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flNavIgnoreUntilTime");
// m_vecAngVelocity
[SchemaMember("CBaseEntity", "m_vecAngVelocity")]
public QAngle AngVelocity => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBaseEntity", "m_vecAngVelocity");
// m_bNetworkQuantizeOriginAndAngles
[SchemaMember("CBaseEntity", "m_bNetworkQuantizeOriginAndAngles")]
public ref bool NetworkQuantizeOriginAndAngles => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bNetworkQuantizeOriginAndAngles");
// m_bLagCompensate
[SchemaMember("CBaseEntity", "m_bLagCompensate")]
public ref bool LagCompensate => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bLagCompensate");
// m_flOverriddenFriction
[SchemaMember("CBaseEntity", "m_flOverriddenFriction")]
public ref float OverriddenFriction => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flOverriddenFriction");
// m_pBlocker
[SchemaMember("CBaseEntity", "m_pBlocker")]
public CHandle<CBaseEntity> Blocker => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBaseEntity", "m_pBlocker");
// m_flLocalTime
[SchemaMember("CBaseEntity", "m_flLocalTime")]
public ref float LocalTime => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flLocalTime");
// m_flVPhysicsUpdateLocalTime
[SchemaMember("CBaseEntity", "m_flVPhysicsUpdateLocalTime")]
public ref float VPhysicsUpdateLocalTime => ref Schema.GetRef<float>(this.Handle, "CBaseEntity", "m_flVPhysicsUpdateLocalTime");
// m_nBloodType
[SchemaMember("CBaseEntity", "m_nBloodType")]
public ref BloodType BloodType => ref Schema.GetRef<BloodType>(this.Handle, "CBaseEntity", "m_nBloodType");
}

View File

@@ -1,37 +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 CBaseFire : CBaseEntity
{
public CBaseFire (IntPtr pointer) : base(pointer) {}
// m_flScale
[SchemaMember("CBaseFire", "m_flScale")]
public ref float Scale => ref Schema.GetRef<float>(this.Handle, "CBaseFire", "m_flScale");
// m_flStartScale
[SchemaMember("CBaseFire", "m_flStartScale")]
public ref float StartScale => ref Schema.GetRef<float>(this.Handle, "CBaseFire", "m_flStartScale");
// m_flScaleTime
[SchemaMember("CBaseFire", "m_flScaleTime")]
public ref float ScaleTime => ref Schema.GetRef<float>(this.Handle, "CBaseFire", "m_flScaleTime");
// m_nFlags
[SchemaMember("CBaseFire", "m_nFlags")]
public ref UInt32 FireFlags => ref Schema.GetRef<UInt32>(this.Handle, "CBaseFire", "m_nFlags");
}

View File

@@ -1,49 +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 CBaseFlex : CBaseAnimGraph
{
public CBaseFlex (IntPtr pointer) : base(pointer) {}
// m_flexWeight
[SchemaMember("CBaseFlex", "m_flexWeight")]
public NetworkedVector<float> FlexWeight => Schema.GetDeclaredClass<NetworkedVector<float>>(this.Handle, "CBaseFlex", "m_flexWeight");
// m_vLookTargetPosition
[SchemaMember("CBaseFlex", "m_vLookTargetPosition")]
public Vector LookTargetPosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseFlex", "m_vLookTargetPosition");
// m_blinktoggle
[SchemaMember("CBaseFlex", "m_blinktoggle")]
public ref bool Blinktoggle => ref Schema.GetRef<bool>(this.Handle, "CBaseFlex", "m_blinktoggle");
// m_flAllowResponsesEndTime
[SchemaMember("CBaseFlex", "m_flAllowResponsesEndTime")]
public ref float AllowResponsesEndTime => ref Schema.GetRef<float>(this.Handle, "CBaseFlex", "m_flAllowResponsesEndTime");
// m_flLastFlexAnimationTime
[SchemaMember("CBaseFlex", "m_flLastFlexAnimationTime")]
public ref float LastFlexAnimationTime => ref Schema.GetRef<float>(this.Handle, "CBaseFlex", "m_flLastFlexAnimationTime");
// m_nNextSceneEventId
[SchemaMember("CBaseFlex", "m_nNextSceneEventId")]
public SceneEventId_t NextSceneEventId => Schema.GetDeclaredClass<SceneEventId_t>(this.Handle, "CBaseFlex", "m_nNextSceneEventId");
// m_bUpdateLayerPriorities
[SchemaMember("CBaseFlex", "m_bUpdateLayerPriorities")]
public ref bool UpdateLayerPriorities => ref Schema.GetRef<bool>(this.Handle, "CBaseFlex", "m_bUpdateLayerPriorities");
}

View File

@@ -1,85 +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 CBaseGrenade : CBaseFlex
{
public CBaseGrenade (IntPtr pointer) : base(pointer) {}
// m_OnPlayerPickup
[SchemaMember("CBaseGrenade", "m_OnPlayerPickup")]
public CEntityIOOutput OnPlayerPickup => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseGrenade", "m_OnPlayerPickup");
// m_OnExplode
[SchemaMember("CBaseGrenade", "m_OnExplode")]
public CEntityIOOutput OnExplode => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseGrenade", "m_OnExplode");
// m_bHasWarnedAI
[SchemaMember("CBaseGrenade", "m_bHasWarnedAI")]
public ref bool HasWarnedAI => ref Schema.GetRef<bool>(this.Handle, "CBaseGrenade", "m_bHasWarnedAI");
// m_bIsSmokeGrenade
[SchemaMember("CBaseGrenade", "m_bIsSmokeGrenade")]
public ref bool IsSmokeGrenade => ref Schema.GetRef<bool>(this.Handle, "CBaseGrenade", "m_bIsSmokeGrenade");
// m_bIsLive
[SchemaMember("CBaseGrenade", "m_bIsLive")]
public ref bool IsLive => ref Schema.GetRef<bool>(this.Handle, "CBaseGrenade", "m_bIsLive");
// m_DmgRadius
[SchemaMember("CBaseGrenade", "m_DmgRadius")]
public ref float DmgRadius => ref Schema.GetRef<float>(this.Handle, "CBaseGrenade", "m_DmgRadius");
// m_flDetonateTime
[SchemaMember("CBaseGrenade", "m_flDetonateTime")]
public ref float DetonateTime => ref Schema.GetRef<float>(this.Handle, "CBaseGrenade", "m_flDetonateTime");
// m_flWarnAITime
[SchemaMember("CBaseGrenade", "m_flWarnAITime")]
public ref float WarnAITime => ref Schema.GetRef<float>(this.Handle, "CBaseGrenade", "m_flWarnAITime");
// m_flDamage
[SchemaMember("CBaseGrenade", "m_flDamage")]
public ref float Damage => ref Schema.GetRef<float>(this.Handle, "CBaseGrenade", "m_flDamage");
// m_iszBounceSound
[SchemaMember("CBaseGrenade", "m_iszBounceSound")]
public string BounceSound
{
get { return Schema.GetUtf8String(this.Handle, "CBaseGrenade", "m_iszBounceSound"); }
set { Schema.SetString(this.Handle, "CBaseGrenade", "m_iszBounceSound", value); }
}
// m_ExplosionSound
[SchemaMember("CBaseGrenade", "m_ExplosionSound")]
public string ExplosionSound
{
get { return Schema.GetUtf8String(this.Handle, "CBaseGrenade", "m_ExplosionSound"); }
set { Schema.SetString(this.Handle, "CBaseGrenade", "m_ExplosionSound", value); }
}
// m_hThrower
[SchemaMember("CBaseGrenade", "m_hThrower")]
public CHandle<CCSPlayerPawn> Thrower => Schema.GetDeclaredClass<CHandle<CCSPlayerPawn>>(this.Handle, "CBaseGrenade", "m_hThrower");
// m_flNextAttack
[SchemaMember("CBaseGrenade", "m_flNextAttack")]
public ref float NextAttack => ref Schema.GetRef<float>(this.Handle, "CBaseGrenade", "m_flNextAttack");
// m_hOriginalThrower
[SchemaMember("CBaseGrenade", "m_hOriginalThrower")]
public CHandle<CCSPlayerPawn> OriginalThrower => Schema.GetDeclaredClass<CHandle<CCSPlayerPawn>>(this.Handle, "CBaseGrenade", "m_hOriginalThrower");
}

View File

@@ -1,129 +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 CBaseModelEntity : CBaseEntity
{
public CBaseModelEntity (IntPtr pointer) : base(pointer) {}
// m_CRenderComponent
[SchemaMember("CBaseModelEntity", "m_CRenderComponent")]
public CRenderComponent? CRenderComponent => Schema.GetPointer<CRenderComponent>(this.Handle, "CBaseModelEntity", "m_CRenderComponent");
// m_CHitboxComponent
[SchemaMember("CBaseModelEntity", "m_CHitboxComponent")]
public CHitboxComponent CHitboxComponent => Schema.GetDeclaredClass<CHitboxComponent>(this.Handle, "CBaseModelEntity", "m_CHitboxComponent");
// m_flDissolveStartTime
[SchemaMember("CBaseModelEntity", "m_flDissolveStartTime")]
public ref float DissolveStartTime => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_flDissolveStartTime");
// m_OnIgnite
[SchemaMember("CBaseModelEntity", "m_OnIgnite")]
public CEntityIOOutput OnIgnite => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseModelEntity", "m_OnIgnite");
// m_nRenderMode
[SchemaMember("CBaseModelEntity", "m_nRenderMode")]
public ref RenderMode_t RenderMode => ref Schema.GetRef<RenderMode_t>(this.Handle, "CBaseModelEntity", "m_nRenderMode");
// m_nRenderFX
[SchemaMember("CBaseModelEntity", "m_nRenderFX")]
public ref RenderFx_t RenderFX => ref Schema.GetRef<RenderFx_t>(this.Handle, "CBaseModelEntity", "m_nRenderFX");
// m_bAllowFadeInView
[SchemaMember("CBaseModelEntity", "m_bAllowFadeInView")]
public ref bool AllowFadeInView => ref Schema.GetRef<bool>(this.Handle, "CBaseModelEntity", "m_bAllowFadeInView");
// m_clrRender
[SchemaMember("CBaseModelEntity", "m_clrRender")]
public Color Render
{
get { return Schema.GetCustomMarshalledType<Color>(this.Handle, "CBaseModelEntity", "m_clrRender"); }
set { Schema.SetCustomMarshalledType<Color>(this.Handle, "CBaseModelEntity", "m_clrRender", value); }
}
// m_vecRenderAttributes
[SchemaMember("CBaseModelEntity", "m_vecRenderAttributes")]
public NetworkedVector<EntityRenderAttribute_t> RenderAttributes => Schema.GetDeclaredClass<NetworkedVector<EntityRenderAttribute_t>>(this.Handle, "CBaseModelEntity", "m_vecRenderAttributes");
// m_bRenderToCubemaps
[SchemaMember("CBaseModelEntity", "m_bRenderToCubemaps")]
public ref bool RenderToCubemaps => ref Schema.GetRef<bool>(this.Handle, "CBaseModelEntity", "m_bRenderToCubemaps");
// m_bNoInterpolate
[SchemaMember("CBaseModelEntity", "m_bNoInterpolate")]
public ref bool NoInterpolate => ref Schema.GetRef<bool>(this.Handle, "CBaseModelEntity", "m_bNoInterpolate");
// m_Collision
[SchemaMember("CBaseModelEntity", "m_Collision")]
public CCollisionProperty Collision => Schema.GetDeclaredClass<CCollisionProperty>(this.Handle, "CBaseModelEntity", "m_Collision");
// m_Glow
[SchemaMember("CBaseModelEntity", "m_Glow")]
public CGlowProperty Glow => Schema.GetDeclaredClass<CGlowProperty>(this.Handle, "CBaseModelEntity", "m_Glow");
// m_flGlowBackfaceMult
[SchemaMember("CBaseModelEntity", "m_flGlowBackfaceMult")]
public ref float GlowBackfaceMult => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_flGlowBackfaceMult");
// m_fadeMinDist
[SchemaMember("CBaseModelEntity", "m_fadeMinDist")]
public ref float FadeMinDist => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_fadeMinDist");
// m_fadeMaxDist
[SchemaMember("CBaseModelEntity", "m_fadeMaxDist")]
public ref float FadeMaxDist => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_fadeMaxDist");
// m_flFadeScale
[SchemaMember("CBaseModelEntity", "m_flFadeScale")]
public ref float FadeScale => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_flFadeScale");
// m_flShadowStrength
[SchemaMember("CBaseModelEntity", "m_flShadowStrength")]
public ref float ShadowStrength => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_flShadowStrength");
// m_nObjectCulling
[SchemaMember("CBaseModelEntity", "m_nObjectCulling")]
public ref byte ObjectCulling => ref Schema.GetRef<byte>(this.Handle, "CBaseModelEntity", "m_nObjectCulling");
// m_nAddDecal
[SchemaMember("CBaseModelEntity", "m_nAddDecal")]
public ref Int32 AddDecal => ref Schema.GetRef<Int32>(this.Handle, "CBaseModelEntity", "m_nAddDecal");
// m_vDecalPosition
[SchemaMember("CBaseModelEntity", "m_vDecalPosition")]
public Vector DecalPosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseModelEntity", "m_vDecalPosition");
// m_vDecalForwardAxis
[SchemaMember("CBaseModelEntity", "m_vDecalForwardAxis")]
public Vector DecalForwardAxis => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseModelEntity", "m_vDecalForwardAxis");
// m_flDecalHealBloodRate
[SchemaMember("CBaseModelEntity", "m_flDecalHealBloodRate")]
public ref float DecalHealBloodRate => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_flDecalHealBloodRate");
// m_flDecalHealHeightRate
[SchemaMember("CBaseModelEntity", "m_flDecalHealHeightRate")]
public ref float DecalHealHeightRate => ref Schema.GetRef<float>(this.Handle, "CBaseModelEntity", "m_flDecalHealHeightRate");
// m_ConfigEntitiesToPropagateMaterialDecalsTo
[SchemaMember("CBaseModelEntity", "m_ConfigEntitiesToPropagateMaterialDecalsTo")]
public NetworkedVector<CHandle<CBaseModelEntity>> ConfigEntitiesToPropagateMaterialDecalsTo => Schema.GetDeclaredClass<NetworkedVector<CHandle<CBaseModelEntity>>>(this.Handle, "CBaseModelEntity", "m_ConfigEntitiesToPropagateMaterialDecalsTo");
// m_vecViewOffset
[SchemaMember("CBaseModelEntity", "m_vecViewOffset")]
public CNetworkViewOffsetVector ViewOffset => Schema.GetDeclaredClass<CNetworkViewOffsetVector>(this.Handle, "CBaseModelEntity", "m_vecViewOffset");
}

View File

@@ -1,65 +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 CBaseMoveBehavior : CPathKeyFrame
{
public CBaseMoveBehavior (IntPtr pointer) : base(pointer) {}
// m_iPositionInterpolator
[SchemaMember("CBaseMoveBehavior", "m_iPositionInterpolator")]
public ref Int32 PositionInterpolator => ref Schema.GetRef<Int32>(this.Handle, "CBaseMoveBehavior", "m_iPositionInterpolator");
// m_iRotationInterpolator
[SchemaMember("CBaseMoveBehavior", "m_iRotationInterpolator")]
public ref Int32 RotationInterpolator => ref Schema.GetRef<Int32>(this.Handle, "CBaseMoveBehavior", "m_iRotationInterpolator");
// m_flAnimStartTime
[SchemaMember("CBaseMoveBehavior", "m_flAnimStartTime")]
public ref float AnimStartTime => ref Schema.GetRef<float>(this.Handle, "CBaseMoveBehavior", "m_flAnimStartTime");
// m_flAnimEndTime
[SchemaMember("CBaseMoveBehavior", "m_flAnimEndTime")]
public ref float AnimEndTime => ref Schema.GetRef<float>(this.Handle, "CBaseMoveBehavior", "m_flAnimEndTime");
// m_flAverageSpeedAcrossFrame
[SchemaMember("CBaseMoveBehavior", "m_flAverageSpeedAcrossFrame")]
public ref float AverageSpeedAcrossFrame => ref Schema.GetRef<float>(this.Handle, "CBaseMoveBehavior", "m_flAverageSpeedAcrossFrame");
// m_pCurrentKeyFrame
[SchemaMember("CBaseMoveBehavior", "m_pCurrentKeyFrame")]
public CPathKeyFrame? CurrentKeyFrame => Schema.GetPointer<CPathKeyFrame>(this.Handle, "CBaseMoveBehavior", "m_pCurrentKeyFrame");
// m_pTargetKeyFrame
[SchemaMember("CBaseMoveBehavior", "m_pTargetKeyFrame")]
public CPathKeyFrame? TargetKeyFrame => Schema.GetPointer<CPathKeyFrame>(this.Handle, "CBaseMoveBehavior", "m_pTargetKeyFrame");
// m_pPreKeyFrame
[SchemaMember("CBaseMoveBehavior", "m_pPreKeyFrame")]
public CPathKeyFrame? PreKeyFrame => Schema.GetPointer<CPathKeyFrame>(this.Handle, "CBaseMoveBehavior", "m_pPreKeyFrame");
// m_pPostKeyFrame
[SchemaMember("CBaseMoveBehavior", "m_pPostKeyFrame")]
public CPathKeyFrame? PostKeyFrame => Schema.GetPointer<CPathKeyFrame>(this.Handle, "CBaseMoveBehavior", "m_pPostKeyFrame");
// m_flTimeIntoFrame
[SchemaMember("CBaseMoveBehavior", "m_flTimeIntoFrame")]
public ref float TimeIntoFrame => ref Schema.GetRef<float>(this.Handle, "CBaseMoveBehavior", "m_flTimeIntoFrame");
// m_iDirection
[SchemaMember("CBaseMoveBehavior", "m_iDirection")]
public ref Int32 Direction => ref Schema.GetRef<Int32>(this.Handle, "CBaseMoveBehavior", "m_iDirection");
}

View File

@@ -1,125 +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 CBasePlayerController : CBaseEntity
{
public CBasePlayerController (IntPtr pointer) : base(pointer) {}
// m_nInButtonsWhichAreToggles
[SchemaMember("CBasePlayerController", "m_nInButtonsWhichAreToggles")]
public ref UInt64 InButtonsWhichAreToggles => ref Schema.GetRef<UInt64>(this.Handle, "CBasePlayerController", "m_nInButtonsWhichAreToggles");
// m_nTickBase
[SchemaMember("CBasePlayerController", "m_nTickBase")]
public ref UInt32 TickBase => ref Schema.GetRef<UInt32>(this.Handle, "CBasePlayerController", "m_nTickBase");
// m_hPawn
[SchemaMember("CBasePlayerController", "m_hPawn")]
public CHandle<CBasePlayerPawn> Pawn => Schema.GetDeclaredClass<CHandle<CBasePlayerPawn>>(this.Handle, "CBasePlayerController", "m_hPawn");
// m_bKnownTeamMismatch
[SchemaMember("CBasePlayerController", "m_bKnownTeamMismatch")]
public ref bool KnownTeamMismatch => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bKnownTeamMismatch");
// m_nSplitScreenSlot
[SchemaMember("CBasePlayerController", "m_nSplitScreenSlot")]
public ref Int32 SplitScreenSlot => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerController", "m_nSplitScreenSlot");
// m_hSplitOwner
[SchemaMember("CBasePlayerController", "m_hSplitOwner")]
public CHandle<CBasePlayerController> SplitOwner => Schema.GetDeclaredClass<CHandle<CBasePlayerController>>(this.Handle, "CBasePlayerController", "m_hSplitOwner");
// m_hSplitScreenPlayers
[SchemaMember("CBasePlayerController", "m_hSplitScreenPlayers")]
public NetworkedVector<CHandle<CBasePlayerController>> SplitScreenPlayers => Schema.GetDeclaredClass<NetworkedVector<CHandle<CBasePlayerController>>>(this.Handle, "CBasePlayerController", "m_hSplitScreenPlayers");
// m_bIsHLTV
[SchemaMember("CBasePlayerController", "m_bIsHLTV")]
public ref bool IsHLTV => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bIsHLTV");
// m_iConnected
[SchemaMember("CBasePlayerController", "m_iConnected")]
public ref PlayerConnectedState Connected => ref Schema.GetRef<PlayerConnectedState>(this.Handle, "CBasePlayerController", "m_iConnected");
// m_iszPlayerName
[SchemaMember("CBasePlayerController", "m_iszPlayerName")]
public string PlayerName
{
get { return Schema.GetString(this.Handle, "CBasePlayerController", "m_iszPlayerName"); }
set { Schema.SetStringBytes(this.Handle, "CBasePlayerController", "m_iszPlayerName", value, 128); }
}
// m_szNetworkIDString
[SchemaMember("CBasePlayerController", "m_szNetworkIDString")]
public string NetworkIDString
{
get { return Schema.GetUtf8String(this.Handle, "CBasePlayerController", "m_szNetworkIDString"); }
set { Schema.SetString(this.Handle, "CBasePlayerController", "m_szNetworkIDString", value); }
}
// m_fLerpTime
[SchemaMember("CBasePlayerController", "m_fLerpTime")]
public ref float LerpTime => ref Schema.GetRef<float>(this.Handle, "CBasePlayerController", "m_fLerpTime");
// m_bLagCompensation
[SchemaMember("CBasePlayerController", "m_bLagCompensation")]
public ref bool LagCompensation => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bLagCompensation");
// m_bPredict
[SchemaMember("CBasePlayerController", "m_bPredict")]
public ref bool Predict => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bPredict");
// m_bAutoKickDisabled
[SchemaMember("CBasePlayerController", "m_bAutoKickDisabled")]
public ref bool AutoKickDisabled => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bAutoKickDisabled");
// m_bIsLowViolence
[SchemaMember("CBasePlayerController", "m_bIsLowViolence")]
public ref bool IsLowViolence => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bIsLowViolence");
// m_bGamePaused
[SchemaMember("CBasePlayerController", "m_bGamePaused")]
public ref bool GamePaused => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bGamePaused");
// m_iIgnoreGlobalChat
[SchemaMember("CBasePlayerController", "m_iIgnoreGlobalChat")]
public ref ChatIgnoreType_t IgnoreGlobalChat => ref Schema.GetRef<ChatIgnoreType_t>(this.Handle, "CBasePlayerController", "m_iIgnoreGlobalChat");
// m_flLastPlayerTalkTime
[SchemaMember("CBasePlayerController", "m_flLastPlayerTalkTime")]
public ref float LastPlayerTalkTime => ref Schema.GetRef<float>(this.Handle, "CBasePlayerController", "m_flLastPlayerTalkTime");
// m_flLastEntitySteadyState
[SchemaMember("CBasePlayerController", "m_flLastEntitySteadyState")]
public ref float LastEntitySteadyState => ref Schema.GetRef<float>(this.Handle, "CBasePlayerController", "m_flLastEntitySteadyState");
// m_nAvailableEntitySteadyState
[SchemaMember("CBasePlayerController", "m_nAvailableEntitySteadyState")]
public ref Int32 AvailableEntitySteadyState => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerController", "m_nAvailableEntitySteadyState");
// m_bHasAnySteadyStateEnts
[SchemaMember("CBasePlayerController", "m_bHasAnySteadyStateEnts")]
public ref bool HasAnySteadyStateEnts => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerController", "m_bHasAnySteadyStateEnts");
// m_steamID
[SchemaMember("CBasePlayerController", "m_steamID")]
public ref UInt64 SteamID => ref Schema.GetRef<UInt64>(this.Handle, "CBasePlayerController", "m_steamID");
// m_iDesiredFOV
[SchemaMember("CBasePlayerController", "m_iDesiredFOV")]
public ref UInt32 DesiredFOV => ref Schema.GetRef<UInt32>(this.Handle, "CBasePlayerController", "m_iDesiredFOV");
}

View File

@@ -1,121 +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 CBasePlayerPawn : CBaseCombatCharacter
{
public CBasePlayerPawn (IntPtr pointer) : base(pointer) {}
// m_pWeaponServices
[SchemaMember("CBasePlayerPawn", "m_pWeaponServices")]
public CPlayer_WeaponServices? WeaponServices => Schema.GetPointer<CPlayer_WeaponServices>(this.Handle, "CBasePlayerPawn", "m_pWeaponServices");
// m_pItemServices
[SchemaMember("CBasePlayerPawn", "m_pItemServices")]
public CPlayer_ItemServices? ItemServices => Schema.GetPointer<CPlayer_ItemServices>(this.Handle, "CBasePlayerPawn", "m_pItemServices");
// m_pAutoaimServices
[SchemaMember("CBasePlayerPawn", "m_pAutoaimServices")]
public CPlayer_AutoaimServices? AutoaimServices => Schema.GetPointer<CPlayer_AutoaimServices>(this.Handle, "CBasePlayerPawn", "m_pAutoaimServices");
// m_pObserverServices
[SchemaMember("CBasePlayerPawn", "m_pObserverServices")]
public CPlayer_ObserverServices? ObserverServices => Schema.GetPointer<CPlayer_ObserverServices>(this.Handle, "CBasePlayerPawn", "m_pObserverServices");
// m_pWaterServices
[SchemaMember("CBasePlayerPawn", "m_pWaterServices")]
public CPlayer_WaterServices? WaterServices => Schema.GetPointer<CPlayer_WaterServices>(this.Handle, "CBasePlayerPawn", "m_pWaterServices");
// m_pUseServices
[SchemaMember("CBasePlayerPawn", "m_pUseServices")]
public CPlayer_UseServices? UseServices => Schema.GetPointer<CPlayer_UseServices>(this.Handle, "CBasePlayerPawn", "m_pUseServices");
// m_pFlashlightServices
[SchemaMember("CBasePlayerPawn", "m_pFlashlightServices")]
public CPlayer_FlashlightServices? FlashlightServices => Schema.GetPointer<CPlayer_FlashlightServices>(this.Handle, "CBasePlayerPawn", "m_pFlashlightServices");
// m_pCameraServices
[SchemaMember("CBasePlayerPawn", "m_pCameraServices")]
public CPlayer_CameraServices? CameraServices => Schema.GetPointer<CPlayer_CameraServices>(this.Handle, "CBasePlayerPawn", "m_pCameraServices");
// m_pMovementServices
[SchemaMember("CBasePlayerPawn", "m_pMovementServices")]
public CPlayer_MovementServices? MovementServices => Schema.GetPointer<CPlayer_MovementServices>(this.Handle, "CBasePlayerPawn", "m_pMovementServices");
// m_ServerViewAngleChanges
[SchemaMember("CBasePlayerPawn", "m_ServerViewAngleChanges")]
public NetworkedVector<ViewAngleServerChange_t> ServerViewAngleChanges => Schema.GetDeclaredClass<NetworkedVector<ViewAngleServerChange_t>>(this.Handle, "CBasePlayerPawn", "m_ServerViewAngleChanges");
// m_nHighestGeneratedServerViewAngleChangeIndex
[SchemaMember("CBasePlayerPawn", "m_nHighestGeneratedServerViewAngleChangeIndex")]
public ref UInt32 HighestGeneratedServerViewAngleChangeIndex => ref Schema.GetRef<UInt32>(this.Handle, "CBasePlayerPawn", "m_nHighestGeneratedServerViewAngleChangeIndex");
// v_angle
[SchemaMember("CBasePlayerPawn", "v_angle")]
public QAngle V_angle => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBasePlayerPawn", "v_angle");
// v_anglePrevious
[SchemaMember("CBasePlayerPawn", "v_anglePrevious")]
public QAngle V_anglePrevious => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBasePlayerPawn", "v_anglePrevious");
// m_iHideHUD
[SchemaMember("CBasePlayerPawn", "m_iHideHUD")]
public ref UInt32 HideHUD => ref Schema.GetRef<UInt32>(this.Handle, "CBasePlayerPawn", "m_iHideHUD");
// m_skybox3d
[SchemaMember("CBasePlayerPawn", "m_skybox3d")]
public sky3dparams_t Skybox3d => Schema.GetDeclaredClass<sky3dparams_t>(this.Handle, "CBasePlayerPawn", "m_skybox3d");
// m_fTimeLastHurt
[SchemaMember("CBasePlayerPawn", "m_fTimeLastHurt")]
public ref float TimeLastHurt => ref Schema.GetRef<float>(this.Handle, "CBasePlayerPawn", "m_fTimeLastHurt");
// m_flDeathTime
[SchemaMember("CBasePlayerPawn", "m_flDeathTime")]
public ref float DeathTime => ref Schema.GetRef<float>(this.Handle, "CBasePlayerPawn", "m_flDeathTime");
// m_fNextSuicideTime
[SchemaMember("CBasePlayerPawn", "m_fNextSuicideTime")]
public ref float NextSuicideTime => ref Schema.GetRef<float>(this.Handle, "CBasePlayerPawn", "m_fNextSuicideTime");
// m_fInitHUD
[SchemaMember("CBasePlayerPawn", "m_fInitHUD")]
public ref bool InitHUD => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerPawn", "m_fInitHUD");
// m_pExpresser
[SchemaMember("CBasePlayerPawn", "m_pExpresser")]
public CAI_Expresser? Expresser => Schema.GetPointer<CAI_Expresser>(this.Handle, "CBasePlayerPawn", "m_pExpresser");
// m_hController
[SchemaMember("CBasePlayerPawn", "m_hController")]
public CHandle<CBasePlayerController> Controller => Schema.GetDeclaredClass<CHandle<CBasePlayerController>>(this.Handle, "CBasePlayerPawn", "m_hController");
// m_fHltvReplayDelay
[SchemaMember("CBasePlayerPawn", "m_fHltvReplayDelay")]
public ref float HltvReplayDelay => ref Schema.GetRef<float>(this.Handle, "CBasePlayerPawn", "m_fHltvReplayDelay");
// m_fHltvReplayEnd
[SchemaMember("CBasePlayerPawn", "m_fHltvReplayEnd")]
public ref float HltvReplayEnd => ref Schema.GetRef<float>(this.Handle, "CBasePlayerPawn", "m_fHltvReplayEnd");
// m_iHltvReplayEntity
[SchemaMember("CBasePlayerPawn", "m_iHltvReplayEntity")]
public CEntityIndex HltvReplayEntity => Schema.GetDeclaredClass<CEntityIndex>(this.Handle, "CBasePlayerPawn", "m_iHltvReplayEntity");
// m_sndOpvarLatchData
[SchemaMember("CBasePlayerPawn", "m_sndOpvarLatchData")]
public NetworkedVector<sndopvarlatchdata_t> SndOpvarLatchData => Schema.GetDeclaredClass<NetworkedVector<sndopvarlatchdata_t>>(this.Handle, "CBasePlayerPawn", "m_sndOpvarLatchData");
}

View File

@@ -1,73 +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 CBasePlayerVData : CEntitySubclassVDataBase
{
public CBasePlayerVData (IntPtr pointer) : base(pointer) {}
// m_flHeadDamageMultiplier
[SchemaMember("CBasePlayerVData", "m_flHeadDamageMultiplier")]
public CSkillFloat HeadDamageMultiplier => Schema.GetDeclaredClass<CSkillFloat>(this.Handle, "CBasePlayerVData", "m_flHeadDamageMultiplier");
// m_flChestDamageMultiplier
[SchemaMember("CBasePlayerVData", "m_flChestDamageMultiplier")]
public CSkillFloat ChestDamageMultiplier => Schema.GetDeclaredClass<CSkillFloat>(this.Handle, "CBasePlayerVData", "m_flChestDamageMultiplier");
// m_flStomachDamageMultiplier
[SchemaMember("CBasePlayerVData", "m_flStomachDamageMultiplier")]
public CSkillFloat StomachDamageMultiplier => Schema.GetDeclaredClass<CSkillFloat>(this.Handle, "CBasePlayerVData", "m_flStomachDamageMultiplier");
// m_flArmDamageMultiplier
[SchemaMember("CBasePlayerVData", "m_flArmDamageMultiplier")]
public CSkillFloat ArmDamageMultiplier => Schema.GetDeclaredClass<CSkillFloat>(this.Handle, "CBasePlayerVData", "m_flArmDamageMultiplier");
// m_flLegDamageMultiplier
[SchemaMember("CBasePlayerVData", "m_flLegDamageMultiplier")]
public CSkillFloat LegDamageMultiplier => Schema.GetDeclaredClass<CSkillFloat>(this.Handle, "CBasePlayerVData", "m_flLegDamageMultiplier");
// m_flHoldBreathTime
[SchemaMember("CBasePlayerVData", "m_flHoldBreathTime")]
public ref float HoldBreathTime => ref Schema.GetRef<float>(this.Handle, "CBasePlayerVData", "m_flHoldBreathTime");
// m_flDrowningDamageInterval
[SchemaMember("CBasePlayerVData", "m_flDrowningDamageInterval")]
public ref float DrowningDamageInterval => ref Schema.GetRef<float>(this.Handle, "CBasePlayerVData", "m_flDrowningDamageInterval");
// m_nDrowningDamageInitial
[SchemaMember("CBasePlayerVData", "m_nDrowningDamageInitial")]
public ref Int32 DrowningDamageInitial => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerVData", "m_nDrowningDamageInitial");
// m_nDrowningDamageMax
[SchemaMember("CBasePlayerVData", "m_nDrowningDamageMax")]
public ref Int32 DrowningDamageMax => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerVData", "m_nDrowningDamageMax");
// m_nWaterSpeed
[SchemaMember("CBasePlayerVData", "m_nWaterSpeed")]
public ref Int32 WaterSpeed => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerVData", "m_nWaterSpeed");
// m_flUseRange
[SchemaMember("CBasePlayerVData", "m_flUseRange")]
public ref float UseRange => ref Schema.GetRef<float>(this.Handle, "CBasePlayerVData", "m_flUseRange");
// m_flUseAngleTolerance
[SchemaMember("CBasePlayerVData", "m_flUseAngleTolerance")]
public ref float UseAngleTolerance => ref Schema.GetRef<float>(this.Handle, "CBasePlayerVData", "m_flUseAngleTolerance");
// m_flCrouchTime
[SchemaMember("CBasePlayerVData", "m_flCrouchTime")]
public ref float CrouchTime => ref Schema.GetRef<float>(this.Handle, "CBasePlayerVData", "m_flCrouchTime");
}

View File

@@ -1,53 +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 CBasePlayerWeapon : CEconEntity
{
public CBasePlayerWeapon (IntPtr pointer) : base(pointer) {}
// m_nNextPrimaryAttackTick
[SchemaMember("CBasePlayerWeapon", "m_nNextPrimaryAttackTick")]
public ref Int32 NextPrimaryAttackTick => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeapon", "m_nNextPrimaryAttackTick");
// m_flNextPrimaryAttackTickRatio
[SchemaMember("CBasePlayerWeapon", "m_flNextPrimaryAttackTickRatio")]
public ref float NextPrimaryAttackTickRatio => ref Schema.GetRef<float>(this.Handle, "CBasePlayerWeapon", "m_flNextPrimaryAttackTickRatio");
// m_nNextSecondaryAttackTick
[SchemaMember("CBasePlayerWeapon", "m_nNextSecondaryAttackTick")]
public ref Int32 NextSecondaryAttackTick => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeapon", "m_nNextSecondaryAttackTick");
// m_flNextSecondaryAttackTickRatio
[SchemaMember("CBasePlayerWeapon", "m_flNextSecondaryAttackTickRatio")]
public ref float NextSecondaryAttackTickRatio => ref Schema.GetRef<float>(this.Handle, "CBasePlayerWeapon", "m_flNextSecondaryAttackTickRatio");
// m_iClip1
[SchemaMember("CBasePlayerWeapon", "m_iClip1")]
public ref Int32 Clip1 => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeapon", "m_iClip1");
// m_iClip2
[SchemaMember("CBasePlayerWeapon", "m_iClip2")]
public ref Int32 Clip2 => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeapon", "m_iClip2");
// m_pReserveAmmo
[SchemaMember("CBasePlayerWeapon", "m_pReserveAmmo")]
public Span<Int32> ReserveAmmo => Schema.GetFixedArray<Int32>(this.Handle, "CBasePlayerWeapon", "m_pReserveAmmo", 2);
// m_OnPlayerUse
[SchemaMember("CBasePlayerWeapon", "m_OnPlayerUse")]
public CEntityIOOutput OnPlayerUse => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePlayerWeapon", "m_OnPlayerUse");
}

View File

@@ -1,89 +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 CBasePlayerWeaponVData : CEntitySubclassVDataBase
{
public CBasePlayerWeaponVData (IntPtr pointer) : base(pointer) {}
// m_bBuiltRightHanded
[SchemaMember("CBasePlayerWeaponVData", "m_bBuiltRightHanded")]
public ref bool BuiltRightHanded => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bBuiltRightHanded");
// m_bAllowFlipping
[SchemaMember("CBasePlayerWeaponVData", "m_bAllowFlipping")]
public ref bool AllowFlipping => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bAllowFlipping");
// m_bLinkedCooldowns
[SchemaMember("CBasePlayerWeaponVData", "m_bLinkedCooldowns")]
public ref bool LinkedCooldowns => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bLinkedCooldowns");
// m_iFlags
[SchemaMember("CBasePlayerWeaponVData", "m_iFlags")]
public ref ItemFlagTypes_t Flags => ref Schema.GetRef<ItemFlagTypes_t>(this.Handle, "CBasePlayerWeaponVData", "m_iFlags");
// m_nPrimaryAmmoType
[SchemaMember("CBasePlayerWeaponVData", "m_nPrimaryAmmoType")]
public ref byte PrimaryAmmoType => ref Schema.GetRef<byte>(this.Handle, "CBasePlayerWeaponVData", "m_nPrimaryAmmoType");
// m_nSecondaryAmmoType
[SchemaMember("CBasePlayerWeaponVData", "m_nSecondaryAmmoType")]
public ref byte SecondaryAmmoType => ref Schema.GetRef<byte>(this.Handle, "CBasePlayerWeaponVData", "m_nSecondaryAmmoType");
// m_iMaxClip1
[SchemaMember("CBasePlayerWeaponVData", "m_iMaxClip1")]
public ref Int32 MaxClip1 => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeaponVData", "m_iMaxClip1");
// m_iMaxClip2
[SchemaMember("CBasePlayerWeaponVData", "m_iMaxClip2")]
public ref Int32 MaxClip2 => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeaponVData", "m_iMaxClip2");
// m_iDefaultClip1
[SchemaMember("CBasePlayerWeaponVData", "m_iDefaultClip1")]
public ref Int32 DefaultClip1 => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeaponVData", "m_iDefaultClip1");
// m_iDefaultClip2
[SchemaMember("CBasePlayerWeaponVData", "m_iDefaultClip2")]
public ref Int32 DefaultClip2 => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeaponVData", "m_iDefaultClip2");
// m_bReserveAmmoAsClips
[SchemaMember("CBasePlayerWeaponVData", "m_bReserveAmmoAsClips")]
public ref bool ReserveAmmoAsClips => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bReserveAmmoAsClips");
// m_iWeight
[SchemaMember("CBasePlayerWeaponVData", "m_iWeight")]
public ref Int32 Weight => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeaponVData", "m_iWeight");
// m_bAutoSwitchTo
[SchemaMember("CBasePlayerWeaponVData", "m_bAutoSwitchTo")]
public ref bool AutoSwitchTo => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bAutoSwitchTo");
// m_bAutoSwitchFrom
[SchemaMember("CBasePlayerWeaponVData", "m_bAutoSwitchFrom")]
public ref bool AutoSwitchFrom => ref Schema.GetRef<bool>(this.Handle, "CBasePlayerWeaponVData", "m_bAutoSwitchFrom");
// m_iRumbleEffect
[SchemaMember("CBasePlayerWeaponVData", "m_iRumbleEffect")]
public ref RumbleEffect_t RumbleEffect => ref Schema.GetRef<RumbleEffect_t>(this.Handle, "CBasePlayerWeaponVData", "m_iRumbleEffect");
// m_iSlot
[SchemaMember("CBasePlayerWeaponVData", "m_iSlot")]
public ref Int32 Slot => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeaponVData", "m_iSlot");
// m_iPosition
[SchemaMember("CBasePlayerWeaponVData", "m_iPosition")]
public ref Int32 Position => ref Schema.GetRef<Int32>(this.Handle, "CBasePlayerWeaponVData", "m_iPosition");
}

View File

@@ -1,37 +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 CBaseProp : CBaseAnimGraph
{
public CBaseProp (IntPtr pointer) : base(pointer) {}
// m_bModelOverrodeBlockLOS
[SchemaMember("CBaseProp", "m_bModelOverrodeBlockLOS")]
public ref bool ModelOverrodeBlockLOS => ref Schema.GetRef<bool>(this.Handle, "CBaseProp", "m_bModelOverrodeBlockLOS");
// m_iShapeType
[SchemaMember("CBaseProp", "m_iShapeType")]
public ref Int32 ShapeType => ref Schema.GetRef<Int32>(this.Handle, "CBaseProp", "m_iShapeType");
// m_bConformToCollisionBounds
[SchemaMember("CBaseProp", "m_bConformToCollisionBounds")]
public ref bool ConformToCollisionBounds => ref Schema.GetRef<bool>(this.Handle, "CBaseProp", "m_bConformToCollisionBounds");
// m_mPreferredCatchTransform
[SchemaMember("CBaseProp", "m_mPreferredCatchTransform")]
public matrix3x4_t MPreferredCatchTransform => Schema.GetDeclaredClass<matrix3x4_t>(this.Handle, "CBaseProp", "m_mPreferredCatchTransform");
}

View File

@@ -1,209 +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 CBasePropDoor : CDynamicProp
{
public CBasePropDoor (IntPtr pointer) : base(pointer) {}
// m_flAutoReturnDelay
[SchemaMember("CBasePropDoor", "m_flAutoReturnDelay")]
public ref float AutoReturnDelay => ref Schema.GetRef<float>(this.Handle, "CBasePropDoor", "m_flAutoReturnDelay");
// m_hDoorList
[SchemaMember("CBasePropDoor", "m_hDoorList")]
public NetworkedVector<CHandle<CBasePropDoor>> DoorList => Schema.GetDeclaredClass<NetworkedVector<CHandle<CBasePropDoor>>>(this.Handle, "CBasePropDoor", "m_hDoorList");
// m_nHardwareType
[SchemaMember("CBasePropDoor", "m_nHardwareType")]
public ref Int32 HardwareType => ref Schema.GetRef<Int32>(this.Handle, "CBasePropDoor", "m_nHardwareType");
// m_bNeedsHardware
[SchemaMember("CBasePropDoor", "m_bNeedsHardware")]
public ref bool NeedsHardware => ref Schema.GetRef<bool>(this.Handle, "CBasePropDoor", "m_bNeedsHardware");
// m_eDoorState
[SchemaMember("CBasePropDoor", "m_eDoorState")]
public ref DoorState_t DoorState => ref Schema.GetRef<DoorState_t>(this.Handle, "CBasePropDoor", "m_eDoorState");
// m_bLocked
[SchemaMember("CBasePropDoor", "m_bLocked")]
public ref bool Locked => ref Schema.GetRef<bool>(this.Handle, "CBasePropDoor", "m_bLocked");
// m_closedPosition
[SchemaMember("CBasePropDoor", "m_closedPosition")]
public Vector ClosedPosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CBasePropDoor", "m_closedPosition");
// m_closedAngles
[SchemaMember("CBasePropDoor", "m_closedAngles")]
public QAngle ClosedAngles => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBasePropDoor", "m_closedAngles");
// m_hBlocker
[SchemaMember("CBasePropDoor", "m_hBlocker")]
public CHandle<CBaseEntity> Blocker => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBasePropDoor", "m_hBlocker");
// m_bFirstBlocked
[SchemaMember("CBasePropDoor", "m_bFirstBlocked")]
public ref bool FirstBlocked => ref Schema.GetRef<bool>(this.Handle, "CBasePropDoor", "m_bFirstBlocked");
// m_ls
[SchemaMember("CBasePropDoor", "m_ls")]
public locksound_t Ls => Schema.GetDeclaredClass<locksound_t>(this.Handle, "CBasePropDoor", "m_ls");
// m_bForceClosed
[SchemaMember("CBasePropDoor", "m_bForceClosed")]
public ref bool ForceClosed => ref Schema.GetRef<bool>(this.Handle, "CBasePropDoor", "m_bForceClosed");
// m_vecLatchWorldPosition
[SchemaMember("CBasePropDoor", "m_vecLatchWorldPosition")]
public Vector LatchWorldPosition => Schema.GetDeclaredClass<Vector>(this.Handle, "CBasePropDoor", "m_vecLatchWorldPosition");
// m_hActivator
[SchemaMember("CBasePropDoor", "m_hActivator")]
public CHandle<CBaseEntity> Activator => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBasePropDoor", "m_hActivator");
// m_SoundMoving
[SchemaMember("CBasePropDoor", "m_SoundMoving")]
public string SoundMoving
{
get { return Schema.GetUtf8String(this.Handle, "CBasePropDoor", "m_SoundMoving"); }
set { Schema.SetString(this.Handle, "CBasePropDoor", "m_SoundMoving", value); }
}
// m_SoundOpen
[SchemaMember("CBasePropDoor", "m_SoundOpen")]
public string SoundOpen
{
get { return Schema.GetUtf8String(this.Handle, "CBasePropDoor", "m_SoundOpen"); }
set { Schema.SetString(this.Handle, "CBasePropDoor", "m_SoundOpen", value); }
}
// m_SoundClose
[SchemaMember("CBasePropDoor", "m_SoundClose")]
public string SoundClose
{
get { return Schema.GetUtf8String(this.Handle, "CBasePropDoor", "m_SoundClose"); }
set { Schema.SetString(this.Handle, "CBasePropDoor", "m_SoundClose", value); }
}
// m_SoundLock
[SchemaMember("CBasePropDoor", "m_SoundLock")]
public string SoundLock
{
get { return Schema.GetUtf8String(this.Handle, "CBasePropDoor", "m_SoundLock"); }
set { Schema.SetString(this.Handle, "CBasePropDoor", "m_SoundLock", value); }
}
// m_SoundUnlock
[SchemaMember("CBasePropDoor", "m_SoundUnlock")]
public string SoundUnlock
{
get { return Schema.GetUtf8String(this.Handle, "CBasePropDoor", "m_SoundUnlock"); }
set { Schema.SetString(this.Handle, "CBasePropDoor", "m_SoundUnlock", value); }
}
// m_SoundLatch
[SchemaMember("CBasePropDoor", "m_SoundLatch")]
public string SoundLatch
{
get { return Schema.GetUtf8String(this.Handle, "CBasePropDoor", "m_SoundLatch"); }
set { Schema.SetString(this.Handle, "CBasePropDoor", "m_SoundLatch", value); }
}
// m_SoundPound
[SchemaMember("CBasePropDoor", "m_SoundPound")]
public string SoundPound
{
get { return Schema.GetUtf8String(this.Handle, "CBasePropDoor", "m_SoundPound"); }
set { Schema.SetString(this.Handle, "CBasePropDoor", "m_SoundPound", value); }
}
// m_SoundJiggle
[SchemaMember("CBasePropDoor", "m_SoundJiggle")]
public string SoundJiggle
{
get { return Schema.GetUtf8String(this.Handle, "CBasePropDoor", "m_SoundJiggle"); }
set { Schema.SetString(this.Handle, "CBasePropDoor", "m_SoundJiggle", value); }
}
// m_SoundLockedAnim
[SchemaMember("CBasePropDoor", "m_SoundLockedAnim")]
public string SoundLockedAnim
{
get { return Schema.GetUtf8String(this.Handle, "CBasePropDoor", "m_SoundLockedAnim"); }
set { Schema.SetString(this.Handle, "CBasePropDoor", "m_SoundLockedAnim", value); }
}
// m_numCloseAttempts
[SchemaMember("CBasePropDoor", "m_numCloseAttempts")]
public ref Int32 NumCloseAttempts => ref Schema.GetRef<Int32>(this.Handle, "CBasePropDoor", "m_numCloseAttempts");
// m_nPhysicsMaterial
[SchemaMember("CBasePropDoor", "m_nPhysicsMaterial")]
public CUtlStringToken PhysicsMaterial => Schema.GetDeclaredClass<CUtlStringToken>(this.Handle, "CBasePropDoor", "m_nPhysicsMaterial");
// m_SlaveName
[SchemaMember("CBasePropDoor", "m_SlaveName")]
public string SlaveName
{
get { return Schema.GetUtf8String(this.Handle, "CBasePropDoor", "m_SlaveName"); }
set { Schema.SetString(this.Handle, "CBasePropDoor", "m_SlaveName", value); }
}
// m_hMaster
[SchemaMember("CBasePropDoor", "m_hMaster")]
public CHandle<CBasePropDoor> Master => Schema.GetDeclaredClass<CHandle<CBasePropDoor>>(this.Handle, "CBasePropDoor", "m_hMaster");
// m_OnBlockedClosing
[SchemaMember("CBasePropDoor", "m_OnBlockedClosing")]
public CEntityIOOutput OnBlockedClosing => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePropDoor", "m_OnBlockedClosing");
// m_OnBlockedOpening
[SchemaMember("CBasePropDoor", "m_OnBlockedOpening")]
public CEntityIOOutput OnBlockedOpening => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePropDoor", "m_OnBlockedOpening");
// m_OnUnblockedClosing
[SchemaMember("CBasePropDoor", "m_OnUnblockedClosing")]
public CEntityIOOutput OnUnblockedClosing => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePropDoor", "m_OnUnblockedClosing");
// m_OnUnblockedOpening
[SchemaMember("CBasePropDoor", "m_OnUnblockedOpening")]
public CEntityIOOutput OnUnblockedOpening => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePropDoor", "m_OnUnblockedOpening");
// m_OnFullyClosed
[SchemaMember("CBasePropDoor", "m_OnFullyClosed")]
public CEntityIOOutput OnFullyClosed => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePropDoor", "m_OnFullyClosed");
// m_OnFullyOpen
[SchemaMember("CBasePropDoor", "m_OnFullyOpen")]
public CEntityIOOutput OnFullyOpen => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePropDoor", "m_OnFullyOpen");
// m_OnClose
[SchemaMember("CBasePropDoor", "m_OnClose")]
public CEntityIOOutput OnClose => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePropDoor", "m_OnClose");
// m_OnOpen
[SchemaMember("CBasePropDoor", "m_OnOpen")]
public CEntityIOOutput OnOpen => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePropDoor", "m_OnOpen");
// m_OnLockedUse
[SchemaMember("CBasePropDoor", "m_OnLockedUse")]
public CEntityIOOutput OnLockedUse => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePropDoor", "m_OnLockedUse");
// m_OnAjarOpen
[SchemaMember("CBasePropDoor", "m_OnAjarOpen")]
public CEntityIOOutput OnAjarOpen => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBasePropDoor", "m_OnAjarOpen");
}

View File

@@ -1,89 +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 CBaseToggle : CBaseModelEntity
{
public CBaseToggle (IntPtr pointer) : base(pointer) {}
// m_toggle_state
[SchemaMember("CBaseToggle", "m_toggle_state")]
public ref TOGGLE_STATE Toggle_state => ref Schema.GetRef<TOGGLE_STATE>(this.Handle, "CBaseToggle", "m_toggle_state");
// m_flMoveDistance
[SchemaMember("CBaseToggle", "m_flMoveDistance")]
public ref float MoveDistance => ref Schema.GetRef<float>(this.Handle, "CBaseToggle", "m_flMoveDistance");
// m_flWait
[SchemaMember("CBaseToggle", "m_flWait")]
public ref float Wait => ref Schema.GetRef<float>(this.Handle, "CBaseToggle", "m_flWait");
// m_flLip
[SchemaMember("CBaseToggle", "m_flLip")]
public ref float Lip => ref Schema.GetRef<float>(this.Handle, "CBaseToggle", "m_flLip");
// m_bAlwaysFireBlockedOutputs
[SchemaMember("CBaseToggle", "m_bAlwaysFireBlockedOutputs")]
public ref bool AlwaysFireBlockedOutputs => ref Schema.GetRef<bool>(this.Handle, "CBaseToggle", "m_bAlwaysFireBlockedOutputs");
// m_vecPosition1
[SchemaMember("CBaseToggle", "m_vecPosition1")]
public Vector Position1 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseToggle", "m_vecPosition1");
// m_vecPosition2
[SchemaMember("CBaseToggle", "m_vecPosition2")]
public Vector Position2 => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseToggle", "m_vecPosition2");
// m_vecMoveAng
[SchemaMember("CBaseToggle", "m_vecMoveAng")]
public QAngle MoveAng => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBaseToggle", "m_vecMoveAng");
// m_vecAngle1
[SchemaMember("CBaseToggle", "m_vecAngle1")]
public QAngle Angle1 => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBaseToggle", "m_vecAngle1");
// m_vecAngle2
[SchemaMember("CBaseToggle", "m_vecAngle2")]
public QAngle Angle2 => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBaseToggle", "m_vecAngle2");
// m_flHeight
[SchemaMember("CBaseToggle", "m_flHeight")]
public ref float Height => ref Schema.GetRef<float>(this.Handle, "CBaseToggle", "m_flHeight");
// m_hActivator
[SchemaMember("CBaseToggle", "m_hActivator")]
public CHandle<CBaseEntity> Activator => Schema.GetDeclaredClass<CHandle<CBaseEntity>>(this.Handle, "CBaseToggle", "m_hActivator");
// m_vecFinalDest
[SchemaMember("CBaseToggle", "m_vecFinalDest")]
public Vector FinalDest => Schema.GetDeclaredClass<Vector>(this.Handle, "CBaseToggle", "m_vecFinalDest");
// m_vecFinalAngle
[SchemaMember("CBaseToggle", "m_vecFinalAngle")]
public QAngle FinalAngle => Schema.GetDeclaredClass<QAngle>(this.Handle, "CBaseToggle", "m_vecFinalAngle");
// m_movementType
[SchemaMember("CBaseToggle", "m_movementType")]
public ref Int32 MovementType => ref Schema.GetRef<Int32>(this.Handle, "CBaseToggle", "m_movementType");
// m_sMaster
[SchemaMember("CBaseToggle", "m_sMaster")]
public string Master
{
get { return Schema.GetUtf8String(this.Handle, "CBaseToggle", "m_sMaster"); }
set { Schema.SetString(this.Handle, "CBaseToggle", "m_sMaster", value); }
}
}

View File

@@ -1,73 +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 CBaseTrigger : CBaseToggle
{
public CBaseTrigger (IntPtr pointer) : base(pointer) {}
// m_bDisabled
[SchemaMember("CBaseTrigger", "m_bDisabled")]
public ref bool Disabled => ref Schema.GetRef<bool>(this.Handle, "CBaseTrigger", "m_bDisabled");
// m_iFilterName
[SchemaMember("CBaseTrigger", "m_iFilterName")]
public string FilterName
{
get { return Schema.GetUtf8String(this.Handle, "CBaseTrigger", "m_iFilterName"); }
set { Schema.SetString(this.Handle, "CBaseTrigger", "m_iFilterName", value); }
}
// m_hFilter
[SchemaMember("CBaseTrigger", "m_hFilter")]
public CHandle<CBaseFilter> Filter => Schema.GetDeclaredClass<CHandle<CBaseFilter>>(this.Handle, "CBaseTrigger", "m_hFilter");
// m_OnStartTouch
[SchemaMember("CBaseTrigger", "m_OnStartTouch")]
public CEntityIOOutput OnStartTouch => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseTrigger", "m_OnStartTouch");
// m_OnStartTouchAll
[SchemaMember("CBaseTrigger", "m_OnStartTouchAll")]
public CEntityIOOutput OnStartTouchAll => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseTrigger", "m_OnStartTouchAll");
// m_OnEndTouch
[SchemaMember("CBaseTrigger", "m_OnEndTouch")]
public CEntityIOOutput OnEndTouch => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseTrigger", "m_OnEndTouch");
// m_OnEndTouchAll
[SchemaMember("CBaseTrigger", "m_OnEndTouchAll")]
public CEntityIOOutput OnEndTouchAll => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseTrigger", "m_OnEndTouchAll");
// m_OnTouching
[SchemaMember("CBaseTrigger", "m_OnTouching")]
public CEntityIOOutput OnTouching => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseTrigger", "m_OnTouching");
// m_OnTouchingEachEntity
[SchemaMember("CBaseTrigger", "m_OnTouchingEachEntity")]
public CEntityIOOutput OnTouchingEachEntity => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseTrigger", "m_OnTouchingEachEntity");
// m_OnNotTouching
[SchemaMember("CBaseTrigger", "m_OnNotTouching")]
public CEntityIOOutput OnNotTouching => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseTrigger", "m_OnNotTouching");
// m_hTouchingEntities
[SchemaMember("CBaseTrigger", "m_hTouchingEntities")]
public NetworkedVector<CHandle<CBaseEntity>> TouchingEntities => Schema.GetDeclaredClass<NetworkedVector<CHandle<CBaseEntity>>>(this.Handle, "CBaseTrigger", "m_hTouchingEntities");
// m_bClientSidePredicted
[SchemaMember("CBaseTrigger", "m_bClientSidePredicted")]
public ref bool ClientSidePredicted => ref Schema.GetRef<bool>(this.Handle, "CBaseTrigger", "m_bClientSidePredicted");
}

Some files were not shown because too many files have changed in this diff Show More