When a netprop is an array the name resolves to the outer DataTable
array, which we then need to recurse into to find the actual prop.
For string_t props we need their sendprop info to call the proxy
function to get their real storage address, but when accessing an array
we were trying to read the prop off the outer DataTable prop, rather
than the real string_t prop. Fix this by using the pProp variable that
FIND_PROP_SEND helpfully provides for us.
Tested by writing/reading the `m_szCrosshairCodes` array, which got
changed to a string_t prop sometime since #1372.
Fixes#1484
We were accidentally changing a process-wide global variable when trying to fetch a working ISteamGameServer interface.
Co-Authored-By: komashchenko <komashchenko@users.noreply.github.com>
When variant support was added for props, the validation checks in the
float related functions weren't updated to allow them.
Tested with the plugin from the forum thread with a spawned
`math_counter`.
Fixes#1501
On Linux if a detour crossed a page boundary we would only change the
memory protection of the first page (as we were aligning the address as
required, but not taking into account the length).
I don't have an easy way to test this but it looks correct. `addr + len`
doesn't appear to need to be aligned though, so another option could be
to use `(addr - startPage) + length` as len.
Also fixed a non-zero offset being passed into CDetour's ApplyPatch
function - this is never done internally anywhere, but it doesn't hurt
to fix it.
Fixes#984
The change in behaviour to the OnLevelInit forward params isn't obvious
when compiling a plugin, deprecate it to make it a lot more obvious that
something has changed.
Some plugins rely just on the timing of OnLevelInit rather than doing
anything with the entity lump, for these plugins offer a new OnMapInit
forward that is implemented in core rather than sdkhooks. If / when we
offer a new entity lump manipulation API in the future this'll be the
forward where it can be used to make changes.
Newer Source engine versions now use a dynamically allocated buffer for
the map entity lump, and some maps have over 16MB of entity data - far
larger than our 2MB limit.
There is no sane way we can currently handle this, so just remove the
functionality from the forward until a more comprehensive API can be
designed.
Fixes#1470
This increases the buffer for the map to be consistent with the other calls to GetCurrentMap. Also `currentmap` now uses the map's display name similar how `nextmap` uses it.
This fixes a number of parsing issues and compiler crashes, deprecates enum multipliers, fixes relative include paths on Windows, adds a `static_assert` statement for compile-time checks, and introduces new Linux profiling support.
The relative include paths change will probably break some non-portable projects that relied on the old broken behaviour, but the fix is straightforward. The `#include` directive is now always relative to the file where it is used, whereas on Windows it was previously relative to the initial input file passed to the compiler if `/` was used instead of `\` in include paths.
* Add support for Maxmind GeoIP2 database files (#913).
* Copy/paste error.
* Mark GeoipCode3 as deprecated.
* Fix build when compiling with AMBuild.
* Replace loose libmaxminddb files with submodule.
* Fix Linux build.
* One more hack for submodule.
* Actually fix Linux build.
* GeoIP2 extension to sourcemod
* Update basevotes
When a player leaves during a voteban, he will be banned anyway. Also added a cvar with a ban time setting.
* Update basevotes.sp
* Update AMBuilder
* ke::AString to std::string
* Update extension.cpp
* Update AMBuilder
* Added coordination natives
Added GeoipLatitude, GeoipLongitude, GeoipDistance natives.
* Create osdefs.h
* Update maxminddb_config.h
* Update extension.cpp
* Update extension.cpp
* Added automatic search for database file
* Fix automatic search for database file
* Update extension.cpp
* Update geoip.inc
* .gitmodules revert
* Update geoip.inc
* Update libmaxminddb to version 1.5.2
* Update extension.cpp
* Check language in the DB
* Removed langCount variable
* Determination of the client's language
* Update geoip.inc
* Update geoip.inc
* Update extension.cpp
* Update geoip.inc
* Update extension.cpp
* space instead of tab in .inc
* Update extension.cpp
* Update geoip.inc
* Optimizing length measurement region code
* Update package script to fetch the new GeoLite2 database
This package is the last CC-BY-SA licensed GeoLite2-City database extracted from https://src.fedoraproject.org/rpms/geolite2 from december 2019.
This doubles the download size for SM packages, but it's what we have to deal with atm :(
* Fix potentially returning uninitialized memory in GeoipRegionCode
If the lookup failed, we'd copy back whatever is on the stack in the ccode buffer.
Co-authored-by: Nick Hastings <nshastings@gmail.com>
Co-authored-by: Headline <michaelwflaherty@me.com>
Co-authored-by: Accelerator74 <dmitry@447751-accele74.tmweb.ru>
Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
This system is a bit sketchy but I didn't want to rework the entire thing. (If this were to be reworked, it should probably use ReplyToCommand for a lot of this).
This also allows the server to call ff and get a result.
* Add new method - Converts a bit string to a string of flag characters
* New syntax
* Set tags
* Fix tags
* Change method name
* Remove for - set null only once
* 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.
If lookup of the patch location failed, don't turn on responding to A2S_Rules queries. Otherwise we'll see the log getting spammed with too large packet sizes again. #1447