On NMRiH and possibly other games that use the Maphacks system,
entries that are modified using that system are rendered with tab
characters stripped out - see CNMRiHMapHackManager::GetEntDataString.
That results in there being no separators at all between keys and
values, as Maphacks receives the serialized string from Entity Lump
Manager.
This commit changes the key / value separator character to use
spaces instead.
This discovery upsets me greatly.
Fixes#1833.
The extended gameconfig format reads the master gameconf file twice;
once each for the base engine and actual engine. The file list
isn't checked for duplicates, so 'common.games.txt' is loaded in
twice, resulting in any 'common' file values potentially overriding
values listed under '#default' in other files due to
bShouldBeReadingDefault. This happens in the case when matching
game versions by CRC (such as public game branches).
Required for #1857.
This change ensures that the iterator values used by `std::distance`
is correct. Having the emplace within leads to the possibility of
`m_Entities.begin()` being invalidated due to reallocations.
* Add a PluginIterator methodmap
* Follow convention
* Update sourcemod.inc
* Turn method ReadPlugin into property Plugin
* Requested change
* Update sourcemod.inc
* Curse you VSC
* Follow behavior of other iterators instead of the natives
* Fix a stray space
* Implement a hacked CPluginIterator
* Oops
Copy paste go brr
* Revert a change made before the custom impl
Always perform signature searches on an unaltered copy of the binary. This avoids signature mismatches if the same function is detoured twice and thus the first bytes of the function were replaced by the detour.
This imports the brand new SourcePawn compiler. The new compiler is much
faster to compile and generates significantly improved code around
array generation and array access.
There are a number of compatibility changes in the new compiler. Most of
these are due to improved type checking and error detection. The full
list of notes can be found here:
https://github.com/alliedmodders/sourcepawn/blob/master/docs/upgrading-1.11.md
Additionally, .smx files generated by the new compiler will NOT load on
earlier versions of SourceMod, including earlier versions of 1.11. Old
plugins will continue to load as normal.
This bumps the handle bits to 20 and reduces the serial/cookie bits to
12. A warning is emitted if a single owner creates more than 100k
handles.
Tested on mock srcds with sm_dump_handles.
WriteCellArray and WriteFloatArray were allocating N+1 slots, but due to
a copy-paste error were writing N+2 slots. Much later in the process the
CRT would catch this and cause a crash - this was pretty painful to
debug but thankfully running SRCDS in CRT debug mode caught it much
sooner in CDataPack::RemoveItem.
* Start using Github Actions
Build on windows and linux. Cannot build for macos,
since the builders only support xcode 10+ which dropped
x86 support.
* Build sourcepawn tooling as separate package
Upload build artifacts containing only spcomp and the includes.
This adds a new `--scripting-only` flag to configure.py which skips
everything and goes straight to building spcomp and packaging the
include folder with it.
* Only run the workflows for the master branch
* Split common operations into PackageHelpers file
Don't duplicate the code for packaging releases for the tooling-only packages. Instead use a common `PackageHelpers` class which provides the functionality common to both packages.
This replaces the explicit list of files to package with a directory scan, so we don't have to list them all.
The pgsql sql-init-scripts were missing from the release package before, so they were added here as well. Three scripts from the testsuite were missing from the explicit list (mapdisplayname, floats, findmap), so they're now included.
* Fix Python 2 compatibility
os.scandir is Python 3 only.
* Harden plugin loading path requirements
Restrict loading of plugins to the `sourcemod/plugins` folder and require the `.smx` file extension.
Symlinks inside the `plugins` folder are fine.
This behavior was abused as part of justCTF 2020 in the PainterHell challenge by cypis. Thank you!
* Restrict extension loading to extensions folder
* Add NULL file extension check in LoadExtension
hi @KyleS