* Stop EntRefToEntIndex returning garbage if a bad parameter is passed Seen multiple bad usage of this function that works only because whatever was passed in was returned as it wasnt an entity reference. This code should have worked and would be expected to have returned something invalid but instead the the input was returned which allowed the code to work when really it is bad code. See for one such case https://discordapp.com/channels/335290997317697536/335290997317697536/736518488314871868 * Update documentation of EntRefToEntIndex Added the error text saying what shall be returned when a invalid parameter is passed. * Validate entity index instead of just returning INVALID_EHANDLE_INDEX Not sure if it needs this much validation but this just mirrors how IsValidEntity works, so the entity index returned should be valid else INVALID_EHANDLE_INDEX is returned. * EntRefToEntIndex improve doc comments to better represent functionality --------- Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com> |
||
---|---|---|
.github | ||
bridge/include | ||
configs | ||
core | ||
editor | ||
extensions | ||
gamedata | ||
hl2sdk-manifests@22f699a941 | ||
licenses | ||
loader | ||
plugins | ||
public | ||
sourcepawn@d59a51b574 | ||
tools | ||
translations | ||
versionlib | ||
.arcconfig | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
AMBuildScript | ||
appveyor.yml | ||
changelog.txt | ||
configure.py | ||
product.version | ||
pushbuild.txt | ||
README.md |
SourceMod
General
- SourceMod website: Source Engine scripting and server administration
- Forum: Discussion forum including plugin/extension development
- General documentation: Miscellaneous information about SourceMod
- Stable builds: The latest stable SourceMod releases
- Dev builds: Builds of recent development versions
Development
- Issue tracker: Issues that require back and forth communication
- Building SourceMod: Instructions on how to build SourceMod itself using AMBuild
- SourcePawn scripting: SourcePawn examples and introduction to the language
- SourceMod plugin API: Online SourceMod plugin API reference generated from the include files
- SourceMod extension development: C++ examples and introduction to various extension interfaces
- Translation project: Help translate SourceMod into your language
Contact
License
SourceMod is licensed under the GNU General Public License version 3. Special exceptions are outlined in the LICENSE.txt file inside of the licenses folder.