mirror of
https://github.com/roflmuffin/CounterStrikeSharp.git
synced 2025-12-06 08:03:12 -08:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc61323315 | ||
|
|
241817b7f2 | ||
|
|
fbcdce34fc | ||
|
|
daf0d25f36 | ||
|
|
12485be29f | ||
|
|
983d91491d | ||
|
|
71507b1e25 | ||
|
|
cfe14b35fe | ||
|
|
5a6cdf0da3 | ||
|
|
a5399dd5fe | ||
|
|
ab996c34e9 | ||
|
|
6e2e25b96e | ||
|
|
1142c9f063 | ||
|
|
72178c9598 | ||
|
|
7617bd1556 | ||
|
|
501d51a668 | ||
|
|
87f48cb35c | ||
|
|
39aa430528 | ||
|
|
a404a4d9d5 | ||
|
|
62ba29891d | ||
|
|
48fa9ca076 | ||
|
|
607e6c61f5 | ||
|
|
2675d280e3 | ||
|
|
f336dec616 | ||
|
|
2d8f7be84f | ||
|
|
8967c40bed | ||
|
|
12c6f4d0a1 | ||
|
|
f2b8044b8c | ||
|
|
eb9f5667d8 | ||
|
|
b9ca63a603 | ||
|
|
8fc926eacf | ||
|
|
5695c3f922 | ||
|
|
9071d51ecd |
14
.github/FUNDING.yml
vendored
Normal file
14
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
custom: ['https://support.cssharp.dev']
|
||||
10
.github/workflows/cmake-single-platform.yml
vendored
10
.github/workflows/cmake-single-platform.yml
vendored
@@ -4,9 +4,9 @@ on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docfx/**'
|
||||
branches: [ "main" ]
|
||||
branches: [ "main", "dev" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: [ "main", "dev" ]
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||
|
||||
- name: Fallback build number
|
||||
if: github.event_name == 'pull_request'
|
||||
if: ${{ github.event_name == 'pull_request' || github.ref != 'refs/heads/main' }}
|
||||
shell: bash
|
||||
run: echo "BUILD_NUMBER=0" >> $GITHUB_ENV
|
||||
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Generate build number
|
||||
if: github.event_name == 'push'
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
id: buildnumber
|
||||
uses: onyxmueller/build-tag-number@v1
|
||||
with:
|
||||
@@ -141,7 +141,7 @@ jobs:
|
||||
path: managed/CounterStrikeSharp.API/bin/Release
|
||||
|
||||
publish:
|
||||
if: github.event_name == 'push'
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
permissions:
|
||||
contents: write
|
||||
needs: [ "build_linux", "build_windows", "build_managed" ]
|
||||
|
||||
29
.github/workflows/issues-needs-author-action.yml
vendored
Normal file
29
.github/workflows/issues-needs-author-action.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Add comment for needs-author-action
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- labeled
|
||||
|
||||
jobs:
|
||||
add-comment:
|
||||
if: github.event.label.name == 'needs-author-action'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Add comment
|
||||
run: gh issue comment "$NUMBER" --body "$BODY"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
NUMBER: ${{ github.event.issue.number }}
|
||||
BODY: This issue has been marked `needs-author-action` and may be missing some important information.
|
||||
|
||||
- name: Remove label
|
||||
run: gh issue edit "$NUMBER" --remove-label "$LABELS"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
NUMBER: ${{ github.event.issue.number }}
|
||||
LABELS: untriaged
|
||||
29
.github/workflows/issues-remove-needs-author-action.yml
vendored
Normal file
29
.github/workflows/issues-remove-needs-author-action.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Add comment for needs-author-action
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
|
||||
jobs:
|
||||
add-comment:
|
||||
if: (github.event.sender.id == github.event.issue.user.id) && contains(github.event.issue.labels.*.name, 'needs-author-action')
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Remove label
|
||||
run: gh issue edit "$NUMBER" --remove-label "$LABELS"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
NUMBER: ${{ github.event.issue.number }}
|
||||
LABELS: needs-author-action
|
||||
|
||||
- name: Add label
|
||||
run: gh issue edit "$NUMBER" --add-label "$LABELS"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
NUMBER: ${{ github.event.issue.number }}
|
||||
LABELS: needs-further-triage
|
||||
24
.github/workflows/issues-stale.yml
vendored
Normal file
24
.github/workflows/issues-stale.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Mark stale issues
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '28 3 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v5
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: 14
|
||||
days-before-issue-close: 14
|
||||
stale-issue-label: 'no-recent-activity'
|
||||
only-labels: 'needs-author-action'
|
||||
stale-issue-message: 'This issue has been automatically marked `no-recent-activity` because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.'
|
||||
close-issue-message: 'This issue will now be closed since it had been marked `no-recent-activity` but received no further activity in the past 14 days.'
|
||||
20
.github/workflows/issues-triage-new.yml
vendored
Normal file
20
.github/workflows/issues-triage-new.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Label new issues
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- reopened
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
label_issues:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- run: gh issue edit "$NUMBER" --add-label "$LABELS"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
NUMBER: ${{ github.event.issue.number }}
|
||||
LABELS: untriaged
|
||||
20
.github/workflows/issues-triage-removal.yml
vendored
Normal file
20
.github/workflows/issues-triage-removal.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Label new issues
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- milestoned
|
||||
|
||||
jobs:
|
||||
label_issues:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Remove label
|
||||
run: gh issue edit "$NUMBER" --remove-label "$LABELS"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
NUMBER: ${{ github.event.issue.number }}
|
||||
LABELS: untriaged
|
||||
10
.gitmodules
vendored
10
.gitmodules
vendored
@@ -14,12 +14,12 @@
|
||||
[submodule "libraries/dyncall"]
|
||||
path = libraries/dyncall
|
||||
url = https://github.com/LWJGL-CI/dyncall
|
||||
[submodule "libraries/GameTracking-CS2"]
|
||||
path = libraries/GameTracking-CS2
|
||||
url = https://github.com/SteamDatabase/GameTracking-CS2
|
||||
[submodule "libraries/DynoHook"]
|
||||
path = libraries/DynoHook
|
||||
url = git@github.com:qubka/DynoHook.git
|
||||
url = https://github.com/qubka/DynoHook
|
||||
[submodule "libraries/asmjit"]
|
||||
path = libraries/asmjit
|
||||
url = git@github.com:asmjit/asmjit.git
|
||||
url = https://github.com/asmjit/asmjit
|
||||
[submodule "libraries/Protobufs"]
|
||||
path = libraries/Protobufs
|
||||
url = https://github.com/SteamDatabase/Protobufs
|
||||
|
||||
@@ -18,8 +18,10 @@ SET(SOURCE_FILES
|
||||
src/mm_plugin.h
|
||||
libraries/hl2sdk-cs2/tier1/convar.cpp
|
||||
libraries/hl2sdk-cs2/tier1/generichash.cpp
|
||||
libraries/hl2sdk-cs2/tier1/keyvalues3.cpp
|
||||
libraries/hl2sdk-cs2/entity2/entityidentity.cpp
|
||||
libraries/hl2sdk-cs2/entity2/entitysystem.cpp
|
||||
libraries/hl2sdk-cs2/entity2/entitykeyvalues.cpp
|
||||
libraries/dotnet/hostfxr.h
|
||||
libraries/dotnet/coreclr_delegates.h
|
||||
libraries/metamod-source/core/sourcehook/sourcehook.cpp
|
||||
@@ -88,6 +90,8 @@ SET(SOURCE_FILES
|
||||
src/core/managers/voice_manager.cpp
|
||||
src/core/managers/voice_manager.h
|
||||
src/scripting/natives/natives_dynamichooks.cpp
|
||||
src/core/game_system.h
|
||||
src/core/game_system.cpp
|
||||
)
|
||||
|
||||
|
||||
@@ -99,8 +103,8 @@ if (LINUX)
|
||||
)
|
||||
endif()
|
||||
|
||||
set(PROTO_DIRS -I${CMAKE_CURRENT_SOURCE_DIR}/libraries/GameTracking-CS2/Protobufs)
|
||||
file(GLOB PROTOS "${CMAKE_CURRENT_SOURCE_DIR}/libraries/GameTracking-CS2/Protobufs/*.proto")
|
||||
set(PROTO_DIRS -I${CMAKE_CURRENT_SOURCE_DIR}/libraries/Protobufs/csgo)
|
||||
file(GLOB PROTOS "${CMAKE_CURRENT_SOURCE_DIR}/libraries/Protobufs/csgo/*.proto")
|
||||
|
||||
## Generate protobuf source & headers
|
||||
if (LINUX)
|
||||
|
||||
683
LICENSE
683
LICENSE
@@ -1,674 +1,9 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
CounterStrikeSharp is licensed under the GNU General Public License, version 3.
|
||||
|
||||
As a special exception to the GNU General Public License 3.0, the license holder
|
||||
permits licensing of DERIVATIVE WORKS ONLY (that is,
|
||||
CounterStrikeSharp plugins and extensions, or any software built
|
||||
referencing published .NET packages) under the MIT license.
|
||||
|
||||
A copy of the GNU General Public License 3.0 is available in LICENSE.GPL3
|
||||
A copy of the MIT License is available in LICENSE.MIT
|
||||
674
LICENSE.GPL3
Normal file
674
LICENSE.GPL3
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
8
LICENSE.MIT
Normal file
8
LICENSE.MIT
Normal file
@@ -0,0 +1,8 @@
|
||||
The MIT License (MIT)
|
||||
Copyright © 2024 Michael (Roflmuffin) Wilson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -129,3 +129,9 @@ Build
|
||||
cmake --build . --config Debug
|
||||
```
|
||||
|
||||
License
|
||||
-------
|
||||
CounterStrikeSharp is licensed under the GNU General Public License version 3. A special exemption is outlined regarding published plugins, which you can find in the [LICENSE](LICENSE) file.
|
||||
|
||||
<img src="https://repobeats.axiom.co/api/embed/a96f228b8fa98c032070fa8dd831c967334ee553.svg" width="100%" />
|
||||
|
||||
|
||||
@@ -22,28 +22,28 @@
|
||||
},
|
||||
"CCSPlayerController_ChangeTeam": {
|
||||
"offsets": {
|
||||
"windows": 90,
|
||||
"linux": 89
|
||||
"windows": 93,
|
||||
"linux": 92
|
||||
}
|
||||
},
|
||||
"CCSPlayerController_Respawn": {
|
||||
"offsets": {
|
||||
"windows": 242,
|
||||
"linux": 244
|
||||
"windows": 244,
|
||||
"linux": 246
|
||||
}
|
||||
},
|
||||
"CCSPlayerPawn_Respawn": {
|
||||
"CBasePlayerController_SetPawn": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x40\\x53\\x48\\x83\\xEC\\x20\\x8B\\x91\\x38\\x0B\\x00\\x00\\x48\\x8B\\xD9",
|
||||
"linux": "\\x8B\\x8F\\x40\\x0E\\x00\\x00\\x83\\xF9\\xFF\\x0F\\x84\\xD9\\x01"
|
||||
"library": "server",
|
||||
"windows": "\\x44\\x88\\x4C\\x24\\x20\\x55\\x57\\x41\\x54\\x41\\x56\\x41\\x57\\x48\\x8D\\x6C\\x24\\x2A\\x48\\x81\\xEC\\x2A",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x41\\x54\\x49\\x89\\xFC\\x53\\x48\\x89\\xF3\\x48\\x81\\xEC\\xC8\\x00\\x00\\x00"
|
||||
}
|
||||
},
|
||||
"CCSPlayerPawnBase_PostThink": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x8B\\xC4\\x48\\x89\\x48\\x08\\x55\\x53\\x56\\x57\\x41\\x56\\x48\\x8D\\xA8\\xD8\\xFE\\xFF\\xFF",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x49\\x89\\xFF\\x41\\x56\\x41\\x55\\x41\\x54\\x53\\x48\\x81\\xEC\\x2A\\x2A\\x2A\\x2A\\xE8\\x2A\\x2A\\x2A\\x2A\\x4C"
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x41\\x54\\x53\\x48\\x89\\xFB\\x48\\x81\\xEC\\x2A\\x2A\\x2A\\x2A\\xE8\\x2A\\x2A\\x2A\\x2A\\x48\\x89\\xDF"
|
||||
}
|
||||
},
|
||||
"GiveNamedItem": {
|
||||
@@ -70,14 +70,14 @@
|
||||
"CBaseModelEntity_SetModel": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x10\\x48\\x89\\x7C\\x24\\x20\\x55\\x48\\x8B\\xEC\\x48\\x83\\xEC\\x50",
|
||||
"linux": "\\x55\\x48\\x89\\xF2\\x48\\x89\\xE5\\x41\\x54\\x49\\x89\\xFC\\x48\\x8D\\x2A\\x2A\\x48\\x83\\x2A\\x2A\\x2A\\x8D\\x05\\x2A\\x2A\\x2A\\x00\\x48\\x8B\\x30\\x48\\x8B\\x06\\xFF\\x2A\\x2A\\x48\\x8B\\x45\\x2A\\x48\\x8D\\x2A\\x2A\\x4C\\x89\\x2A\\x48\\x89\\x45\\x2A\\x2A\\x68\\xFC"
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x2A\\x48\\x89\\x7C\\x24\\x2A\\x55\\x48\\x8B\\xEC\\x48\\x83\\xEC\\x50\\x48\\x8B\\xF9\\x4C\\x8B\\xC2",
|
||||
"linux": "\\x55\\x48\\x89\\xF2\\x48\\x89\\xE5\\x41\\x54\\x49\\x89\\xFC\\x48\\x8D\\x7D\\xE0\\x48\\x83\\xEC\\x2A\\x48\\x8D\\x05\\x2A\\x2A\\x2A\\x2A\\x48\\x8B\\x30\\x48\\x8B\\x06"
|
||||
}
|
||||
},
|
||||
"CCSPlayer_WeaponServices_CanUse": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x10\\x48\\x89\\x6C\\x24\\x18\\x56\\x57\\x41\\x56\\x48\\x83\\xEC\\x30\\x80\\xB9\\xA8\\x00\\x00\\x00\\x00",
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x10\\x48\\x89\\x6C\\x24\\x18\\x56\\x57\\x41\\x56\\x48\\x83\\xEC\\x30\\x80\\xB9\\xA0\\x00\\x00\\x00\\x00",
|
||||
"linux": "\\x48\\x85\\xF6\\x0F\\x84\\x2A\\x2A\\x2A\\x2A\\x55\\x31\\xC9\\x48\\x89\\xE5\\x41\\x55\\x49\\x89\\xFD"
|
||||
}
|
||||
},
|
||||
@@ -102,14 +102,14 @@
|
||||
"CCSGameRules_TerminateRound": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x8B\\xC4\\x4C\\x89\\x48\\x20\\x55\\x56",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x49\\x89\\xFD\\x41\\x54\\x53\\x48\\x81\\xEC\\xE8"
|
||||
"windows": "\\x48\\x8B\\xC4\\x4C\\x89\\x48\\x20\\x55\\x57",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x41\\x54\\x49\\x89\\xFC\\x53\\x48\\x81\\xEC\\xE8\\x01\\x00\\x00\\x48\\x8D\\x05\\x2A\\x2A\\x2A\\x2A"
|
||||
}
|
||||
},
|
||||
"UTIL_CreateEntityByName": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x83\\xEC\\x48\\xC6\\x44\\x24\\x30\\x00\\x4C\\x8B\\xC1",
|
||||
"windows": "\\x48\\x83\\xEC\\x48\\xC6\\x44\\x24\\x30\\x00",
|
||||
"linux": "\\x48\\x8D\\x05\\x2A\\x2A\\x2A\\x2A\\x55\\x48\\x89\\xFA"
|
||||
}
|
||||
},
|
||||
@@ -117,7 +117,7 @@
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x89\\x5C\\x24\\x10\\x57\\x48\\x83\\xEC\\x30\\x48\\x8B\\xDA\\x48\\x8B\\xF9\\x48\\x85\\xC9",
|
||||
"linux": "\\x48\\x85\\xFF\\x74\\x4B\\x55\\x48\\x89\\xE5\\x41\\x56"
|
||||
"linux": "\\x48\\x85\\xFF\\x74\\x2A\\x55\\x48\\x89\\xE5\\x41\\x56"
|
||||
}
|
||||
},
|
||||
"CEntityInstance_AcceptInput": {
|
||||
@@ -136,8 +136,8 @@
|
||||
},
|
||||
"CBasePlayerPawn_CommitSuicide": {
|
||||
"offsets": {
|
||||
"windows": 357,
|
||||
"linux": 357
|
||||
"windows": 360,
|
||||
"linux": 360
|
||||
}
|
||||
},
|
||||
"CBasePlayerPawn_RemovePlayerItem": {
|
||||
@@ -171,7 +171,7 @@
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x40\\x53\\x57\\x41\\x55\\x48\\x83\\xEC\\x40",
|
||||
"linux": "\\x55\\xBA\\xFF\\xFF\\xFF\\xFF\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x49"
|
||||
"linux": "\\x55\\xBA\\xFF\\xFF\\xFF\\xFF\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x49\\x89\\xF5\\x41"
|
||||
}
|
||||
},
|
||||
"StateChanged": {
|
||||
@@ -196,15 +196,28 @@
|
||||
},
|
||||
"GameEventManager": {
|
||||
"offsets": {
|
||||
"windows": 91,
|
||||
"linux": 91
|
||||
"windows": 93,
|
||||
"linux": 93
|
||||
}
|
||||
},
|
||||
"CEntityIOOutput_FireOutputInternal": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x8B\\xC4\\x4C\\x89\\x48\\x20\\x55\\x57\\x41\\x54\\x41\\x56",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x41\\x54\\x53\\x48\\x83\\xEC\\x58\\x4C\\x8B\\x6F\\x08"
|
||||
"windows": "\\x4C\\x89\\x4C\\x24\\x20\\x53\\x55\\x57\\x41\\x54\\x41\\x56\\x48\\x81\\xEC",
|
||||
"linux": "\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x41\\x55\\x41\\x54\\x49\\x89\\xD4\\x53\\x48\\x89\\xF3\\x48\\x83\\xEC\\x58"
|
||||
}
|
||||
},
|
||||
"IGameSystem_InitAllSystems_pFirst": {
|
||||
"signatures": {
|
||||
"library": "server",
|
||||
"windows": "\\x48\\x8B\\x1D\\x2A\\x2A\\x2A\\x2A\\x48\\x85\\xDB\\x0F\\x84\\x2A\\x2A\\x2A\\x2A\\xBE\\x2A\\x2A\\x2A\\x2A\\x0F\\x1F\\x00\\x48\\x8B\\x7B\\x10",
|
||||
"linux": "\\x4C\\x8B\\x35\\x2A\\x2A\\x2A\\x2A\\x4D\\x85\\xF6\\x75\\x2D\\xE9\\x2A\\x2A\\x2A\\x2A\\x0F\\x1F\\x40\\x00\\x48\\x8B\\x05"
|
||||
}
|
||||
},
|
||||
"CEntityResourceManifest_AddResource": {
|
||||
"offsets": {
|
||||
"windows": 2,
|
||||
"linux": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,305 +1,320 @@
|
||||
ActionType_t
|
||||
AimMatrixBlendMode
|
||||
AmmoFlags_t
|
||||
AmmoPosition_t
|
||||
AnimLoopMode_t
|
||||
AnimNodeNetworkMode
|
||||
AnimParamButton_t
|
||||
AnimParamNetworkSetting
|
||||
AnimParamType_t
|
||||
AnimPoseControl
|
||||
AnimScriptType
|
||||
AnimVRFinger_t
|
||||
AnimVRHandMotionRange_t
|
||||
AnimVRHand_t
|
||||
AnimValueSource
|
||||
AnimVectorSource
|
||||
AnimVrBoneTransformSource_t
|
||||
AnimVrFingerSplay_t
|
||||
AnimationProcessingType_t
|
||||
AnimationSnapshotType_t
|
||||
AnimationType_t
|
||||
BBoxVolumeType_t
|
||||
BaseExplosionTypes_t
|
||||
BeamClipStyle_t
|
||||
BeamType_t
|
||||
BeginDeathLifeStateTransition_t
|
||||
BinaryNodeChildOption
|
||||
BinaryNodeTiming
|
||||
Blend2DMode
|
||||
BlendKeyType
|
||||
BloomBlendMode_t
|
||||
BlurFilterType_t
|
||||
BoneMaskBlendSpace
|
||||
BoneTransformSpace_t
|
||||
BrushSolidities_e
|
||||
CAnimationGraphVisualizerPrimitiveType
|
||||
CLogicBranchList__LogicBranchListenerLastState_t
|
||||
CRR_Response__ResponseEnum_t
|
||||
CSPlayerBlockingUseAction_t
|
||||
CSPlayerState
|
||||
CSWeaponCategory
|
||||
CSWeaponMode
|
||||
CSWeaponSilencerType
|
||||
CSWeaponState_t
|
||||
CSWeaponType
|
||||
CanPlaySequence_t
|
||||
ChatIgnoreType_t
|
||||
ChickenActivity
|
||||
ChoiceBlendMethod
|
||||
ChoiceChangeMethod
|
||||
ChoiceMethod
|
||||
Class_T
|
||||
ClosestPointTestType_t
|
||||
CommandEntitySpecType_t
|
||||
CommandExecMode_t
|
||||
CompMatPropertyMutatorConditionType_t
|
||||
CompMatPropertyMutatorType_t
|
||||
CompositeMaterialInputContainerSourceType_t
|
||||
CompositeMaterialInputLooseVariableType_t
|
||||
CompositeMaterialInputTextureType_t
|
||||
CompositeMaterialMatchFilterType_t
|
||||
CompositeMaterialVarSystemVar_t
|
||||
DamageTypes_t
|
||||
DampingSpeedFunction
|
||||
DebugOverlayBits_t
|
||||
Detail2Combo_t
|
||||
DetailCombo_t
|
||||
DisableShadows_t
|
||||
Disposition_t
|
||||
DoorState_t
|
||||
EDemoBoneSelectionMode
|
||||
EGrenadeThrowState
|
||||
EInButtonState
|
||||
EKillTypes_t
|
||||
ELayoutNodeType
|
||||
EOverrideBlockLOS_t
|
||||
EStyleNodeType
|
||||
EntFinderMethod_t
|
||||
EntityDisolveType_t
|
||||
EntityDormancyType_t
|
||||
EntityIOTargetType_t
|
||||
EntitySubclassScope_t
|
||||
Explosions
|
||||
FacingMode
|
||||
FieldNetworkOption
|
||||
FixAngleSet_t
|
||||
FlexOpCode_t
|
||||
FootFallTagFoot_t
|
||||
FootLockSubVisualization
|
||||
FootPinningTimingSource
|
||||
FootstepLandedFootSoundType_t
|
||||
ForcedCrouchState_t
|
||||
FuncDoorSpawnPos_t
|
||||
FuseVariableAccess_t
|
||||
FuseVariableType_t
|
||||
GameAnimEventIndex_t
|
||||
GrenadeType_t
|
||||
HierarchyType_t
|
||||
HitGroup_t
|
||||
HitboxLerpType_t
|
||||
HorizJustification_e
|
||||
Hull_t
|
||||
IChoreoServices__ChoreoState_t
|
||||
IChoreoServices__ScriptState_t
|
||||
IKChannelMode
|
||||
IKSolverType
|
||||
IKTargetCoordinateSystem
|
||||
IKTargetSource
|
||||
IkEndEffectorType
|
||||
IkTargetType
|
||||
InheritableBoolType_t
|
||||
InputBitMask_t
|
||||
InputLayoutVariation_t
|
||||
ItemFlagTypes_t
|
||||
JiggleBoneSimSpace
|
||||
JointAxis_t
|
||||
JointMotion_t
|
||||
JumpCorrectionMethod
|
||||
LatchDirtyPermission_t
|
||||
LayoutPositionType_e
|
||||
LessonPanelLayoutFileTypes_t
|
||||
LifeState_t
|
||||
MaterialProxyType_t
|
||||
Materials
|
||||
MatterialAttributeTagType_t
|
||||
MedalRank_t
|
||||
MeshDrawPrimitiveFlags_t
|
||||
MissingParentInheritBehavior_t
|
||||
ModelBoneFlexComponent_t
|
||||
ModelConfigAttachmentType_t
|
||||
ModelSkeletonData_t__BoneFlags_t
|
||||
ModifyDamageReturn_t
|
||||
MoodType_t
|
||||
MorphBundleType_t
|
||||
MorphFlexControllerRemapType_t
|
||||
MoveCollide_t
|
||||
MoveLinearAuthoredPos_t
|
||||
MoveMountingAmount_t
|
||||
MoveType_t
|
||||
NavAttributeEnum
|
||||
NavDirType
|
||||
ObjectTypeFlags_t
|
||||
ObserverInterpState_t
|
||||
ObserverMode_t
|
||||
OnFrame
|
||||
PFNoiseModifier_t
|
||||
PFNoiseTurbulence_t
|
||||
PFNoiseType_t
|
||||
PFuncVisualizationType_t
|
||||
ParticleAlphaReferenceType_t
|
||||
ParticleAttachment_t
|
||||
ParticleCollisionMode_t
|
||||
ParticleColorBlendMode_t
|
||||
ParticleColorBlendType_t
|
||||
ParticleControlPointAxis_t
|
||||
ParticleDepthFeatheringMode_t
|
||||
ParticleDetailLevel_t
|
||||
ParticleDirectionNoiseType_t
|
||||
ParticleEndcapMode_t
|
||||
ParticleFalloffFunction_t
|
||||
ParticleFloatBiasType_t
|
||||
ParticleFloatInputMode_t
|
||||
ParticleFloatMapType_t
|
||||
ParticleFloatRandomMode_t
|
||||
ParticleFloatType_t
|
||||
ParticleFogType_t
|
||||
ParticleHitboxBiasType_t
|
||||
ParticleHitboxDataSelection_t
|
||||
ParticleImpulseType_t
|
||||
ParticleLightBehaviorChoiceList_t
|
||||
ParticleLightFogLightingMode_t
|
||||
ParticleLightTypeChoiceList_t
|
||||
ParticleLightUnitChoiceList_t
|
||||
ParticleLightingQuality_t
|
||||
ParticleLightnintBranchBehavior_t
|
||||
ParticleModelType_t
|
||||
ParticleOmni2LightTypeChoiceList_t
|
||||
ParticleOrientationChoiceList_t
|
||||
ParticleOrientationSetMode_t
|
||||
ParticleOutputBlendMode_t
|
||||
ParticleParentSetMode_t
|
||||
ParticlePinDistance_t
|
||||
ParticlePostProcessPriorityGroup_t
|
||||
ParticleRotationLockType_t
|
||||
ParticleSelection_t
|
||||
ParticleSequenceCropOverride_t
|
||||
ParticleSetMethod_t
|
||||
ParticleSortingChoiceList_t
|
||||
ParticleTextureLayerBlendType_t
|
||||
ParticleTopology_t
|
||||
ParticleTraceMissBehavior_t
|
||||
ParticleTraceSet_t
|
||||
ParticleTransformType_t
|
||||
ParticleVRHandChoiceList_t
|
||||
ParticleVecType_t
|
||||
PerformanceMode_t
|
||||
PermModelInfo_t__FlagEnum
|
||||
PetGroundType_t
|
||||
PlayerAnimEvent_t
|
||||
PlayerConnectedState
|
||||
PointTemplateClientOnlyEntityBehavior_t
|
||||
PointTemplateOwnerSpawnGroupType_t
|
||||
PointWorldTextJustifyHorizontal_t
|
||||
PointWorldTextJustifyVertical_t
|
||||
PointWorldTextReorientMode_t
|
||||
PoseType_t
|
||||
PropDoorRotatingOpenDirection_e
|
||||
PropDoorRotatingSpawnPos_t
|
||||
PulseInstructionCode_t
|
||||
PulseMethodCallMode_t
|
||||
PulseValueType_t
|
||||
QuestProgress__Reason
|
||||
RagdollPoseControl
|
||||
RenderBufferFlags_t
|
||||
RenderFx_t
|
||||
RenderMode_t
|
||||
RenderMultisampleType_t
|
||||
RenderPrimitiveType_t
|
||||
RenderSlotType_t
|
||||
ResetCycleOption
|
||||
RumbleEffect_t
|
||||
ScalarExpressionType_t
|
||||
SceneOnPlayerDeath_t
|
||||
ScriptedConflictResponse_t
|
||||
ScriptedMoveTo_t
|
||||
ScriptedMoveType_t
|
||||
ScriptedOnDeath_t
|
||||
SelectorTagBehavior_t
|
||||
SeqCmd_t
|
||||
SeqPoseSetting_t
|
||||
ShadowType_t
|
||||
ShakeCommand_t
|
||||
ShardSolid_t
|
||||
ShatterDamageCause
|
||||
ShatterGlassStressType
|
||||
ShatterPanelMode
|
||||
SimpleConstraintSoundProfile__SimpleConstraintsSoundProfileKeypoints_t
|
||||
SolidType_t
|
||||
SolveIKChainAnimNodeDebugSetting
|
||||
SosActionSortType_t
|
||||
SosActionStopType_t
|
||||
SosEditItemType_t
|
||||
SosGroupType_t
|
||||
SoundEventStartType_t
|
||||
SoundFlags_t
|
||||
SpawnDebugOverrideState_t
|
||||
SpawnDebugRestrictionOverrideState_t
|
||||
SpawnPointCoopEnemy__BotDefaultBehavior_t
|
||||
SpriteCardPerParticleScale_t
|
||||
SpriteCardShaderType_t
|
||||
SpriteCardTextureChannel_t
|
||||
SpriteCardTextureType_t
|
||||
StanceOverrideMode
|
||||
StanceType_t
|
||||
StandardLightingAttenuationStyle_t
|
||||
StateActionBehavior
|
||||
StepPhase
|
||||
SubclassVDataChangeType_t
|
||||
SurroundingBoundsType_t
|
||||
TOGGLE_STATE
|
||||
TRAIN_CODE
|
||||
TakeDamageFlags_t
|
||||
TextureRepetitionMode_t
|
||||
ThreeState_t
|
||||
TimelineCompression_t
|
||||
Touch_t
|
||||
TrackOrientationType_t
|
||||
TrainOrientationType_t
|
||||
TrainVelocityType_t
|
||||
VMixChannelOperation_t
|
||||
VMixFilterSlope_t
|
||||
VMixFilterType_t
|
||||
VMixLFOShape_t
|
||||
VMixPannerType_t
|
||||
VMixProcessorType_t
|
||||
VMixSubgraphSwitchInterpolationType_t
|
||||
VPhysXAggregateData_t__VPhysXFlagEnum_t
|
||||
VPhysXBodyPart_t__VPhysXFlagEnum_t
|
||||
VPhysXConstraintParams_t__EnumFlags0_t
|
||||
VPhysXJoint_t__Flags_t
|
||||
ValueRemapperHapticsType_t
|
||||
ValueRemapperInputType_t
|
||||
ValueRemapperMomentumType_t
|
||||
ValueRemapperOutputType_t
|
||||
ValueRemapperRatchetType_t
|
||||
VectorExpressionType_t
|
||||
VectorFloatExpressionType_t
|
||||
VelocityMetricMode
|
||||
VertJustification_e
|
||||
ViewFadeMode_t
|
||||
WaterLevel_t
|
||||
WeaponAttackType_t
|
||||
WeaponSound_t
|
||||
WorldTextPanelHorizontalAlign_t
|
||||
WorldTextPanelOrientation_t
|
||||
WorldTextPanelVerticalAlign_t
|
||||
attributeprovidertypes_t
|
||||
doorCheck_e
|
||||
fieldtype_t
|
||||
filter_t
|
||||
gear_slot_t
|
||||
loadout_slot_t
|
||||
navproperties_t
|
||||
soundlevel_t
|
||||
vote_create_failed_t
|
||||
ActionType_t
|
||||
AimMatrixBlendMode
|
||||
AmmoFlags_t
|
||||
AmmoPosition_t
|
||||
AnimationProcessingType_t
|
||||
AnimationSnapshotType_t
|
||||
AnimationType_t
|
||||
AnimLoopMode_t
|
||||
AnimNodeNetworkMode
|
||||
AnimParamButton_t
|
||||
AnimParamNetworkSetting
|
||||
AnimParamType_t
|
||||
AnimPoseControl
|
||||
AnimScriptType
|
||||
AnimValueSource
|
||||
AnimVectorSource
|
||||
attributeprovidertypes_t
|
||||
BaseExplosionTypes_t
|
||||
BBoxVolumeType_t
|
||||
BeamClipStyle_t
|
||||
BeamType_t
|
||||
BeginDeathLifeStateTransition_t
|
||||
BinaryNodeChildOption
|
||||
BinaryNodeTiming
|
||||
Blend2DMode
|
||||
BlendKeyType
|
||||
BloomBlendMode_t
|
||||
BlurFilterType_t
|
||||
BoneMaskBlendSpace
|
||||
BoneTransformSpace_t
|
||||
BrushSolidities_e
|
||||
C4LightEffect_t
|
||||
CAnimationGraphVisualizerPrimitiveType
|
||||
CanPlaySequence_t
|
||||
ChatIgnoreType_t
|
||||
ChickenActivity
|
||||
ChoiceBlendMethod
|
||||
ChoiceChangeMethod
|
||||
ChoiceMethod
|
||||
Class_T
|
||||
CLogicBranchList__LogicBranchListenerLastState_t
|
||||
ClosestPointTestType_t
|
||||
CNmBoneMask__WeightInfo_t
|
||||
CommandEntitySpecType_t
|
||||
CommandExecMode_t
|
||||
CompMatPropertyMutatorConditionType_t
|
||||
CompMatPropertyMutatorType_t
|
||||
CompositeMaterialInputContainerSourceType_t
|
||||
CompositeMaterialInputLooseVariableType_t
|
||||
CompositeMaterialInputTextureType_t
|
||||
CompositeMaterialMatchFilterType_t
|
||||
CompositeMaterialVarSystemVar_t
|
||||
CRR_Response__ResponseEnum_t
|
||||
CSPlayerBlockingUseAction_t
|
||||
CSPlayerState
|
||||
CSWeaponCategory
|
||||
CSWeaponMode
|
||||
CSWeaponSilencerType
|
||||
CSWeaponState_t
|
||||
CSWeaponType
|
||||
DamageTypes_t
|
||||
DampingSpeedFunction
|
||||
DebugOverlayBits_t
|
||||
Detail2Combo_t
|
||||
DetailCombo_t
|
||||
DisableShadows_t
|
||||
Disposition_t
|
||||
doorCheck_e
|
||||
DoorState_t
|
||||
EDemoBoneSelectionMode
|
||||
EInButtonState
|
||||
EKillTypes_t
|
||||
ELayoutNodeType
|
||||
EntFinderMethod_t
|
||||
EntityDisolveType_t
|
||||
EntityDormancyType_t
|
||||
EntityIOTargetType_t
|
||||
EntitySubclassScope_t
|
||||
EOverrideBlockLOS_t
|
||||
EStyleNodeType
|
||||
Explosions
|
||||
FacingMode
|
||||
FieldNetworkOption
|
||||
fieldtype_t
|
||||
filter_t
|
||||
FixAngleSet_t
|
||||
FlexOpCode_t
|
||||
FootFallTagFoot_t
|
||||
FootLockSubVisualization
|
||||
FootPinningTimingSource
|
||||
FootstepLandedFootSoundType_t
|
||||
ForcedCrouchState_t
|
||||
FuncDoorSpawnPos_t
|
||||
FuseVariableAccess_t
|
||||
FuseVariableType_t
|
||||
GameAnimEventIndex_t
|
||||
gear_slot_t
|
||||
GrenadeType_t
|
||||
HierarchyType_t
|
||||
HitboxLerpType_t
|
||||
HitGroup_t
|
||||
HorizJustification_e
|
||||
Hull_t
|
||||
IChoreoServices__ChoreoState_t
|
||||
IChoreoServices__ScriptState_t
|
||||
IKChannelMode
|
||||
IkEndEffectorType
|
||||
IKSolverType
|
||||
IKTargetCoordinateSystem
|
||||
IKTargetSource
|
||||
IkTargetType
|
||||
InheritableBoolType_t
|
||||
InputBitMask_t
|
||||
InputLayoutVariation_t
|
||||
ItemFlagTypes_t
|
||||
JiggleBoneSimSpace
|
||||
JointAxis_t
|
||||
JointMotion_t
|
||||
JumpCorrectionMethod
|
||||
LatchDirtyPermission_t
|
||||
LayoutPositionType_e
|
||||
LessonPanelLayoutFileTypes_t
|
||||
LifeState_t
|
||||
loadout_slot_t
|
||||
MaterialProxyType_t
|
||||
Materials
|
||||
MatterialAttributeTagType_t
|
||||
MedalRank_t
|
||||
MeshDrawPrimitiveFlags_t
|
||||
MissingParentInheritBehavior_t
|
||||
ModelBoneFlexComponent_t
|
||||
ModelConfigAttachmentType_t
|
||||
ModelSkeletonData_t__BoneFlags_t
|
||||
ModifyDamageReturn_t
|
||||
MoodType_t
|
||||
MorphBundleType_t
|
||||
MorphFlexControllerRemapType_t
|
||||
MoveCollide_t
|
||||
MoveLinearAuthoredPos_t
|
||||
MovementGait_t
|
||||
MoveMountingAmount_t
|
||||
MoveType_t
|
||||
NavAttributeEnum
|
||||
NavDirType
|
||||
navproperties_t
|
||||
NmFootPhase_t
|
||||
NmFootPhaseCondition_t
|
||||
NmFrameSnapEventMode_t
|
||||
NmTransitionRule_t
|
||||
NmTransitionRuleCondition_t
|
||||
NPCFollowFormation_t
|
||||
NPCLookType_t
|
||||
ObjectTypeFlags_t
|
||||
ObserverInterpState_t
|
||||
ObserverMode_t
|
||||
OnFrame
|
||||
ParticleAlphaReferenceType_t
|
||||
ParticleAttachment_t
|
||||
ParticleAttrBoxFlags_t
|
||||
ParticleCollisionMode_t
|
||||
ParticleColorBlendMode_t
|
||||
ParticleColorBlendType_t
|
||||
ParticleControlPointAxis_t
|
||||
ParticleDepthFeatheringMode_t
|
||||
ParticleDetailLevel_t
|
||||
ParticleDirectionNoiseType_t
|
||||
ParticleEndcapMode_t
|
||||
ParticleFalloffFunction_t
|
||||
ParticleFloatBiasType_t
|
||||
ParticleFloatInputMode_t
|
||||
ParticleFloatMapType_t
|
||||
ParticleFloatRandomMode_t
|
||||
ParticleFloatType_t
|
||||
ParticleFogType_t
|
||||
ParticleHitboxBiasType_t
|
||||
ParticleHitboxDataSelection_t
|
||||
ParticleImpulseType_t
|
||||
ParticleLightBehaviorChoiceList_t
|
||||
ParticleLightFogLightingMode_t
|
||||
ParticleLightingQuality_t
|
||||
ParticleLightnintBranchBehavior_t
|
||||
ParticleLightTypeChoiceList_t
|
||||
ParticleLightUnitChoiceList_t
|
||||
ParticleModelType_t
|
||||
ParticleOmni2LightTypeChoiceList_t
|
||||
ParticleOrientationChoiceList_t
|
||||
ParticleOrientationSetMode_t
|
||||
ParticleOutputBlendMode_t
|
||||
ParticleParentSetMode_t
|
||||
ParticlePinDistance_t
|
||||
ParticlePostProcessPriorityGroup_t
|
||||
ParticleRotationLockType_t
|
||||
ParticleSelection_t
|
||||
ParticleSequenceCropOverride_t
|
||||
ParticleSetMethod_t
|
||||
ParticleSortingChoiceList_t
|
||||
ParticleTextureLayerBlendType_t
|
||||
ParticleTopology_t
|
||||
ParticleTraceMissBehavior_t
|
||||
ParticleTraceSet_t
|
||||
ParticleTransformType_t
|
||||
ParticleVecType_t
|
||||
ParticleVRHandChoiceList_t
|
||||
PerformanceMode_t
|
||||
PermModelInfo_t__FlagEnum
|
||||
PetGroundType_t
|
||||
PFNoiseModifier_t
|
||||
PFNoiseTurbulence_t
|
||||
PFNoiseType_t
|
||||
PFuncVisualizationType_t
|
||||
PlayerAnimEvent_t
|
||||
PlayerConnectedState
|
||||
PointTemplateClientOnlyEntityBehavior_t
|
||||
PointTemplateOwnerSpawnGroupType_t
|
||||
PointWorldTextJustifyHorizontal_t
|
||||
PointWorldTextJustifyVertical_t
|
||||
PointWorldTextReorientMode_t
|
||||
PoseType_t
|
||||
PreviewCharacterMode
|
||||
PreviewEOMCelebration
|
||||
PreviewWeaponState
|
||||
PropDoorRotatingOpenDirection_e
|
||||
PropDoorRotatingSpawnPos_t
|
||||
PulseCursorCancelPriority_t
|
||||
PulseCursorExecResult_t
|
||||
PulseInstructionCode_t
|
||||
PulseMethodCallMode_t
|
||||
PulseTestEnumColor_t
|
||||
PulseTestEnumShape_t
|
||||
PulseValueType_t
|
||||
QuestProgress__Reason
|
||||
RagdollPoseControl
|
||||
RenderBufferFlags_t
|
||||
RenderFx_t
|
||||
RenderMode_t
|
||||
RenderMultisampleType_t
|
||||
RenderPrimitiveType_t
|
||||
RenderSlotType_t
|
||||
ResetCycleOption
|
||||
RumbleEffect_t
|
||||
ScalarExpressionType_t
|
||||
SceneOnPlayerDeath_t
|
||||
ScriptedConflictResponse_t
|
||||
ScriptedMoveTo_t
|
||||
ScriptedMoveType_t
|
||||
ScriptedOnDeath_t
|
||||
SelectorTagBehavior_t
|
||||
SeqCmd_t
|
||||
SeqPoseSetting_t
|
||||
SequenceFinishNotifyState_t
|
||||
ShadowType_t
|
||||
ShakeCommand_t
|
||||
ShardSolid_t
|
||||
ShatterDamageCause
|
||||
ShatterGlassStressType
|
||||
ShatterPanelMode
|
||||
SimpleConstraintSoundProfile__SimpleConstraintsSoundProfileKeypoints_t
|
||||
SnapshotIndexType_t
|
||||
SolidType_t
|
||||
SolveIKChainAnimNodeDebugSetting
|
||||
SosActionSortType_t
|
||||
SosActionStopType_t
|
||||
SosEditItemType_t
|
||||
SosGroupType_t
|
||||
SoundEventStartType_t
|
||||
SoundFlags_t
|
||||
soundlevel_t
|
||||
SpawnDebugOverrideState_t
|
||||
SpawnDebugRestrictionOverrideState_t
|
||||
SpawnPointCoopEnemy__BotDefaultBehavior_t
|
||||
SpriteCardPerParticleScale_t
|
||||
SpriteCardShaderType_t
|
||||
SpriteCardTextureChannel_t
|
||||
SpriteCardTextureType_t
|
||||
StanceOverrideMode
|
||||
StanceType_t
|
||||
StandardLightingAttenuationStyle_t
|
||||
StateActionBehavior
|
||||
StepPhase
|
||||
SubclassVDataChangeType_t
|
||||
SurroundingBoundsType_t
|
||||
TakeDamageFlags_t
|
||||
TextureRepetitionMode_t
|
||||
ThreeState_t
|
||||
TimelineCompression_t
|
||||
TOGGLE_STATE
|
||||
Touch_t
|
||||
TrackOrientationType_t
|
||||
TRAIN_CODE
|
||||
TrainOrientationType_t
|
||||
TrainVelocityType_t
|
||||
ValueRemapperHapticsType_t
|
||||
ValueRemapperInputType_t
|
||||
ValueRemapperMomentumType_t
|
||||
ValueRemapperOutputType_t
|
||||
ValueRemapperRatchetType_t
|
||||
VectorExpressionType_t
|
||||
VectorFloatExpressionType_t
|
||||
VelocityMetricMode
|
||||
VertJustification_e
|
||||
ViewFadeMode_t
|
||||
VMixChannelOperation_t
|
||||
VMixFilterSlope_t
|
||||
VMixFilterType_t
|
||||
VMixLFOShape_t
|
||||
VMixPannerType_t
|
||||
VMixProcessorType_t
|
||||
VMixSubgraphSwitchInterpolationType_t
|
||||
vote_create_failed_t
|
||||
VPhysXAggregateData_t__VPhysXFlagEnum_t
|
||||
VPhysXBodyPart_t__VPhysXFlagEnum_t
|
||||
VPhysXConstraintParams_t__EnumFlags0_t
|
||||
VPhysXJoint_t__Flags_t
|
||||
WaterLevel_t
|
||||
WeaponAttackType_t
|
||||
WeaponSound_t
|
||||
WeaponSwitchReason_t
|
||||
WorldTextPanelHorizontalAlign_t
|
||||
WorldTextPanelOrientation_t
|
||||
WorldTextPanelVerticalAlign_t
|
||||
1
configs/addons/counterstrikesharp/shared/README.md
Normal file
1
configs/addons/counterstrikesharp/shared/README.md
Normal file
@@ -0,0 +1 @@
|
||||
This folder should contain any shared APIs, in the same DLL structure as the plugins folder (MySharedApi/MySharedApi.dll)
|
||||
67
docfx/docs/features/shared-plugin-api.md
Normal file
67
docfx/docs/features/shared-plugin-api.md
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
title: Shared Plugin API (Capabilities)
|
||||
description: How to add inter-plugin communication to CounterStrikeSharp plugins.
|
||||
---
|
||||
|
||||
# Shared Plugin API
|
||||
|
||||
How to expose and use shared plugin APIs between multiple plugins.
|
||||
|
||||
## Creating a Contract Library
|
||||
|
||||
Inter-plugin communication requires a contract/shared library that simply exposes the shape of the API, using simple interfaces. e.g.
|
||||
|
||||
```csharp
|
||||
public interface IBalanceHandler
|
||||
{
|
||||
decimal Balance { get; }
|
||||
|
||||
// These are just here to show that you can have methods on your shared types.
|
||||
// You could also add a Setter to the Balance property.
|
||||
public decimal Add(decimal amount);
|
||||
public decimal Subtract(decimal amount);
|
||||
}
|
||||
```
|
||||
|
||||
This library ideally should not contain any business logic, and simply define the schema for callers.
|
||||
|
||||
This library should be placed in the `shared` subfolder, in the same folder layout as the plugins folder. So if a contract DLL is named `MySharedApi.dll` its file path should be: `shared/MySharedApi/MySharedApi.dll`.
|
||||
|
||||
## Creating a Capability
|
||||
|
||||
A capability can be declared with a simple static variable in your plugin class. A `PlayerCapability` is a player specific capability, and a `PluginCapability` is generic functionality that a plugin can expose.
|
||||
|
||||
```csharp
|
||||
public static PlayerCapability<IBalanceHandler> BalanceCapability { get; } = new("myplugin:balance");
|
||||
|
||||
public static PluginCapability<IBalanceService> BalanceServiceCapability { get; } = new("myplugin:balance_service");
|
||||
```
|
||||
|
||||
For every plugin that wishes to use this new "Balance API", they must ensure they create a capability using the shared API interface (`IBalanceHandler`), as well as use the same name (`myplugin:balance`).
|
||||
|
||||
## Registering a Capability
|
||||
|
||||
If you are the plugin that is expected to provide the basis of the API (i.e. you are providing a currency/balance plugin which does nothing except store users balances), then you will need to provide the implementation that other callers will use. This is done through the use of static members on the `Capabilities` class:
|
||||
|
||||
```csharp
|
||||
// Player capabilities are given the calling player context
|
||||
Capabilities.RegisterPlayerCapability(BalanceCapability, player => new BalanceHandler(player));
|
||||
|
||||
// Plugin capabilities can simply return an instance of the interface
|
||||
Capabilities.RegisterPluginCapability(BalanceServiceCapability, () => new BalanceService());
|
||||
```
|
||||
|
||||
### Using Capabilities
|
||||
|
||||
To utilise a capability, simply call the `.Get()` method provided on the static capability you declared earlier, i.e.
|
||||
|
||||
```csharp
|
||||
var balance = BalanceCapability.Get(player);
|
||||
var balanceService = BalanceServiceCapability.Get();
|
||||
|
||||
if (balance == null) return;
|
||||
|
||||
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.
|
||||
@@ -9,3 +9,6 @@
|
||||
|
||||
- name: Global Listeners
|
||||
href: global-listeners.md
|
||||
|
||||
- name: Shared Plugin API
|
||||
href: shared-plugin-api.md
|
||||
|
||||
5
docfx/examples/WithFakeConvars.md
Normal file
5
docfx/examples/WithFakeConvars.md
Normal file
@@ -0,0 +1,5 @@
|
||||
[!INCLUDE [WithFakeConvars](../../examples/WithFakeConvars/README.md)]
|
||||
|
||||
<a href="https://github.com/roflmuffin/CounterStrikeSharp/tree/main/examples/WithFakeConvars" class="btn btn-secondary">View project on Github <i class="bi bi-github"></i></a>
|
||||
|
||||
[!code-csharp[](../../examples/WithFakeConvars/WithFakeConvarsPlugin.cs)]
|
||||
11
docfx/examples/WithSharedTypes.md
Normal file
11
docfx/examples/WithSharedTypes.md
Normal file
@@ -0,0 +1,11 @@
|
||||
[!INCLUDE [WithSharedTypes](../../examples/WithSharedTypes/README.md)]
|
||||
|
||||
<a href="https://github.com/roflmuffin/CounterStrikeSharp/tree/main/examples/WithSharedTypes" class="btn btn-secondary">View project on Github <i class="bi bi-github"></i></a>
|
||||
|
||||
[!code-csharp[](../../examples/WithSharedTypes/WithSharedTypesPlugin.cs)]
|
||||
|
||||
[!INCLUDE [WithSharedTypesConsumer](../../examples/WithSharedTypesConsumer/README.md)]
|
||||
|
||||
<a href="https://github.com/roflmuffin/CounterStrikeSharp/tree/main/examples/WithSharedTypesConsumer" class="btn btn-secondary">View project on Github <i class="bi bi-github"></i></a>
|
||||
|
||||
[!code-csharp[](../../examples/WithSharedTypesConsumer/WithSharedTypesConsumerPlugin.cs)]
|
||||
@@ -3,6 +3,8 @@ items:
|
||||
href: HelloWorld.md
|
||||
- name: Commands
|
||||
href: WithCommands.md
|
||||
- name: Fake ConVars
|
||||
href: WithFakeConvars.md
|
||||
- name: Config
|
||||
href: WithConfig.md
|
||||
- name: Dependency Injection
|
||||
@@ -13,6 +15,8 @@ items:
|
||||
href: WithGameEventHandlers.md
|
||||
- name: Database (Dapper)
|
||||
href: WithDatabase.md
|
||||
- name: Shared Plugin Types
|
||||
href: WithSharedTypes.md
|
||||
- name: Translations
|
||||
href: WithTranslations.md
|
||||
- name: Voice Overrides
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace MySharedTypes.Contracts;
|
||||
|
||||
public interface IBalanceHandler
|
||||
{
|
||||
decimal Balance { get; }
|
||||
|
||||
// These are just here to show that you can have methods on your shared types.
|
||||
// You could also add a Setter to the Balance property.
|
||||
public decimal Add(decimal amount);
|
||||
public decimal Subtract(decimal amount);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace MySharedTypes.Contracts;
|
||||
|
||||
public interface IBalanceService
|
||||
{
|
||||
public void ClearAllBalances();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
9
examples/WithFakeConvars/ConVars.cs
Normal file
9
examples/WithFakeConvars/ConVars.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using CounterStrikeSharp.API.Modules.Cvars;
|
||||
|
||||
namespace WithFakeConvars;
|
||||
|
||||
public static class ConVars
|
||||
{
|
||||
// This convar is registered from the plugin instance but can be used anywhere.
|
||||
public static FakeConVar<int> ExampleStaticCvar = new("example_static", "An example static cvar");
|
||||
}
|
||||
21
examples/WithFakeConvars/EvenNumberValidator.cs
Normal file
21
examples/WithFakeConvars/EvenNumberValidator.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using CounterStrikeSharp.API.Modules.Cvars.Validators;
|
||||
|
||||
namespace WithFakeConvars;
|
||||
|
||||
// This is an example of a custom validator that checks if a number is even.
|
||||
public class EvenNumberValidator : IValidator<int>
|
||||
{
|
||||
public bool Validate(int value, out string? errorMessage)
|
||||
{
|
||||
if (value % 2 == 0)
|
||||
{
|
||||
errorMessage = null;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
errorMessage = "Value must be an even number";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
examples/WithFakeConvars/README.md
Normal file
2
examples/WithFakeConvars/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# With Fake Convars
|
||||
This is an example that shows how to register "fake" convars, which are actually console commands that track their internal state.
|
||||
12
examples/WithFakeConvars/WithFakeConvars.csproj
Normal file
12
examples/WithFakeConvars/WithFakeConvars.csproj
Normal file
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\managed\CounterStrikeSharp.API\CounterStrikeSharp.API.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
58
examples/WithFakeConvars/WithFakeConvarsPlugin.cs
Normal file
58
examples/WithFakeConvars/WithFakeConvarsPlugin.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using CounterStrikeSharp.API;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
using CounterStrikeSharp.API.Modules.Cvars;
|
||||
using CounterStrikeSharp.API.Modules.Cvars.Validators;
|
||||
|
||||
namespace WithFakeConvars;
|
||||
|
||||
[MinimumApiVersion(175)]
|
||||
public class WithFakeConvarsPlugin : BasePlugin
|
||||
{
|
||||
public override string ModuleName => "Example: With Fake Convars";
|
||||
public override string ModuleVersion => "1.0.0";
|
||||
public override string ModuleAuthor => "CounterStrikeSharp & Contributors";
|
||||
public override string ModuleDescription => "A simple plugin that registers some console variables";
|
||||
|
||||
// FakeConVar is a class that can be used to create custom console variables.
|
||||
// You can specify a name, description, default value, and custom validators.
|
||||
public FakeConVar<bool> BoolCvar = new("example_bool", "An example boolean cvar", true);
|
||||
|
||||
// Range validator is an inbuilt validator that can be used to ensure that a value is within a certain range.
|
||||
public FakeConVar<int> ExampleIntCvar = new("example_int", "An example integer cvar", 10, flags: ConVarFlags.FCVAR_NONE, new RangeValidator<int>(0, 100));
|
||||
|
||||
public FakeConVar<float> ExampleFloatCvar = new("example_float", "An example float cvar", 10, flags: ConVarFlags.FCVAR_NONE, new RangeValidator<float>(5, 20));
|
||||
public FakeConVar<string> ExampleStringCvar = new("example_string", "An example string cvar", "default");
|
||||
|
||||
// Replicated, Cheat & Protected flags are supported.
|
||||
public FakeConVar<float> ExamplePublicCvar = new("example_public_float", "An example public float cvar", 5,
|
||||
ConVarFlags.FCVAR_REPLICATED);
|
||||
|
||||
// Can only be changed if sv_cheats is enabled.
|
||||
public FakeConVar<float> ExampleCheatCvar = new("example_cheat_float", "An example cheat float cvar", 5,
|
||||
ConVarFlags.FCVAR_CHEAT);
|
||||
|
||||
// Protected cvars do not output their value when queried.
|
||||
public FakeConVar<float> ExampleProtectedCvar = new("example_protected_float", "An example cheat float cvar", 5,
|
||||
ConVarFlags.FCVAR_PROTECTED);
|
||||
|
||||
// You can create your own custom validators by implementing the IValidator interface.
|
||||
public FakeConVar<int> ExampleEvenNumberCvar = new("example_even_number", "An example even number cvar", 0, flags: ConVarFlags.FCVAR_NONE, new EvenNumberValidator());
|
||||
|
||||
public FakeConVar<int> RequiresRestartCvar = new("example_requires_restart", "A cvar that requires a restart when changed");
|
||||
|
||||
public override void Load(bool hotReload)
|
||||
{
|
||||
// You can subscribe to the ValueChanged event to execute code when the value of a cvar changes.
|
||||
// In this example, we restart the game when the value of RequiresRestartCvar is greater than 5.
|
||||
RequiresRestartCvar.ValueChanged += (sender, value) =>
|
||||
{
|
||||
if (value > 5)
|
||||
{
|
||||
Server.ExecuteCommand("mp_restartgame 1");
|
||||
}
|
||||
};
|
||||
|
||||
RegisterFakeConVars(typeof(ConVars));
|
||||
}
|
||||
}
|
||||
33
examples/WithSharedTypes/BalanceHandler.cs
Normal file
33
examples/WithSharedTypes/BalanceHandler.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using MySharedTypes.Contracts;
|
||||
|
||||
namespace WithSharedTypes;
|
||||
|
||||
public class BalanceHandler : IBalanceHandler
|
||||
{
|
||||
private readonly CCSPlayerController _player;
|
||||
|
||||
// This could be a database, a file, or a dictionary like this.
|
||||
internal static readonly Dictionary<CCSPlayerController, decimal> Balances = new();
|
||||
|
||||
public BalanceHandler(CCSPlayerController player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
public decimal Balance
|
||||
{
|
||||
get => Balances.TryGetValue(_player, out var balance) ? balance : 0;
|
||||
set => Balances[_player] = value;
|
||||
}
|
||||
|
||||
public decimal Add(decimal amount)
|
||||
{
|
||||
return Balance += amount;
|
||||
}
|
||||
|
||||
public decimal Subtract(decimal amount)
|
||||
{
|
||||
return Balance -= amount;
|
||||
}
|
||||
}
|
||||
11
examples/WithSharedTypes/BalanceService.cs
Normal file
11
examples/WithSharedTypes/BalanceService.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using MySharedTypes.Contracts;
|
||||
|
||||
namespace WithSharedTypes;
|
||||
|
||||
public class BalanceService : IBalanceService
|
||||
{
|
||||
public void ClearAllBalances()
|
||||
{
|
||||
BalanceHandler.Balances.Clear();
|
||||
}
|
||||
}
|
||||
5
examples/WithSharedTypes/README.md
Normal file
5
examples/WithSharedTypes/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# With Shared Types (Capabilities)
|
||||
|
||||
An example plugin that exposes a balance contract library, to use as a shared library between multiple plugins.
|
||||
|
||||
This allows one plugin to expose a capability for a player or plugin, and other plugins to use the exposed API.
|
||||
13
examples/WithSharedTypes/WithSharedTypes.csproj
Normal file
13
examples/WithSharedTypes/WithSharedTypes.csproj
Normal file
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\managed\CounterStrikeSharp.API\CounterStrikeSharp.API.csproj" />
|
||||
<ProjectReference Include="..\MySharedTypes.Contracts\MySharedTypes.Contracts\MySharedTypes.Contracts.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
57
examples/WithSharedTypes/WithSharedTypesPlugin.cs
Normal file
57
examples/WithSharedTypes/WithSharedTypesPlugin.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
using CounterStrikeSharp.API.Core.Capabilities;
|
||||
using MySharedTypes.Contracts;
|
||||
|
||||
namespace WithSharedTypes;
|
||||
|
||||
[MinimumApiVersion(143)]
|
||||
public class WithSharedTypesPlugin : BasePlugin
|
||||
{
|
||||
public override string ModuleName => "Example: Shared Types";
|
||||
public override string ModuleVersion => "1.0.0";
|
||||
public override string ModuleAuthor => "CounterStrikeSharp & Contributors";
|
||||
public override string ModuleDescription => "A simple plugin that shares types between multiple plugins";
|
||||
|
||||
// Declares a player capability, that stores some sort of functionality for a player.
|
||||
// In this case, it's a balance handler, which is used to store a player's balance.
|
||||
// Note that we use the same name for the capability as the one in the other plugin.
|
||||
// IBalanceHandler is defined in MySharedTypes.Contracts, which is a shared library and placed in the `shared/` subfolder.
|
||||
public static PlayerCapability<IBalanceHandler> BalanceCapability { get; } = new("myplugin:balance");
|
||||
|
||||
// Declares a player capability of a primitive type, in this case, a decimal.
|
||||
public static PlayerCapability<Decimal> BalanceCapabilityDecimal { get; } = new("myplugin:balance_decimal");
|
||||
|
||||
// Plugin capabilities are similar to player capabilities, but they are not tied to a player, and are just generic APIs
|
||||
// that are exposed by a plugin. In this case, we expose a balance service, which is used to clear all balances.
|
||||
public static PluginCapability<IBalanceService> BalanceServiceCapability { get; } = new("myplugin:balance_service");
|
||||
|
||||
public override void Load(bool hotReload)
|
||||
{
|
||||
// Register the capability implementations here. Note that plugins don't need to register an implementation if it is already implemented in another plugin.
|
||||
Capabilities.RegisterPlayerCapability(BalanceCapability, player => new BalanceHandler(player));
|
||||
Capabilities.RegisterPluginCapability(BalanceServiceCapability, () => new BalanceService());
|
||||
Capabilities.RegisterPlayerCapability(BalanceCapabilityDecimal, (player) => new BalanceHandler(player).Balance);
|
||||
|
||||
AddCommand("css_balance", "Gets your current balance", (player, info) =>
|
||||
{
|
||||
if (player == null) return;
|
||||
player.PrintToChat($"Your balance is {BalanceCapability.Get(player)?.Balance}");
|
||||
});
|
||||
|
||||
AddCommand("css_give", "Gives you money", (player, info) =>
|
||||
{
|
||||
if (player == null) return;
|
||||
|
||||
var balance = BalanceCapability.Get(player);
|
||||
if (balance == null) return;
|
||||
|
||||
balance.Add(100);
|
||||
player.PrintToChat($"Your balance is now {balance.Balance}");
|
||||
});
|
||||
}
|
||||
|
||||
public override void Unload(bool hotReload)
|
||||
{
|
||||
}
|
||||
}
|
||||
2
examples/WithSharedTypesConsumer/README.md
Normal file
2
examples/WithSharedTypesConsumer/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# With Shared Types (Consumer Plugin)
|
||||
Uses the decimal balance shared library.
|
||||
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\managed\CounterStrikeSharp.API\CounterStrikeSharp.API.csproj" />
|
||||
<ProjectReference Include="..\MySharedTypes.Contracts\MySharedTypes.Contracts\MySharedTypes.Contracts.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,56 @@
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
using CounterStrikeSharp.API.Core.Capabilities;
|
||||
using CounterStrikeSharp.API.Core.Plugin;
|
||||
using MySharedTypes.Contracts;
|
||||
|
||||
namespace WithSharedTypesConsumer;
|
||||
|
||||
[MinimumApiVersion(142)]
|
||||
public class WithSharedTypesConsumerPlugin : BasePlugin
|
||||
{
|
||||
public override string ModuleName => "Example: Shared Types (Consumer)";
|
||||
public override string ModuleVersion => "1.0.0";
|
||||
public override string ModuleAuthor => "CounterStrikeSharp & Contributors";
|
||||
public override string ModuleDescription => "A simple plugin that utilises the balance api from another plugin";
|
||||
|
||||
public static PlayerCapability<IBalanceHandler> BalanceCapability { get; } = new("myplugin:balance");
|
||||
public static PlayerCapability<Decimal> BalanceCapabilityDecimal { get; } = new("myplugin:balance_decimal");
|
||||
|
||||
public static PluginCapability<IBalanceService> BalanceServiceCapability { get; } = new("myplugin:balance_service");
|
||||
|
||||
public override void Load(bool hotReload)
|
||||
{
|
||||
AddCommand("css_subtract", "Subtracts 50 from your balance", (player, info) =>
|
||||
{
|
||||
if (player == null) return;
|
||||
var balance = BalanceCapability.Get(player);
|
||||
if (balance == null) return;
|
||||
balance.Subtract(50);
|
||||
player.PrintToChat($"Your balance is now {balance.Balance}");
|
||||
});
|
||||
|
||||
AddCommand("css_clearbalances", "Clears all balances", (player, info) =>
|
||||
{
|
||||
if (player == null) return;
|
||||
var service = BalanceServiceCapability.Get();
|
||||
if (service == null) return;
|
||||
|
||||
service.ClearAllBalances();
|
||||
|
||||
var balance = BalanceCapability.Get(player);
|
||||
if (balance == null) return;
|
||||
player.PrintToChat($"Your balance is now {balance.Balance}");
|
||||
});
|
||||
|
||||
AddCommand("css_decimalbalance", "Gets your current balance", (player, info) =>
|
||||
{
|
||||
if (player == null) return;
|
||||
player.PrintToChat($"Your balance is {BalanceCapabilityDecimal.Get(player)}");
|
||||
});
|
||||
}
|
||||
|
||||
public override void Unload(bool hotReload)
|
||||
{
|
||||
}
|
||||
}
|
||||
Submodule libraries/GameTracking-CS2 deleted from 3556d2a923
1
libraries/Protobufs
Submodule
1
libraries/Protobufs
Submodule
Submodule libraries/Protobufs added at 686a0628e6
Submodule libraries/hl2sdk-cs2 updated: 2f9dd2e61a...43bfe744a1
@@ -102,9 +102,18 @@ public class AdminTests
|
||||
[Fact]
|
||||
public void ShouldAddCommandPermissionOverridesAtRuntime()
|
||||
{
|
||||
Assert.False(AdminManager.CommandIsOverriden("runtime_command"));
|
||||
AdminManager.AddPermissionOverride("runtime_command", "@runtime/override");
|
||||
Assert.True(AdminManager.CommandIsOverriden("runtime_command"));
|
||||
Assert.Equal("@runtime/override", AdminManager.GetPermissionOverrides("runtime_command").Single());
|
||||
Assert.False(AdminManager.CommandIsOverriden("runtime_command_a"));
|
||||
AdminManager.AddPermissionOverride("runtime_command_a", "@runtime/override");
|
||||
Assert.True(AdminManager.CommandIsOverriden("runtime_command_a"));
|
||||
Assert.Equal("@runtime/override", AdminManager.GetPermissionOverrides("runtime_command_a").Single());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ShouldAddCommandPermissionOverridesWithEmpty()
|
||||
{
|
||||
Assert.False(AdminManager.CommandIsOverriden("runtime_command_b"));
|
||||
AdminManager.AddPermissionOverride("runtime_command_b");
|
||||
Assert.True(AdminManager.CommandIsOverriden("runtime_command_b"));
|
||||
Assert.False(AdminManager.GetPermissionOverrides("runtime_command_b").Any());
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,16 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Core.Commands;
|
||||
using CounterStrikeSharp.API.Core.Hosting;
|
||||
using CounterStrikeSharp.API.Core.Logging;
|
||||
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.Logging;
|
||||
@@ -42,6 +44,7 @@ public static class Bootstrap
|
||||
services.AddSingleton<IPluginManager, PluginManager>();
|
||||
services.AddSingleton<IPlayerLanguageManager, PlayerLanguageManager>();
|
||||
services.AddScoped<IPluginContextQueryHandler, PluginContextQueryHandler>();
|
||||
services.AddSingleton<ICommandManager, CommandManager>();
|
||||
|
||||
services.Scan(i => i.FromCallingAssembly()
|
||||
.AddClasses(c => c.AssignableTo<IStartupService>())
|
||||
@@ -50,12 +53,13 @@ public static class Bootstrap
|
||||
})
|
||||
.Build();
|
||||
|
||||
using IServiceScope scope = host.Services.CreateScope();
|
||||
using IServiceScope rootScope = host.Services.CreateScope();
|
||||
|
||||
// TODO: Improve static singleton access
|
||||
GameData.GameDataProvider = scope.ServiceProvider.GetRequiredService<GameDataProvider>();
|
||||
GameData.GameDataProvider = rootScope.ServiceProvider.GetRequiredService<GameDataProvider>();
|
||||
AdminManager.CommandManagerProvider = rootScope.ServiceProvider.GetRequiredService<ICommandManager>();
|
||||
|
||||
var application = scope.ServiceProvider.GetRequiredService<Application>();
|
||||
var application = rootScope.ServiceProvider.GetRequiredService<Application>();
|
||||
application.Start();
|
||||
|
||||
return 1;
|
||||
|
||||
1078
managed/CounterStrikeSharp.API/CompatibilitySuppressions.xml
Normal file
1078
managed/CounterStrikeSharp.API/CompatibilitySuppressions.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -23,6 +23,7 @@ namespace CounterStrikeSharp.API
|
||||
[Flags]
|
||||
public enum ConVarFlags : Int64
|
||||
{
|
||||
FCVAR_NONE = 0,
|
||||
FCVAR_LINKED_CONCOMMAND = (1 << 0),
|
||||
|
||||
FCVAR_DEVELOPMENTONLY =
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using System;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Commands;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
@@ -124,10 +125,21 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static void IssueClientCommand(int clientindex, string command){
|
||||
public static CommandCallingContext CommandGetCallingContext(IntPtr command){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(clientindex);
|
||||
ScriptContext.GlobalScriptContext.Push(command);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x886D0EB6);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
return (CommandCallingContext)ScriptContext.GlobalScriptContext.GetResult(typeof(CommandCallingContext));
|
||||
}
|
||||
}
|
||||
|
||||
public static void IssueClientCommand(int slot, string command){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(slot);
|
||||
ScriptContext.GlobalScriptContext.Push(command);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xCA5BA982);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
@@ -135,6 +147,17 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static void IssueClientCommandFromServer(int slot, string command){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(slot);
|
||||
ScriptContext.GlobalScriptContext.Push(command);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x85376751);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static IntPtr FindConvar(string name){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
@@ -479,20 +502,20 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static void QueueTaskForNextFrame(IntPtr callback){
|
||||
public static void QueueTaskForNextFrame(InputArgument callback){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(callback);
|
||||
ScriptContext.GlobalScriptContext.Push((InputArgument)callback);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0x9FE394D8);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
public static void QueueTaskForNextWorldUpdate(IntPtr callback){
|
||||
public static void QueueTaskForNextWorldUpdate(InputArgument callback){
|
||||
lock (ScriptContext.GlobalScriptContext.Lock) {
|
||||
ScriptContext.GlobalScriptContext.Reset();
|
||||
ScriptContext.GlobalScriptContext.Push(callback);
|
||||
ScriptContext.GlobalScriptContext.Push((InputArgument)callback);
|
||||
ScriptContext.GlobalScriptContext.SetIdentifier(0xAD51A0C9);
|
||||
ScriptContext.GlobalScriptContext.Invoke();
|
||||
ScriptContext.GlobalScriptContext.CheckErrors();
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using CounterStrikeSharp.API.Core.Commands;
|
||||
using CounterStrikeSharp.API.Core.Hosting;
|
||||
using CounterStrikeSharp.API.Core.Plugin;
|
||||
using CounterStrikeSharp.API.Core.Plugin.Host;
|
||||
@@ -26,6 +27,7 @@ using CounterStrikeSharp.API.Modules.Commands;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Menu;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core
|
||||
@@ -34,6 +36,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
private static Application _instance = null!;
|
||||
public ILogger Logger { get; }
|
||||
|
||||
public static Application Instance => _instance!;
|
||||
|
||||
public static string RootDirectory => Instance._scriptHostConfiguration.RootPath;
|
||||
@@ -44,10 +47,12 @@ namespace CounterStrikeSharp.API.Core
|
||||
private readonly IPluginManager _pluginManager;
|
||||
private readonly IPluginContextQueryHandler _pluginContextQueryHandler;
|
||||
private readonly IPlayerLanguageManager _playerLanguageManager;
|
||||
private readonly ICommandManager _commandManager;
|
||||
|
||||
public Application(ILoggerFactory loggerFactory, IScriptHostConfiguration scriptHostConfiguration,
|
||||
GameDataProvider gameDataProvider, CoreConfig coreConfig, IPluginManager pluginManager,
|
||||
IPluginContextQueryHandler pluginContextQueryHandler, IPlayerLanguageManager playerLanguageManager)
|
||||
IPluginContextQueryHandler pluginContextQueryHandler, IPlayerLanguageManager playerLanguageManager,
|
||||
ICommandManager commandManager)
|
||||
{
|
||||
Logger = loggerFactory.CreateLogger("Core");
|
||||
_scriptHostConfiguration = scriptHostConfiguration;
|
||||
@@ -56,6 +61,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
_pluginManager = pluginManager;
|
||||
_pluginContextQueryHandler = pluginContextQueryHandler;
|
||||
_playerLanguageManager = playerLanguageManager;
|
||||
_commandManager = commandManager;
|
||||
_instance = this;
|
||||
}
|
||||
|
||||
@@ -69,7 +75,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
var adminPath = Path.Combine(_scriptHostConfiguration.RootPath, "configs", "admins.json");
|
||||
Logger.LogInformation("Loading Admins from {Path}", adminPath);
|
||||
AdminManager.LoadAdminData(adminPath);
|
||||
|
||||
|
||||
var adminGroupsPath = Path.Combine(_scriptHostConfiguration.RootPath, "configs", "admin_groups.json");
|
||||
Logger.LogInformation("Loading Admin Groups from {Path}", adminGroupsPath);
|
||||
AdminManager.LoadAdminGroups(adminGroupsPath);
|
||||
@@ -81,24 +87,23 @@ namespace CounterStrikeSharp.API.Core
|
||||
AdminManager.MergeGroupPermsIntoAdmins();
|
||||
AdminManager.AddCommands();
|
||||
|
||||
RegisterPluginCommands();
|
||||
|
||||
_pluginManager.Load();
|
||||
|
||||
for (var i = 1; i <= 9; i++)
|
||||
{
|
||||
CommandUtils.AddStandaloneCommand($"css_{i}", "Command Key Handler", (player, info) =>
|
||||
{
|
||||
if (player == null) return;
|
||||
var key = Convert.ToInt32(info.GetArg(0).Split("_")[1]);
|
||||
|
||||
MenuManager.OnKeyPress(player, key);
|
||||
});
|
||||
_commandManager.RegisterCommand(new($"css_{i}", "Command Key Handler",
|
||||
(player, info) =>
|
||||
{
|
||||
if (player == null) return;
|
||||
var key = Convert.ToInt32(info.GetArg(0).Split("_")[1]);
|
||||
MenuManager.OnKeyPress(player, key);
|
||||
}));
|
||||
}
|
||||
|
||||
RegisterPluginCommands();
|
||||
}
|
||||
|
||||
[RequiresPermissions("@css/generic")]
|
||||
[CommandHelper(whoCanExecute: CommandUsage.CLIENT_AND_SERVER)]
|
||||
private void OnCSSCommand(CCSPlayerController? caller, CommandInfo info)
|
||||
{
|
||||
var currentVersion = Api.GetVersion();
|
||||
@@ -107,18 +112,11 @@ namespace CounterStrikeSharp.API.Core
|
||||
" CounterStrikeSharp was created and is maintained by Michael \"roflmuffin\" Wilson.\n" +
|
||||
" Counter-Strike Sharp uses code borrowed from SourceMod, Source.Python, FiveM, Saul Rennison, source2gen and CS2Fixes.\n" +
|
||||
" See ACKNOWLEDGEMENTS.md for more information.\n" +
|
||||
" Current API Version: " + currentVersion, true);
|
||||
" Current API Version: " + currentVersion);
|
||||
return;
|
||||
}
|
||||
|
||||
[RequiresPermissions("@css/generic")]
|
||||
[CommandHelper(minArgs: 1,
|
||||
usage: "[option]\n" +
|
||||
" list - List all plugins currently loaded.\n" +
|
||||
" start / load - Loads a plugin not currently loaded.\n" +
|
||||
" stop / unload - Unloads a plugin currently loaded.\n" +
|
||||
" restart / reload - Reloads a plugin currently loaded.",
|
||||
whoCanExecute: CommandUsage.CLIENT_AND_SERVER)]
|
||||
private void OnCSSPluginCommand(CCSPlayerController? caller, CommandInfo info)
|
||||
{
|
||||
switch (info.GetArg(1))
|
||||
@@ -126,8 +124,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
case "list":
|
||||
{
|
||||
info.ReplyToCommand(
|
||||
$" List of all plugins currently loaded by CounterStrikeSharp: {_pluginManager.GetLoadedPlugins().Count()} plugins loaded.",
|
||||
true);
|
||||
$" List of all plugins currently loaded by CounterStrikeSharp: {_pluginManager.GetLoadedPlugins().Count()} plugins loaded.");
|
||||
|
||||
foreach (var plugin in _pluginManager.GetLoadedPlugins())
|
||||
{
|
||||
@@ -144,7 +141,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
sb.Append(plugin.Plugin.ModuleDescription);
|
||||
}
|
||||
|
||||
info.ReplyToCommand(sb.ToString(), true);
|
||||
info.ReplyToCommand(sb.ToString());
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -155,8 +152,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
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",
|
||||
true);
|
||||
"Valid usage: css_plugins start/load [relative plugin path || absolute plugin path] (e.g \"TestPlugin\", \"plugins/TestPlugin/TestPlugin.dll\")\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -179,16 +175,19 @@ namespace CounterStrikeSharp.API.Core
|
||||
try
|
||||
{
|
||||
_pluginManager.LoadPlugin(path);
|
||||
plugin = _pluginContextQueryHandler.FindPluginByModulePath(path);
|
||||
plugin.Plugin.OnAllPluginsLoaded(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
info.ReplyToCommand($"Could not load plugin \"{path}\")", true);
|
||||
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;
|
||||
@@ -200,8 +199,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
if (info.ArgCount < 3)
|
||||
{
|
||||
info.ReplyToCommand(
|
||||
"Valid usage: css_plugins stop/unload [plugin name || #plugin id] (e.g \"TestPlugin\", \"1\")\n",
|
||||
true);
|
||||
"Valid usage: css_plugins stop/unload [plugin name || #plugin id] (e.g \"TestPlugin\", \"1\")\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -209,7 +207,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
IPluginContext? plugin = _pluginContextQueryHandler.FindPluginByIdOrName(pluginIdentifier);
|
||||
if (plugin == null)
|
||||
{
|
||||
info.ReplyToCommand($"Could not unload plugin \"{pluginIdentifier}\")", true);
|
||||
info.ReplyToCommand($"Could not unload plugin \"{pluginIdentifier}\"");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -223,8 +221,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
if (info.ArgCount < 3)
|
||||
{
|
||||
info.ReplyToCommand(
|
||||
"Valid usage: css_plugins restart/reload [plugin name || #plugin id] (e.g \"TestPlugin\", \"#1\")\n",
|
||||
true);
|
||||
"Valid usage: css_plugins restart/reload [plugin name || #plugin id] (e.g \"TestPlugin\", \"#1\")\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -233,12 +230,13 @@ namespace CounterStrikeSharp.API.Core
|
||||
|
||||
if (plugin == null)
|
||||
{
|
||||
info.ReplyToCommand($"Could not reload plugin \"{pluginIdentifier}\")", true);
|
||||
info.ReplyToCommand($"Could not reload plugin \"{pluginIdentifier}\"");
|
||||
break;
|
||||
}
|
||||
|
||||
plugin.Unload(true);
|
||||
plugin.Load(true);
|
||||
plugin.Plugin.OnAllPluginsLoaded(true);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -247,23 +245,21 @@ namespace CounterStrikeSharp.API.Core
|
||||
" list - List all plugins currently loaded.\n" +
|
||||
" start / load - Loads a plugin not currently loaded.\n" +
|
||||
" stop / unload - Unloads a plugin currently loaded.\n" +
|
||||
" restart / reload - Reloads a plugin currently loaded."
|
||||
, true);
|
||||
" restart / reload - Reloads a plugin currently loaded.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandHelper(usage: "[language code, e.g. \"de\", \"pl\", \"en\"]", whoCanExecute: CommandUsage.CLIENT_AND_SERVER)]
|
||||
|
||||
private void OnLangCommand(CCSPlayerController? player, CommandInfo command)
|
||||
{
|
||||
if (player == null) return;
|
||||
|
||||
SteamID steamId = (SteamID)player.SteamID;
|
||||
|
||||
var steamId = (SteamID)player.SteamID;
|
||||
|
||||
if (command.ArgCount == 1)
|
||||
{
|
||||
var language = _playerLanguageManager.GetLanguage(steamId);
|
||||
command.ReplyToCommand(string.Format("Current language is \"{0}\" ({1})", language.Name, language.NativeName));
|
||||
command.ReplyToCommand($"Current language is \"{language.Name}\" ({language.NativeName})");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -271,7 +267,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var language = command.GetArg(1);
|
||||
@@ -287,10 +283,26 @@ namespace CounterStrikeSharp.API.Core
|
||||
|
||||
private void RegisterPluginCommands()
|
||||
{
|
||||
CommandUtils.AddStandaloneCommand("css", "Counter-Strike Sharp options.", OnCSSCommand);
|
||||
CommandUtils.AddStandaloneCommand("css_plugins", "Counter-Strike Sharp plugin options.",
|
||||
OnCSSPluginCommand);
|
||||
CommandUtils.AddStandaloneCommand("css_lang", "Set Counter-Strike Sharp language.", OnLangCommand);
|
||||
_commandManager.RegisterCommand(new("css", "Counter-Strike Sharp options.", OnCSSCommand)
|
||||
{
|
||||
ExecutableBy = CommandUsage.CLIENT_AND_SERVER,
|
||||
});
|
||||
_commandManager.RegisterCommand(new("css_plugins", "Counter-Strike Sharp plugin options.",
|
||||
OnCSSPluginCommand)
|
||||
{
|
||||
ExecutableBy = CommandUsage.CLIENT_AND_SERVER,
|
||||
MinArgs = 1,
|
||||
UsageHint = "[option]\n" +
|
||||
" list - List all plugins currently loaded.\n" +
|
||||
" start / load - Loads a plugin not currently loaded.\n" +
|
||||
" stop / unload - Unloads a plugin currently loaded.\n" +
|
||||
" restart / reload - Reloads a plugin currently loaded.",
|
||||
});
|
||||
_commandManager.RegisterCommand(new("css_lang", "Set Counter-Strike Sharp language.", OnLangCommand)
|
||||
{
|
||||
ExecutableBy = CommandUsage.CLIENT_AND_SERVER,
|
||||
UsageHint = "[language code, e.g. \"de\", \"pl\", \"en\"]",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,11 +22,13 @@ using System.Reflection;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
using CounterStrikeSharp.API.Core.Attributes.Registration;
|
||||
using CounterStrikeSharp.API.Core.Translations;
|
||||
using CounterStrikeSharp.API.Core.Commands;
|
||||
using CounterStrikeSharp.API.Modules.Admin;
|
||||
using CounterStrikeSharp.API.Modules.Commands;
|
||||
using CounterStrikeSharp.API.Modules.Events;
|
||||
using CounterStrikeSharp.API.Modules.Timers;
|
||||
using CounterStrikeSharp.API.Modules.Config;
|
||||
using CounterStrikeSharp.API.Modules.Cvars;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@@ -59,6 +61,8 @@ namespace CounterStrikeSharp.API.Core
|
||||
|
||||
public string ModuleDirectory => Path.GetDirectoryName(ModulePath);
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public ICommandManager CommandManager { get; set; }
|
||||
|
||||
public IStringLocalizer Localizer { get; set; }
|
||||
|
||||
@@ -69,6 +73,10 @@ namespace CounterStrikeSharp.API.Core
|
||||
public virtual void Unload(bool hotReload)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnAllPluginsLoaded(bool hotReload)
|
||||
{
|
||||
}
|
||||
|
||||
public class CallbackSubscriber : IDisposable
|
||||
{
|
||||
@@ -170,102 +178,13 @@ namespace CounterStrikeSharp.API.Core
|
||||
/// <param name="handler">The callback function to be invoked when the command is executed.</param>
|
||||
public void AddCommand(string name, string description, CommandInfo.CommandCallback handler)
|
||||
{
|
||||
var wrappedHandler = new Action<int, IntPtr>((i, ptr) =>
|
||||
{
|
||||
var caller = (i != -1) ? new CCSPlayerController(NativeAPI.GetEntityFromIndex(i + 1)) : null;
|
||||
var command = new CommandInfo(ptr, caller);
|
||||
|
||||
using var temporaryCulture = new WithTemporaryCulture(caller.GetLanguage());
|
||||
|
||||
var methodInfo = handler?.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)
|
||||
{
|
||||
// Do not execute command if we do not have the correct permissions.
|
||||
var adminData = AdminManager.GetPlayerAdminData(caller!.AuthorizedSteamID);
|
||||
var permissionsToCheck = new List<BaseRequiresPermissions>();
|
||||
|
||||
|
||||
// If our command is overriden, we dynamically create a new permissions attribute
|
||||
// based on the data that is stored in admin_overrides.json.
|
||||
if (AdminManager.CommandIsOverriden(name))
|
||||
{
|
||||
var data = AdminManager.GetCommandOverrideData(name);
|
||||
if (data != null)
|
||||
{
|
||||
var attrType = (data.CheckType == "all") ? typeof(RequiresPermissions) : typeof(RequiresPermissionsOr);
|
||||
var attr = (BaseRequiresPermissions)Activator.CreateInstance(attrType, args: AdminManager.GetPermissionOverrides(name));
|
||||
|
||||
if (attr != null) permissionsToCheck.Add(attr);
|
||||
}
|
||||
}
|
||||
// The permissions for this command are not being overriden here, so we
|
||||
// grab the permissions to check straight from the attribute.
|
||||
else
|
||||
{
|
||||
var permissions = methodInfo?.GetCustomAttributes<BaseRequiresPermissions>();
|
||||
if (permissions != null) permissionsToCheck.AddRange(permissions);
|
||||
}
|
||||
|
||||
foreach (var attr in permissionsToCheck)
|
||||
{
|
||||
attr.Command = name;
|
||||
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";
|
||||
|
||||
var flags = attr.Permissions.Except(adminData?.GetAllFlags() ?? new HashSet<string>());
|
||||
flags = flags.Except(adminData?.Groups ?? new HashSet<string>());
|
||||
command.ReplyToCommand($"[CSS] {responseStr} ({string.Join(", ", flags)}) to execute this command.");
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Do not execute if we shouldn't be calling this command.
|
||||
var helperAttribute = methodInfo?.GetCustomAttribute<CommandHelperAttribute>();
|
||||
if (helperAttribute != null)
|
||||
{
|
||||
switch (helperAttribute.WhoCanExcecute)
|
||||
{
|
||||
case CommandUsage.CLIENT_AND_SERVER: break; // Allow command through.
|
||||
case CommandUsage.CLIENT_ONLY:
|
||||
if (caller == null || !caller.IsValid) { command.ReplyToCommand("[CSS] This command can only be executed by clients."); return; }
|
||||
break;
|
||||
case CommandUsage.SERVER_ONLY:
|
||||
if (caller != null && caller.IsValid) { command.ReplyToCommand("[CSS] This command can only be executed by the server."); return; }
|
||||
break;
|
||||
default: throw new ArgumentException("Unrecognised CommandUsage value passed in CommandHelperAttribute.");
|
||||
}
|
||||
|
||||
// Technically the command itself counts as the first argument,
|
||||
// but we'll just ignore that for this check.
|
||||
if (helperAttribute.MinArgs != 0 && command.ArgCount - 1 < helperAttribute.MinArgs)
|
||||
{
|
||||
// Remove the "css_" from the beginning of the command name if it's present.
|
||||
// Most of the time, users will be calling commands from chat.
|
||||
var commandCalled = command.ArgByIndex(0);
|
||||
var properCommandName = (commandCalled.StartsWith("css_")) ? commandCalled.Replace("css_", "") : commandCalled;
|
||||
|
||||
command.ReplyToCommand($"[CSS] Expected usage: \"!{properCommandName} {helperAttribute.Usage}\".");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
handler?.Invoke(caller, command);
|
||||
});
|
||||
|
||||
var methodInfo = handler?.GetMethodInfo();
|
||||
var helperAttribute = methodInfo?.GetCustomAttribute<CommandHelperAttribute>();
|
||||
|
||||
var subscriber = new CallbackSubscriber(handler, wrappedHandler, () => { RemoveCommand(name, handler); });
|
||||
NativeAPI.AddCommand(name, description, (helperAttribute?.WhoCanExcecute == CommandUsage.SERVER_ONLY),
|
||||
(int)ConCommandFlags.FCVAR_LINKED_CONCOMMAND, subscriber.GetInputArgument());
|
||||
CommandHandlers[handler] = subscriber;
|
||||
var definition = new CommandDefinition(name, description, handler);
|
||||
CommandManager.RegisterCommand(definition);
|
||||
}
|
||||
|
||||
private void AddCommand(CommandDefinition definition)
|
||||
{
|
||||
CommandManager.RegisterCommand(definition);
|
||||
}
|
||||
|
||||
public void AddCommandListener(string? name, CommandInfo.CommandListenerCallback handler, HookMode mode = HookMode.Pre)
|
||||
@@ -394,6 +313,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
this.RegisterAttributeHandlers(instance);
|
||||
this.RegisterConsoleCommandAttributeHandlers(instance);
|
||||
this.RegisterEntityOutputAttributeHandlers(instance);
|
||||
this.RegisterFakeConVars(instance);
|
||||
}
|
||||
|
||||
public void InitializeConfig(object instance, Type pluginType)
|
||||
@@ -462,10 +382,19 @@ namespace CounterStrikeSharp.API.Core
|
||||
foreach (var eventHandler in eventHandlers)
|
||||
{
|
||||
var attributes = eventHandler.GetCustomAttributes<ConsoleCommandAttribute>();
|
||||
var helperAttribute = eventHandler.GetCustomAttribute<CommandHelperAttribute>();
|
||||
foreach (var commandInfo in attributes)
|
||||
{
|
||||
AddCommand(commandInfo.Command, commandInfo.Description,
|
||||
eventHandler.CreateDelegate<CommandInfo.CommandCallback>(instance));
|
||||
var definition = new CommandDefinition()
|
||||
{
|
||||
Name = commandInfo.Command,
|
||||
Description = commandInfo.Description,
|
||||
Callback = eventHandler.CreateDelegate<CommandInfo.CommandCallback>(instance),
|
||||
MinArgs = helperAttribute?.MinArgs,
|
||||
UsageHint = helperAttribute?.Usage,
|
||||
ExecutableBy = helperAttribute?.WhoCanExcecute ?? CommandUsage.CLIENT_AND_SERVER,
|
||||
};
|
||||
AddCommand(definition);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -487,6 +416,43 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
public void RegisterFakeConVars(Type type, object instance = null)
|
||||
{
|
||||
var convars = type
|
||||
.GetFields(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)
|
||||
.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) =>
|
||||
{
|
||||
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>
|
||||
/// <param name="convar"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public void RegisterFakeConVars(object instance)
|
||||
{
|
||||
RegisterFakeConVars(instance.GetType(), instance);
|
||||
}
|
||||
|
||||
public void HookEntityOutput(string classname, string outputName, EntityIO.EntityOutputHandler handler, HookMode mode = HookMode.Pre)
|
||||
{
|
||||
var subscriber = new CallbackSubscriber(handler, handler,
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
namespace CounterStrikeSharp.API.Core.Capabilities;
|
||||
|
||||
public static class Capabilities
|
||||
{
|
||||
public static void RegisterPluginCapability<T>(PluginCapability<T> capability, Func<T> supplier)
|
||||
{
|
||||
if (!PluginCapability<T>.Providers.ContainsKey(capability.Name))
|
||||
{
|
||||
PluginCapability<T>.Providers.Add(capability.Name, new());
|
||||
}
|
||||
|
||||
PluginCapability<T>.Providers[capability.Name].Add(supplier);
|
||||
}
|
||||
|
||||
public static void RegisterPlayerCapability<T>(PlayerCapability<T> capability,
|
||||
Func<CCSPlayerController, T> supplier)
|
||||
{
|
||||
if (!PlayerCapability<T>.Providers.ContainsKey(capability.Name))
|
||||
{
|
||||
PlayerCapability<T>.Providers.Add(capability.Name, new());
|
||||
}
|
||||
|
||||
PlayerCapability<T>.Providers[capability.Name].Add(supplier);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core.Capabilities;
|
||||
|
||||
public sealed class PlayerCapability<T>
|
||||
{
|
||||
public string Name { get; }
|
||||
internal static readonly Dictionary<string, List<Func<CCSPlayerController, T>>> Providers = new();
|
||||
|
||||
public PlayerCapability(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public T? Get(CCSPlayerController entity)
|
||||
{
|
||||
foreach (var provider in Providers[Name])
|
||||
{
|
||||
return provider(entity);
|
||||
}
|
||||
|
||||
return default;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core.Capabilities;
|
||||
|
||||
public sealed class PluginCapability<T>
|
||||
{
|
||||
public string Name { get; }
|
||||
internal static readonly Dictionary<string, List<Func<T>>> Providers = new();
|
||||
|
||||
public PluginCapability(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public T? Get()
|
||||
{
|
||||
foreach (var provider in Providers[Name])
|
||||
{
|
||||
return provider();
|
||||
}
|
||||
|
||||
return default;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using CounterStrikeSharp.API.Modules.Commands;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core.Commands;
|
||||
|
||||
public class CommandDefinition
|
||||
{
|
||||
public CommandDefinition(string name, string description, CommandInfo.CommandCallback callback)
|
||||
{
|
||||
Name = name;
|
||||
Description = description;
|
||||
Callback = callback;
|
||||
}
|
||||
|
||||
public CommandDefinition()
|
||||
{
|
||||
}
|
||||
|
||||
public string Name { get; init; }
|
||||
public string Description { get; init; }
|
||||
public CommandInfo.CommandCallback Callback { get; init; }
|
||||
|
||||
public CommandUsage ExecutableBy { get; init; } = CommandUsage.CLIENT_AND_SERVER;
|
||||
|
||||
public string? UsageHint { get; init; }
|
||||
|
||||
public int? MinArgs { get; init; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Name: {Name}, Description: {Description}, ExecutableBy: {ExecutableBy}, " +
|
||||
$"UsageHint: {UsageHint}, MinArgs: {MinArgs}";
|
||||
}
|
||||
}
|
||||
163
managed/CounterStrikeSharp.API/Core/Commands/CommandManager.cs
Normal file
163
managed/CounterStrikeSharp.API/Core/Commands/CommandManager.cs
Normal file
@@ -0,0 +1,163 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using CounterStrikeSharp.API.Core.Translations;
|
||||
using CounterStrikeSharp.API.Modules.Admin;
|
||||
using CounterStrikeSharp.API.Modules.Commands;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core.Commands;
|
||||
|
||||
public class CommandManager : ICommandManager
|
||||
{
|
||||
private readonly Dictionary<string, IList<CommandDefinition>> _commandDefinitions =
|
||||
new(StringComparer.InvariantCultureIgnoreCase);
|
||||
|
||||
private readonly ILogger<CommandManager> _logger;
|
||||
private readonly FunctionReference _internalFunctionReference;
|
||||
|
||||
public CommandManager(ILogger<CommandManager> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
_internalFunctionReference = FunctionReference.Create(HandleCommandInternal);
|
||||
}
|
||||
|
||||
public void RegisterCommand(CommandDefinition definition)
|
||||
{
|
||||
bool isRegistered = true;
|
||||
if (!_commandDefinitions.ContainsKey(definition.Name))
|
||||
{
|
||||
_commandDefinitions.Add(definition.Name, new List<CommandDefinition>());
|
||||
isRegistered = false;
|
||||
}
|
||||
|
||||
_commandDefinitions[definition.Name].Add(definition);
|
||||
|
||||
_logger.LogDebug("Registering command {Command}", definition.Name);
|
||||
|
||||
if (!isRegistered)
|
||||
{
|
||||
NativeAPI.AddCommand(definition.Name, definition.Description,
|
||||
definition.ExecutableBy == CommandUsage.SERVER_ONLY,
|
||||
(int)ConCommandFlags.FCVAR_LINKED_CONCOMMAND, _internalFunctionReference);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveCommand(CommandDefinition definition)
|
||||
{
|
||||
_logger.LogDebug("Removing command {Command}", definition.Name);
|
||||
|
||||
if (_commandDefinitions.TryGetValue(definition.Name, out var commandDefinition))
|
||||
{
|
||||
commandDefinition.Remove(definition);
|
||||
}
|
||||
|
||||
if (_commandDefinitions[definition.Name].Count == 0)
|
||||
{
|
||||
NativeAPI.RemoveCommand(definition.Name, _internalFunctionReference);
|
||||
_commandDefinitions.Remove(definition.Name);
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleCommandInternal(int playerSlot, IntPtr commandInfo)
|
||||
{
|
||||
var caller = (playerSlot != -1) ? Utilities.GetPlayerFromSlot(playerSlot) : null;
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
// Do not execute command if we do not have the correct permissions.
|
||||
var adminData = AdminManager.GetPlayerAdminData(caller!.AuthorizedSteamID);
|
||||
var permissionsToCheck = new List<BaseRequiresPermissions>();
|
||||
|
||||
|
||||
// If our command is overriden, we dynamically create a new permissions attribute
|
||||
// based on the data that is stored in admin_overrides.json.
|
||||
if (AdminManager.CommandIsOverriden(name))
|
||||
{
|
||||
var data = AdminManager.GetCommandOverrideData(name);
|
||||
if (data != null)
|
||||
{
|
||||
var attrType = (data.CheckType == "all") ? typeof(RequiresPermissions) : typeof(RequiresPermissionsOr);
|
||||
var attr = (BaseRequiresPermissions)Activator.CreateInstance(attrType, args: AdminManager.GetPermissionOverrides(name));
|
||||
|
||||
if (attr != null) permissionsToCheck.Add(attr);
|
||||
}
|
||||
}
|
||||
// The permissions for this command are not being overriden here, so we
|
||||
// grab the permissions to check straight from the attribute.
|
||||
else
|
||||
{
|
||||
var permissions = methodInfo?.GetCustomAttributes<BaseRequiresPermissions>();
|
||||
if (permissions != null) permissionsToCheck.AddRange(permissions);
|
||||
}
|
||||
|
||||
foreach (var attr in permissionsToCheck)
|
||||
{
|
||||
if (attr.Permissions.Count == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
attr.Command = name;
|
||||
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";
|
||||
|
||||
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.");
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Do not execute if we shouldn't be calling this command.
|
||||
var helperAttribute = methodInfo?.GetCustomAttribute<CommandHelperAttribute>();
|
||||
if (helperAttribute != null)
|
||||
{
|
||||
switch (helperAttribute.WhoCanExcecute)
|
||||
{
|
||||
case CommandUsage.CLIENT_AND_SERVER: break; // Allow command through.
|
||||
case CommandUsage.CLIENT_ONLY:
|
||||
if (caller == null || !caller.IsValid) { info.ReplyToCommand("[CSS] This command can only be executed by clients."); return; }
|
||||
break;
|
||||
case CommandUsage.SERVER_ONLY:
|
||||
if (caller != null && caller.IsValid) { info.ReplyToCommand("[CSS] This command can only be executed by the server."); return; }
|
||||
break;
|
||||
default: throw new ArgumentException("Unrecognised CommandUsage value passed in CommandHelperAttribute.");
|
||||
}
|
||||
|
||||
// Technically the command itself counts as the first argument,
|
||||
// but we'll just ignore that for this check.
|
||||
if (helperAttribute.MinArgs != 0 && info.ArgCount - 1 < helperAttribute.MinArgs)
|
||||
{
|
||||
// Remove the "css_" from the beginning of the command name if it's present.
|
||||
// Most of the time, users will be calling commands from chat.
|
||||
var commandCalled = info.ArgByIndex(0);
|
||||
var properCommandName = (commandCalled.StartsWith("css_")) ? commandCalled.Replace("css_", "") : commandCalled;
|
||||
|
||||
info.ReplyToCommand($"[CSS] Expected usage: \"!{properCommandName} {helperAttribute.Usage}\".");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
command.Callback?.Invoke(caller, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using CounterStrikeSharp.API.Modules.Commands;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core.Commands;
|
||||
|
||||
public interface ICommandManager
|
||||
{
|
||||
void RegisterCommand(CommandDefinition definition);
|
||||
|
||||
void RemoveCommand(CommandDefinition definition);
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using System.Collections.Generic;
|
||||
using CounterStrikeSharp.API.Core.Plugin;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// Decorator for <see cref="ICommandManager"/> that tracks registered commands and removes them when disposed.
|
||||
/// Used for plugins that register commands to ensure they are removed when the plugin is unloaded.
|
||||
/// </summary>
|
||||
public class PluginCommandManagerDecorator : ICommandManager, IDisposable
|
||||
{
|
||||
private readonly ICommandManager _inner;
|
||||
private readonly List<CommandDefinition> _trackedCommands = new();
|
||||
private readonly IPluginContext _pluginContext;
|
||||
private readonly ILogger<PluginCommandManagerDecorator> _logger;
|
||||
|
||||
public PluginCommandManagerDecorator(ICommandManager inner, IPluginContext pluginContext, ILogger<PluginCommandManagerDecorator> logger)
|
||||
{
|
||||
_pluginContext = pluginContext;
|
||||
_logger = logger;
|
||||
_inner = inner;
|
||||
}
|
||||
|
||||
public void RegisterCommand(CommandDefinition definition)
|
||||
{
|
||||
_inner.RegisterCommand(definition);
|
||||
_trackedCommands.Add(definition);
|
||||
_logger.LogDebug("Registered command {Command} from plugin {Plugin}", definition.Name, _pluginContext.Plugin.ModuleName);
|
||||
}
|
||||
|
||||
public void RemoveCommand(CommandDefinition definition)
|
||||
{
|
||||
_inner.RemoveCommand(definition);
|
||||
_trackedCommands.Remove(definition);
|
||||
_logger.LogDebug("Removed command {Command} from plugin {Plugin}", definition.Name, _pluginContext.Plugin.ModuleName);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
for (int i = _trackedCommands.Count - 1; i >= 0; i--)
|
||||
{
|
||||
RemoveCommand(_trackedCommands[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ using CounterStrikeSharp.API.Modules.Commands;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using CounterStrikeSharp.API.Core.Commands;
|
||||
using CounterStrikeSharp.API.Core.Hosting;
|
||||
using CounterStrikeSharp.API.Core.Logging;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
@@ -101,12 +102,15 @@ namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
private static CoreConfigData _coreConfig = new CoreConfigData();
|
||||
|
||||
private readonly ICommandManager _commandManager;
|
||||
private readonly ILogger<CoreConfig> _logger;
|
||||
|
||||
private readonly string _coreConfigPath;
|
||||
private bool _commandsRegistered = false;
|
||||
|
||||
public CoreConfig(IScriptHostConfiguration scriptHostConfiguration, ILogger<CoreConfig> logger)
|
||||
public CoreConfig(IScriptHostConfiguration scriptHostConfiguration, ICommandManager commandManager, ILogger<CoreConfig> logger)
|
||||
{
|
||||
_commandManager = commandManager;
|
||||
_logger = logger;
|
||||
_coreConfigPath = Path.Join(scriptHostConfiguration.ConfigsPath, "core.json");
|
||||
}
|
||||
@@ -120,9 +124,14 @@ namespace CounterStrikeSharp.API.Core
|
||||
|
||||
public void Load()
|
||||
{
|
||||
CommandUtils.AddStandaloneCommand("css_core_reload", "Reloads the core configuration file.",
|
||||
ReloadCoreConfigCommand);
|
||||
|
||||
if (!_commandsRegistered)
|
||||
{
|
||||
_commandManager.RegisterCommand(new CommandDefinition("css_core_reload",
|
||||
"Reloads the core configuration file.",
|
||||
ReloadCoreConfigCommand));
|
||||
_commandsRegistered = true;
|
||||
}
|
||||
|
||||
if (!File.Exists(_coreConfigPath))
|
||||
{
|
||||
_logger.LogWarning(
|
||||
|
||||
@@ -22,9 +22,22 @@ using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes the lifetime of a function reference.
|
||||
/// </summary>
|
||||
public enum FunctionLifetime
|
||||
{
|
||||
/// <summary>Delegate will be removed after the first invocation.</summary>
|
||||
SingleUse,
|
||||
/// <summary>Delegate will remain in memory for the lifetime of the application.</summary>
|
||||
Permanent
|
||||
}
|
||||
|
||||
public class FunctionReference
|
||||
{
|
||||
private readonly Delegate m_method;
|
||||
|
||||
public FunctionLifetime Lifetime { get; set; } = FunctionLifetime.Permanent;
|
||||
|
||||
public unsafe delegate void CallbackDelegate(fxScriptContext* context);
|
||||
private CallbackDelegate s_callback;
|
||||
@@ -59,12 +72,13 @@ namespace CounterStrikeSharp.API.Core
|
||||
if (typeof(NativeObject).IsAssignableFrom(param.ParameterType))
|
||||
{
|
||||
obj = Activator.CreateInstance(param.ParameterType,
|
||||
new[] {scriptContext.GetArgument(typeof(IntPtr), i)});
|
||||
new[] { scriptContext.GetArgument(typeof(IntPtr), i) });
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = scriptContext.GetArgument(param.ParameterType, i);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}).ToArray();
|
||||
|
||||
@@ -79,6 +93,15 @@ namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
Application.Instance.Logger.LogError(e, "Error invoking callback");
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (Lifetime == FunctionLifetime.SingleUse)
|
||||
{
|
||||
Remove(Identifier);
|
||||
if (references.ContainsKey(m_method))
|
||||
references.Remove(m_method);
|
||||
}
|
||||
}
|
||||
});
|
||||
s_callback = dg;
|
||||
}
|
||||
@@ -98,7 +121,7 @@ namespace CounterStrikeSharp.API.Core
|
||||
var referenceId = Register(reference);
|
||||
|
||||
reference.Identifier = referenceId;
|
||||
|
||||
|
||||
return reference;
|
||||
}
|
||||
|
||||
|
||||
@@ -7119,6 +7119,15 @@ namespace CounterStrikeSharp.API.Core
|
||||
}
|
||||
}
|
||||
|
||||
[EventName("warmup_end")]
|
||||
public class EventWarmupEnd : GameEvent
|
||||
{
|
||||
public EventWarmupEnd(IntPtr pointer) : base(pointer){}
|
||||
public EventWarmupEnd(bool force) : base("warmup_end", force){}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[EventName("weapon_fire")]
|
||||
public class EventWeaponFire : GameEvent
|
||||
{
|
||||
|
||||
@@ -18,6 +18,12 @@ public interface IScriptHostConfiguration
|
||||
/// </summary>
|
||||
string PluginPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the absolute path to the directory that contains CounterStrikeSharp plugin shared APIS.
|
||||
/// e.g. /game/csgo/addons/counterstrikesharp/shared
|
||||
/// </summary>
|
||||
string SharedPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the absolute path to the directory that contains CounterStrikeSharp configs.
|
||||
/// e.g. /game/csgo/addons/counterstrikesharp/configs
|
||||
|
||||
@@ -7,12 +7,14 @@ internal sealed class ScriptHostConfiguration : IScriptHostConfiguration
|
||||
{
|
||||
public string RootPath { get; }
|
||||
public string PluginPath { get; }
|
||||
public string SharedPath { get; }
|
||||
public string ConfigsPath { get; }
|
||||
public string GameDataPath { get; }
|
||||
|
||||
public ScriptHostConfiguration(IHostEnvironment hostEnvironment)
|
||||
{
|
||||
RootPath = Path.Join(new[] { hostEnvironment.ContentRootPath });
|
||||
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" });
|
||||
|
||||
@@ -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;
|
||||
using CounterStrikeSharp.API.Core.Commands;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@@ -52,11 +53,21 @@ namespace CounterStrikeSharp.API.Core
|
||||
/// </summary>
|
||||
void Unload(bool hotReload);
|
||||
|
||||
/// <summary>
|
||||
/// Will be called by CounterStrikeSharp after all plugins have been loaded.
|
||||
/// This will also be called for convenience after a reload or a late l oad, so that you don't have to handle
|
||||
/// re-wiring everything.
|
||||
/// </summary>
|
||||
/// <param name="hotReload"></param>
|
||||
void OnAllPluginsLoaded(bool hotReload);
|
||||
|
||||
string ModulePath { get; internal set; }
|
||||
|
||||
ILogger Logger { get; set; }
|
||||
|
||||
IStringLocalizer Localizer { get; set; }
|
||||
|
||||
ICommandManager CommandManager { get; set; }
|
||||
|
||||
void RegisterAllAttributes(object instance);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core
|
||||
{
|
||||
@@ -154,5 +155,13 @@ namespace CounterStrikeSharp.API.Core
|
||||
/// <param name="simulating"><see langword="true"/> if simulating, <see langword="false"/> otherwise</param>
|
||||
[ListenerName("OnServerPreWorldUpdate")]
|
||||
public delegate void OnServerPreWorldUpdate(bool simulating);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Called when the server precaching resources (only when initial startup / changing map).
|
||||
/// </summary>
|
||||
/// <param name="manifest">Resource Manifest</param>
|
||||
[ListenerName("OnServerPrecacheResources")]
|
||||
public delegate void OnServerPrecacheResources(ResourceManifest manifest);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
|
||||
@@ -6,14 +7,20 @@ namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CBaseEntity
|
||||
{
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void Teleport(Vector position, QAngle angles, Vector velocity)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunction.CreateVoid<IntPtr, IntPtr, IntPtr, IntPtr>(Handle, GameData.GetOffset("CBaseEntity_Teleport"))(
|
||||
Handle, position.Handle, angles.Handle, velocity.Handle);
|
||||
}
|
||||
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void DispatchSpawn()
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunctions.CBaseEntity_DispatchSpawn(Handle, IntPtr.Zero);
|
||||
}
|
||||
|
||||
@@ -25,7 +32,13 @@ public partial class CBaseEntity
|
||||
/// <summary>
|
||||
/// Shorthand for accessing an entity's CBodyComponent?.SceneNode?.AbsRotation;
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public QAngle? AbsRotation => CBodyComponent?.SceneNode?.AbsRotation;
|
||||
|
||||
public T? GetVData<T>() where T : CEntitySubclassVDataBase => (T)Activator.CreateInstance(typeof(T), Marshal.ReadIntPtr(SubclassID.Handle + 8));
|
||||
public T? GetVData<T>() where T : CEntitySubclassVDataBase
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
return (T) Activator.CreateInstance(typeof(T), Marshal.ReadIntPtr(SubclassID.Handle + 4));
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,11 @@ namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CBaseModelEntity
|
||||
{
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void SetModel(string model)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunctions.SetModel(Handle, model);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using CounterStrikeSharp.API.Modules.Cvars;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Entities.Constants;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CBasePlayerController
|
||||
{
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void SetPawn(CBasePlayerPawn? pawn)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
if (pawn is null) return;
|
||||
if (!pawn.IsValid) return;
|
||||
VirtualFunctions.CBasePlayerController_SetPawnFunc.Invoke(this, pawn, true, false);
|
||||
}
|
||||
}
|
||||
@@ -10,17 +10,24 @@ public partial class CBasePlayerPawn
|
||||
/// </summary>
|
||||
/// <param name="explode"></param>
|
||||
/// <param name="force"></param>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void CommitSuicide(bool explode, bool force)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunction.CreateVoid<IntPtr, bool, bool>(Handle, GameData.GetOffset("CBasePlayerPawn_CommitSuicide"))(Handle, explode, force);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Remove Player Item
|
||||
/// </summary>
|
||||
/// <param name="weapon"></param>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void RemovePlayerItem(CBasePlayerWeapon weapon)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
Guard.IsValidEntity(weapon);
|
||||
|
||||
VirtualFunctions.RemovePlayerItemVirtual(Handle, weapon.Handle);
|
||||
}
|
||||
}
|
||||
@@ -10,19 +10,16 @@ namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CCSPlayerController
|
||||
{
|
||||
public int? UserId
|
||||
{
|
||||
get
|
||||
{
|
||||
return NativeAPI.GetUseridFromIndex((int)this.Index);
|
||||
}
|
||||
}
|
||||
|
||||
public CsTeam Team => (CsTeam)this.TeamNum;
|
||||
public int? UserId => NativeAPI.GetUseridFromIndex((int)Index);
|
||||
public CsTeam Team => (CsTeam)TeamNum;
|
||||
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public IntPtr GiveNamedItem(string item)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
if (!PlayerPawn.IsValid) return 0;
|
||||
if (PlayerPawn.Value == null) return 0;
|
||||
if (!PlayerPawn.Value.IsValid) return 0;
|
||||
if (PlayerPawn.Value.ItemServices == null) return 0;
|
||||
|
||||
@@ -37,28 +34,40 @@ public partial class CCSPlayerController
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
|
||||
return this.GiveNamedItem(itemString);
|
||||
return GiveNamedItem(itemString);
|
||||
}
|
||||
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void PrintToConsole(string message)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
NativeAPI.PrintToConsole((int)Index, $"{message}\n\0");
|
||||
}
|
||||
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void PrintToChat(string message)
|
||||
{
|
||||
VirtualFunctions.ClientPrint(this.Handle, HudDestination.Chat, message, 0, 0, 0, 0);
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunctions.ClientPrint(Handle, HudDestination.Chat, message, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void PrintToCenter(string message)
|
||||
{
|
||||
VirtualFunctions.ClientPrint(this.Handle, HudDestination.Center, message, 0, 0, 0, 0);
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunctions.ClientPrint(Handle, HudDestination.Center, message, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
public void PrintToCenterHtml(string message) => PrintToCenterHtml(message, 5);
|
||||
|
||||
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void PrintToCenterHtml(string message, int duration)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
var @event = new EventShowSurvivalRespawnStatus(true)
|
||||
{
|
||||
LocToken = message,
|
||||
@@ -71,25 +80,32 @@ public partial class CCSPlayerController
|
||||
/// <summary>
|
||||
/// Drops the active player weapon on the ground.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void DropActiveWeapon()
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
if (!PlayerPawn.IsValid) return;
|
||||
if (PlayerPawn.Value == null) return;
|
||||
if (!PlayerPawn.Value.IsValid) return;
|
||||
if (PlayerPawn.Value.ItemServices == null) return;
|
||||
if (PlayerPawn.Value.WeaponServices == null) return;
|
||||
if (!PlayerPawn.Value.WeaponServices.ActiveWeapon.IsValid) return;
|
||||
|
||||
CCSPlayer_ItemServices itemServices = new CCSPlayer_ItemServices(PlayerPawn.Value.ItemServices.Handle);
|
||||
CCSPlayer_WeaponServices weponServices = new CCSPlayer_WeaponServices(PlayerPawn.Value.WeaponServices.Handle);
|
||||
itemServices.DropActivePlayerWeapon(weponServices.ActiveWeapon.Value);
|
||||
CCSPlayer_WeaponServices weaponServices = new CCSPlayer_WeaponServices(PlayerPawn.Value.WeaponServices.Handle);
|
||||
|
||||
itemServices.DropActivePlayerWeapon(weaponServices.ActiveWeapon.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes every weapon from the player.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void RemoveWeapons()
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
if (!PlayerPawn.IsValid) return;
|
||||
if (PlayerPawn.Value == null) return;
|
||||
if (!PlayerPawn.Value.IsValid) return;
|
||||
if (PlayerPawn.Value.ItemServices == null) return;
|
||||
|
||||
@@ -102,9 +118,12 @@ public partial class CCSPlayerController
|
||||
/// </summary>
|
||||
/// <param name="explode"></param>
|
||||
/// <param name="force"></param>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void CommitSuicide(bool explode, bool force)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
if (!PlayerPawn.IsValid) return;
|
||||
if (PlayerPawn.Value == null) return;
|
||||
if (!PlayerPawn.Value.IsValid) return;
|
||||
|
||||
PlayerPawn.Value.CommitSuicide(explode, force);
|
||||
@@ -113,12 +132,16 @@ public partial class CCSPlayerController
|
||||
/// <summary>
|
||||
/// Respawn player
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void Respawn()
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
if (!PlayerPawn.IsValid) return;
|
||||
if (PlayerPawn.Value == null) return;
|
||||
if (!PlayerPawn.Value.IsValid) return;
|
||||
|
||||
VirtualFunctions.CCSPlayerPawn_Respawn(PlayerPawn.Value.Handle);
|
||||
// The Call To Arms update appears to have invalidated the need for CCSPlayerPawn_Respawn.
|
||||
SetPawn(PlayerPawn.Value);
|
||||
VirtualFunction.CreateVoid<IntPtr>(Handle, GameData.GetOffset("CCSPlayerController_Respawn"))(Handle);
|
||||
}
|
||||
|
||||
@@ -128,9 +151,12 @@ public partial class CCSPlayerController
|
||||
/// Forcibly switches the team of the player, the player will remain alive and keep their weapons.
|
||||
/// </summary>
|
||||
/// <param name="team">The team to switch to</param>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void SwitchTeam(CsTeam team)
|
||||
{
|
||||
VirtualFunctions.SwitchTeam(this.Handle, (byte)team);
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunctions.SwitchTeam(Handle, (byte)team);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -140,8 +166,11 @@ public partial class CCSPlayerController
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
/// <param name="team">The team to change to</param>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void ChangeTeam(CsTeam team)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunction.CreateVoid<IntPtr, CsTeam>(Handle, GameData.GetOffset("CCSPlayerController_ChangeTeam"))(Handle,
|
||||
team);
|
||||
}
|
||||
@@ -151,9 +180,12 @@ public partial class CCSPlayerController
|
||||
/// </summary>
|
||||
/// <param name="conVar">Name of the convar to retrieve</param>
|
||||
/// <returns>ConVar string value</returns>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public string GetConVarValue(string conVar)
|
||||
{
|
||||
return NativeAPI.GetClientConvarValue(this.Slot, conVar);
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
return NativeAPI.GetClientConvarValue(Slot, conVar);
|
||||
}
|
||||
|
||||
public string GetConVarValue(ConVar? conVar)
|
||||
@@ -171,15 +203,14 @@ public partial class CCSPlayerController
|
||||
/// </summary>
|
||||
/// <param name="conVar">Console variable name</param>
|
||||
/// <param name="value">String value to set</param>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
/// <exception cref="InvalidOperationException">Player is not a bot</exception>
|
||||
public void SetFakeClientConVar(string conVar, string value)
|
||||
{
|
||||
if (!IsBot)
|
||||
{
|
||||
throw new InvalidOperationException("'SetFakeClientConVar' can only be called for fake clients (bots)");
|
||||
}
|
||||
Guard.IsValidEntity(this);
|
||||
if (!IsBot) throw new InvalidOperationException("'SetFakeClientConVar' can only be called for fake clients (bots)");
|
||||
|
||||
NativeAPI.SetFakeClientConvarValue(this.Slot, conVar, value);
|
||||
NativeAPI.SetFakeClientConvarValue(Slot, conVar, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -202,20 +233,50 @@ public partial class CCSPlayerController
|
||||
/// </summary>
|
||||
public PlayerButtons Buttons => (PlayerButtons)Pawn.Value.MovementServices!.Buttons.ButtonStates[0];
|
||||
|
||||
public void ExecuteClientCommand(string command) => NativeAPI.IssueClientCommand(Slot, command);
|
||||
/// <summary>
|
||||
/// Issue the specified command to the specified client (mimics that client typing the command at the console).
|
||||
/// Note: Only works for some commands, marked with the FCVAR_CLIENT_CAN_EXECUTE flag (not many).
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void ExecuteClientCommand(string command)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
NativeAPI.IssueClientCommand(Slot, command);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Issue the specified command directly from the server (mimics the server executing the command with the given player context).
|
||||
/// <remarks>Works with server commands like `kill`, `explode`, `noclip`, etc. </remarks>
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void ExecuteClientCommandFromServer(string command)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
NativeAPI.IssueClientCommandFromServer(Slot, command);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides who a player can hear in voice chat.
|
||||
/// </summary>
|
||||
/// <param name="sender">Player talking in the voice chat</param>
|
||||
/// <param name="override">Whether the talker should be heard</param>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void SetListenOverride(CCSPlayerController sender, ListenOverride @override)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
NativeAPI.SetClientListening(Handle, sender.Handle, (Byte)@override);
|
||||
}
|
||||
|
||||
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public ListenOverride GetListenOverride(CCSPlayerController sender)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
return NativeAPI.GetClientListening(Handle, sender.Handle);
|
||||
}
|
||||
|
||||
@@ -224,28 +285,32 @@ public partial class CCSPlayerController
|
||||
/// <summary>
|
||||
/// Returns the authorized SteamID of this user which has been validated with the SteamAPI.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public SteamID? AuthorizedSteamID
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!this.IsValid) return null;
|
||||
var authorizedSteamId = NativeAPI.GetPlayerAuthorizedSteamid(this.Slot);
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
var authorizedSteamId = NativeAPI.GetPlayerAuthorizedSteamid(Slot);
|
||||
if ((long)authorizedSteamId == -1) return null;
|
||||
|
||||
return (SteamID)authorizedSteamId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the IP address (and possibly port) of this player.
|
||||
/// <remarks>Returns 127.0.0.1 if the player is a bot.</remarks>
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public string? IpAddress
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!this.IsValid) return null;
|
||||
var ipAddress = NativeAPI.GetPlayerIpAddress(this.Slot);
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
var ipAddress = NativeAPI.GetPlayerIpAddress(Slot);
|
||||
if (string.IsNullOrWhiteSpace(ipAddress)) return null;
|
||||
|
||||
return ipAddress;
|
||||
@@ -255,11 +320,19 @@ public partial class CCSPlayerController
|
||||
/// <summary>
|
||||
/// Determines how the player interacts with voice chat.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public VoiceFlags VoiceFlags
|
||||
{
|
||||
get => (VoiceFlags)NativeAPI.GetClientVoiceFlags(Handle);
|
||||
get
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
return (VoiceFlags)NativeAPI.GetClientVoiceFlags(Handle);
|
||||
}
|
||||
set
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
NativeAPI.SetClientVoiceFlags(Handle, (Byte)value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
using System;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core;
|
||||
|
||||
public partial class CCSPlayerPawn
|
||||
{
|
||||
/// <summary>
|
||||
/// Respawn player
|
||||
/// </summary>
|
||||
public void Respawn()
|
||||
{
|
||||
if (!Controller.IsValid) return;
|
||||
if (!Controller.Value.IsValid) return;
|
||||
/// <summary>
|
||||
/// Respawn player
|
||||
/// </summary>
|
||||
|
||||
VirtualFunctions.CCSPlayerPawn_Respawn(Handle);
|
||||
VirtualFunction.CreateVoid<IntPtr>(Controller.Value.Handle, GameData.GetOffset("CCSPlayerController_Respawn"))(Controller.Value.Handle);
|
||||
}
|
||||
}
|
||||
[Obsolete("Use CCSPlayerController.Respawn() instead")]
|
||||
public void Respawn()
|
||||
{
|
||||
if (!Controller.IsValid) return;
|
||||
if (!Controller.Value.IsValid) return;
|
||||
|
||||
Application.Instance.Logger.LogWarning("CCSPawn.Respawn is deprecated and does nothing, use CCSPlayerController.Respawn instead");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,16 +23,26 @@ public partial class CCSPlayer_ItemServices
|
||||
/// <summary>
|
||||
/// Drops the active player weapon on the ground.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">ItemServices points to null</exception>
|
||||
public void DropActivePlayerWeapon(CBasePlayerWeapon activeWeapon)
|
||||
{
|
||||
if(Handle == IntPtr.Zero)
|
||||
throw new InvalidOperationException("ItemServices points to null.");
|
||||
|
||||
Guard.IsValidEntity(activeWeapon);
|
||||
|
||||
VirtualFunction.CreateVoid<nint, nint>(Handle, GameData.GetOffset("CCSPlayer_ItemServices_DropActivePlayerWeapon"))(Handle, activeWeapon.Handle);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Removes every weapon from the player.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">ItemServices points to null</exception>
|
||||
public void RemoveWeapons()
|
||||
{
|
||||
if (Handle == IntPtr.Zero)
|
||||
throw new InvalidOperationException("ItemServices points to null.");
|
||||
|
||||
VirtualFunction.CreateVoid<nint>(Handle, GameData.GetOffset("CCSPlayer_ItemServices_RemoveWeapons"))(Handle);
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,12 @@ public partial class CEntityInstance : IEquatable<CEntityInstance>
|
||||
|
||||
public string DesignerName => IsValid ? Entity?.DesignerName : null;
|
||||
|
||||
public void Remove() => VirtualFunctions.UTIL_Remove(this.Handle);
|
||||
public void Remove()
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunctions.UTIL_Remove(this.Handle);
|
||||
}
|
||||
|
||||
public bool Equals(CEntityInstance? other)
|
||||
{
|
||||
@@ -58,7 +63,7 @@ public partial class CEntityInstance : IEquatable<CEntityInstance>
|
||||
{
|
||||
return !Equals(left, right);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calls a named input method on an entity.
|
||||
/// <example>
|
||||
@@ -72,8 +77,11 @@ public partial class CEntityInstance : IEquatable<CEntityInstance>
|
||||
/// <param name="caller">Entity that is sending the event, <see langword="null"/> for no entity</param>
|
||||
/// <param name="value">String variant value to send with the event</param>
|
||||
/// <param name="outputId">Unknown, defaults to 0</param>
|
||||
/// <exception cref="InvalidOperationException">Entity is not valid</exception>
|
||||
public void AcceptInput(string inputName, CEntityInstance? activator = null, CEntityInstance? caller = null, string value = "", int outputId = 0)
|
||||
{
|
||||
Guard.IsValidEntity(this);
|
||||
|
||||
VirtualFunctions.AcceptInput(Handle, inputName, activator?.Handle ?? IntPtr.Zero, caller?.Handle ?? IntPtr.Zero, value, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,11 @@ public partial class CGameSceneNode
|
||||
/// <summary>
|
||||
/// Gets the <see cref="CSkeletonInstance"/> instance from the node.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">GameSceneNode points to null</exception>
|
||||
public CSkeletonInstance GetSkeletonInstance()
|
||||
{
|
||||
if (Handle == IntPtr.Zero) throw new InvalidOperationException("GameSceneNode points to null.");
|
||||
|
||||
return new CSkeletonInstance(VirtualFunction.Create<nint, nint>(Handle, GameData.GetOffset("CGameSceneNode_GetSkeletonInstance"))(Handle));
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Loader;
|
||||
using CounterStrikeSharp.API.Core.Commands;
|
||||
using CounterStrikeSharp.API.Core.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CounterStrikeSharp.API.Core.Plugin.Host;
|
||||
@@ -9,12 +12,14 @@ 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;
|
||||
|
||||
public PluginManager(IScriptHostConfiguration scriptHostConfiguration, ILogger<PluginManager> logger, IServiceProvider serviceProvider)
|
||||
public PluginManager(IScriptHostConfiguration scriptHostConfiguration, ICommandManager commandManager, ILogger<PluginManager> logger, IServiceProvider serviceProvider, IServiceScopeFactory serviceScopeFactory)
|
||||
{
|
||||
_scriptHostConfiguration = scriptHostConfiguration;
|
||||
_commandManager = commandManager;
|
||||
_logger = logger;
|
||||
_serviceProvider = serviceProvider;
|
||||
}
|
||||
@@ -26,6 +31,23 @@ public class PluginManager : IPluginManager
|
||||
.Select(dir => Path.Combine(dir, Path.GetFileName(dir) + ".dll"))
|
||||
.Where(File.Exists)
|
||||
.ToArray();
|
||||
|
||||
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
|
||||
{
|
||||
AssemblyLoadContext.Default.LoadFromAssemblyPath(sharedAssemblyPath);
|
||||
} catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "Failed to load shared assembly from {Path}", sharedAssemblyPath);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var path in pluginAssemblyPaths)
|
||||
{
|
||||
@@ -38,6 +60,11 @@ public class PluginManager : IPluginManager
|
||||
_logger.LogError(e, "Failed to load plugin from {Path}", path);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var plugin in _loadedPluginContexts)
|
||||
{
|
||||
plugin.Plugin.OnAllPluginsLoaded(false);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<PluginContext> GetLoadedPlugins()
|
||||
@@ -47,7 +74,7 @@ public class PluginManager : IPluginManager
|
||||
|
||||
public void LoadPlugin(string path)
|
||||
{
|
||||
var plugin = new PluginContext(_serviceProvider, _scriptHostConfiguration, path, _loadedPluginContexts.Select(x => x.PluginId).DefaultIfEmpty(0).Max() + 1);
|
||||
var plugin = new PluginContext(_serviceProvider, _commandManager, _scriptHostConfiguration, path, _loadedPluginContexts.Select(x => x.PluginId).DefaultIfEmpty(0).Max() + 1);
|
||||
_loadedPluginContexts.Add(plugin);
|
||||
plugin.Load();
|
||||
}
|
||||
|
||||
@@ -18,9 +18,11 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
using CounterStrikeSharp.API.Core.Commands;
|
||||
using CounterStrikeSharp.API.Core.Hosting;
|
||||
using CounterStrikeSharp.API.Core.Logging;
|
||||
using CounterStrikeSharp.API.Core.Translations;
|
||||
using CounterStrikeSharp.API.Core.Plugin.Host;
|
||||
using McMaster.NETCore.Plugins;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
@@ -38,35 +40,41 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
|
||||
private PluginLoader Loader { get; set; }
|
||||
|
||||
private IServiceProvider ServiceProvider { get; set; }
|
||||
private ServiceProvider ServiceProvider { get; set; }
|
||||
|
||||
public int PluginId { get; }
|
||||
|
||||
private readonly ICommandManager _commandManager;
|
||||
private readonly IScriptHostConfiguration _hostConfiguration;
|
||||
private readonly string _path;
|
||||
private readonly FileSystemWatcher _fileWatcher;
|
||||
private readonly IServiceProvider _applicationServiceProvider;
|
||||
|
||||
public string FilePath => _path;
|
||||
private IServiceScope _serviceScope;
|
||||
|
||||
// TOOD: ServiceCollection
|
||||
private ILogger _logger = CoreLogging.Factory.CreateLogger<PluginContext>();
|
||||
|
||||
public PluginContext(IServiceProvider applicationServiceProvider, IScriptHostConfiguration hostConfiguration, string path, int id)
|
||||
public PluginContext(IServiceProvider applicationServiceProvider, ICommandManager commandManager,
|
||||
IScriptHostConfiguration hostConfiguration,
|
||||
string path, int id)
|
||||
{
|
||||
_applicationServiceProvider = applicationServiceProvider;
|
||||
_commandManager = commandManager;
|
||||
_hostConfiguration = hostConfiguration;
|
||||
_path = path;
|
||||
PluginId = id;
|
||||
|
||||
|
||||
Loader = PluginLoader.CreateFromAssemblyFile(path,
|
||||
new[]
|
||||
{
|
||||
typeof(IPlugin), typeof(ILogger), typeof(IServiceCollection), typeof(IPluginServiceCollection<>)
|
||||
typeof(IPlugin), typeof(ILogger), typeof(IServiceCollection), typeof(IPluginServiceCollection<>),
|
||||
typeof(ICommandManager)
|
||||
}, config =>
|
||||
{
|
||||
config.EnableHotReload = true;
|
||||
config.IsUnloadable = true;
|
||||
config.PreferSharedTypes = true;
|
||||
});
|
||||
|
||||
if (CoreConfig.PluginHotReloadEnabled)
|
||||
@@ -102,6 +110,7 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
Loader = eventargs.Loader;
|
||||
Unload(hotReload: true);
|
||||
Load(hotReload: true);
|
||||
Plugin.OnAllPluginsLoaded(hotReload: true);
|
||||
});
|
||||
|
||||
return Task.CompletedTask;
|
||||
@@ -168,12 +177,14 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
method?.Invoke(pluginServiceCollection, new object[] { serviceCollection });
|
||||
}
|
||||
}
|
||||
|
||||
serviceCollection.AddScoped<ICommandManager>(c => _commandManager);
|
||||
serviceCollection.DecorateSingleton<ICommandManager, PluginCommandManagerDecorator>();
|
||||
|
||||
serviceCollection.AddSingleton<IPluginContext>(this);
|
||||
serviceCollection.TryAddSingleton<IStringLocalizerFactory, JsonStringLocalizerFactory>();
|
||||
serviceCollection.TryAddTransient(typeof(IStringLocalizer<>), typeof(StringLocalizer<>));
|
||||
serviceCollection.TryAddTransient(typeof(IStringLocalizer), typeof(StringLocalizer));
|
||||
|
||||
ServiceProvider = serviceCollection.BuildServiceProvider();
|
||||
|
||||
var minimumApiVersion = pluginType.GetCustomAttribute<MinimumApiVersion>()?.Version;
|
||||
@@ -186,13 +197,18 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
|
||||
_logger.LogInformation("Loading plugin {Name}", pluginType.Assembly.GetName().Name);
|
||||
|
||||
Plugin = ServiceProvider.GetRequiredService(pluginType) as IPlugin;
|
||||
|
||||
_serviceScope = ServiceProvider.CreateScope();
|
||||
|
||||
Plugin = _serviceScope.ServiceProvider.GetRequiredService(pluginType) as IPlugin;
|
||||
|
||||
if (Plugin == null) throw new Exception("Unable to create plugin instance");
|
||||
|
||||
|
||||
State = PluginState.Loading;
|
||||
|
||||
Plugin.ModulePath = _path;
|
||||
Plugin.Logger = _serviceScope.ServiceProvider.GetRequiredService<ILoggerFactory>()
|
||||
.CreateLogger(pluginType);
|
||||
Plugin.CommandManager = _serviceScope.ServiceProvider.GetRequiredService<ICommandManager>();
|
||||
Plugin.RegisterAllAttributes(Plugin);
|
||||
Plugin.Localizer = ServiceProvider.GetRequiredService<IStringLocalizer>();
|
||||
Plugin.Logger = ServiceProvider.GetRequiredService<ILoggerFactory>().CreateLogger(pluginType);
|
||||
@@ -206,6 +222,7 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Unload(bool hotReload = false)
|
||||
{
|
||||
if (State == PluginState.Unloaded) return;
|
||||
@@ -218,6 +235,7 @@ namespace CounterStrikeSharp.API.Core.Plugin
|
||||
Plugin.Unload(hotReload);
|
||||
|
||||
Plugin.Dispose();
|
||||
_serviceScope.Dispose();
|
||||
|
||||
_logger.LogInformation("Finished unloading plugin {Name}", cachedName);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
// <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 Int32 SoundType => ref Schema.GetRef<Int32>(this.Handle, "CAISound", "m_iSoundType");
|
||||
|
||||
// m_iSoundContext
|
||||
[SchemaMember("CAISound", "m_iSoundContext")]
|
||||
public ref Int32 SoundContext => ref Schema.GetRef<Int32>(this.Handle, "CAISound", "m_iSoundContext");
|
||||
|
||||
// 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); }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// <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_ChangeHintGroup : CBaseEntity
|
||||
{
|
||||
public CAI_ChangeHintGroup (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_iSearchType
|
||||
[SchemaMember("CAI_ChangeHintGroup", "m_iSearchType")]
|
||||
public ref Int32 SearchType => ref Schema.GetRef<Int32>(this.Handle, "CAI_ChangeHintGroup", "m_iSearchType");
|
||||
|
||||
// m_strSearchName
|
||||
[SchemaMember("CAI_ChangeHintGroup", "m_strSearchName")]
|
||||
public string StrSearchName
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CAI_ChangeHintGroup", "m_strSearchName"); }
|
||||
set { Schema.SetString(this.Handle, "CAI_ChangeHintGroup", "m_strSearchName", value); }
|
||||
}
|
||||
|
||||
// m_strNewHintGroup
|
||||
[SchemaMember("CAI_ChangeHintGroup", "m_strNewHintGroup")]
|
||||
public string StrNewHintGroup
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CAI_ChangeHintGroup", "m_strNewHintGroup"); }
|
||||
set { Schema.SetString(this.Handle, "CAI_ChangeHintGroup", "m_strNewHintGroup", value); }
|
||||
}
|
||||
|
||||
// m_flRadius
|
||||
[SchemaMember("CAI_ChangeHintGroup", "m_flRadius")]
|
||||
public ref float Radius => ref Schema.GetRef<float>(this.Handle, "CAI_ChangeHintGroup", "m_flRadius");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// <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_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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// <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_ExpresserWithFollowup : CAI_Expresser
|
||||
{
|
||||
public CAI_ExpresserWithFollowup (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_pPostponedFollowup
|
||||
[SchemaMember("CAI_ExpresserWithFollowup", "m_pPostponedFollowup")]
|
||||
public ResponseFollowup? PostponedFollowup => Schema.GetPointer<ResponseFollowup>(this.Handle, "CAI_ExpresserWithFollowup", "m_pPostponedFollowup");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// <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 CAK47 : CCSWeaponBaseGun
|
||||
{
|
||||
public CAK47 (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// <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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// <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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// <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 CAttributeContainer : CAttributeManager
|
||||
{
|
||||
public CAttributeContainer (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_Item
|
||||
[SchemaMember("CAttributeContainer", "m_Item")]
|
||||
public CEconItemView Item => Schema.GetDeclaredClass<CEconItemView>(this.Handle, "CAttributeContainer", "m_Item");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// <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 CAttributeList : NativeObject
|
||||
{
|
||||
public CAttributeList (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_Attributes
|
||||
[SchemaMember("CAttributeList", "m_Attributes")]
|
||||
public NetworkedVector<CEconItemAttribute> Attributes => Schema.GetDeclaredClass<NetworkedVector<CEconItemAttribute>>(this.Handle, "CAttributeList", "m_Attributes");
|
||||
|
||||
// m_pManager
|
||||
[SchemaMember("CAttributeList", "m_pManager")]
|
||||
public CAttributeManager? Manager => Schema.GetPointer<CAttributeManager>(this.Handle, "CAttributeList", "m_pManager");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// <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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
// <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_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_bPvsModifyEntity
|
||||
[SchemaMember("CBarnLight", "m_bPvsModifyEntity")]
|
||||
public ref bool PvsModifyEntity => ref Schema.GetRef<bool>(this.Handle, "CBarnLight", "m_bPvsModifyEntity");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
// <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_pRagdollPose
|
||||
[SchemaMember("CBaseAnimGraph", "m_pRagdollPose")]
|
||||
public PhysicsRagdollPose_t? RagdollPose => Schema.GetPointer<PhysicsRagdollPose_t>(this.Handle, "CBaseAnimGraph", "m_pRagdollPose");
|
||||
|
||||
// m_bClientRagdoll
|
||||
[SchemaMember("CBaseAnimGraph", "m_bClientRagdoll")]
|
||||
public ref bool ClientRagdoll => ref Schema.GetRef<bool>(this.Handle, "CBaseAnimGraph", "m_bClientRagdoll");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// <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_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 float PlaybackRate => Schema.GetDeclaredClass<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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
// <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_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); }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// <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_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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
// <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_flDetonateTime
|
||||
[SchemaMember("CBaseCSGrenadeProjectile", "m_flDetonateTime")]
|
||||
public ref float DetonateTime => ref Schema.GetRef<float>(this.Handle, "CBaseCSGrenadeProjectile", "m_flDetonateTime");
|
||||
|
||||
// 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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
// <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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// <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_flFieldOfView
|
||||
[SchemaMember("CBaseCombatCharacter", "m_flFieldOfView")]
|
||||
public ref float FieldOfView => ref Schema.GetRef<float>(this.Handle, "CBaseCombatCharacter", "m_flFieldOfView");
|
||||
|
||||
// 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_bloodColor
|
||||
[SchemaMember("CBaseCombatCharacter", "m_bloodColor")]
|
||||
public ref Int32 BloodColor => ref Schema.GetRef<Int32>(this.Handle, "CBaseCombatCharacter", "m_bloodColor");
|
||||
|
||||
// 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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// <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 CBaseDMStart : CPointEntity
|
||||
{
|
||||
public CBaseDMStart (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_Master
|
||||
[SchemaMember("CBaseDMStart", "m_Master")]
|
||||
public string Master
|
||||
{
|
||||
get { return Schema.GetUtf8String(this.Handle, "CBaseDMStart", "m_Master"); }
|
||||
set { Schema.SetString(this.Handle, "CBaseDMStart", "m_Master", value); }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
// <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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,341 @@
|
||||
// <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_nDisableContextThinkStartTick
|
||||
[SchemaMember("CBaseEntity", "m_nDisableContextThinkStartTick")]
|
||||
public ref Int32 DisableContextThinkStartTick => ref Schema.GetRef<Int32>(this.Handle, "CBaseEntity", "m_nDisableContextThinkStartTick");
|
||||
|
||||
// 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_bIsPlatform
|
||||
[SchemaMember("CBaseEntity", "m_bIsPlatform")]
|
||||
public ref bool IsPlatform => ref Schema.GetRef<bool>(this.Handle, "CBaseEntity", "m_bIsPlatform");
|
||||
|
||||
// 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_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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// <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 CBaseFilter : CLogicalEntity
|
||||
{
|
||||
public CBaseFilter (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
// m_bNegated
|
||||
[SchemaMember("CBaseFilter", "m_bNegated")]
|
||||
public ref bool Negated => ref Schema.GetRef<bool>(this.Handle, "CBaseFilter", "m_bNegated");
|
||||
|
||||
// m_OnPass
|
||||
[SchemaMember("CBaseFilter", "m_OnPass")]
|
||||
public CEntityIOOutput OnPass => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseFilter", "m_OnPass");
|
||||
|
||||
// m_OnFail
|
||||
[SchemaMember("CBaseFilter", "m_OnFail")]
|
||||
public CEntityIOOutput OnFail => Schema.GetDeclaredClass<CEntityIOOutput>(this.Handle, "CBaseFilter", "m_OnFail");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// <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");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// <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 ref UInt32 NextSceneEventId => ref Schema.GetRef<UInt32>(this.Handle, "CBaseFlex", "m_nNextSceneEventId");
|
||||
|
||||
// m_bUpdateLayerPriorities
|
||||
[SchemaMember("CBaseFlex", "m_bUpdateLayerPriorities")]
|
||||
public ref bool UpdateLayerPriorities => ref Schema.GetRef<bool>(this.Handle, "CBaseFlex", "m_bUpdateLayerPriorities");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// <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 CBaseFlexAlias_funCBaseFlex : CBaseFlex
|
||||
{
|
||||
public CBaseFlexAlias_funCBaseFlex (IntPtr pointer) : base(pointer) {}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
// <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");
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user