This patch removes almost all of the existing platform-specific
ThreadSupport code, as well as code derived from it. It is now
implemented on top of C++11 threads and is much simpler.
This is the first inclusion of STL in SourceMod. Mac and Windows are
allowed to dynamically link to their respective implementations. On
Linux, libstdc++ is statically linked, except in the cases where it was
already dynamically linked (csgo, blade).
IEventSignal has been retained because sourcemod-curl-extension relies
on it. As written, it is impossible to use as a condition variable,
because the caller does not have access to the underlying mutex. There
is no way to make this API safe or non-racy, so extensions relying on
it should switch to C++11 threads.
ThreadWorker is now pared down and does not interact or inherit from
BaseWorker in any way. Basic functionality has been tested. Since it is
not used anywhere in SourceMod, or seemingly in any repository on
GitHub, it's unclear whether it should even exist. But it has been
tested in this patch.
This change bumps the minimum macOS version to OS X 10.7, and the
minimum C++ standard level to C++14.
* Fix timelimit not correct for Black Mesa
Black Mesa is particular and use timelimit in seconds instead of minutes
* Update TimerSys.cpp
* Update TimerSys.cpp
* Update TimerSys.cpp
* Update TimerSys.cpp
The allocation size was still updated to the bigger size even if memory allocation failed. Trying to write to the supposedly available new space would overflow the heap and crash. Fixes#1233
* Fixed memory leak
When a pack was cleared or destroyed the String and Raw types could cause memory leaks. This happens when "position" is sitting at the end of the vector and can never get past the "if (pos >= elements.length())" statement. This means there is a memory leak in any plugin that clears/destroys a pack with strings and doesn't set the position to length-1 or less beforehand.
* datapack: Fix delete op on CDataPackType::Raw.
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* DarkM: build-fix for engine msg caching
* style + promote ptr casting to uintptr_t.
* sync type to uintptr_t in pm.h
* return of the uint32_t
* update header.
* oh, right, unsigned int...
* Avoid losing console messages.
Buffers up to 16k bytes of SVC_Print if buffer would overflow, then sends chunks every frame.
Sends up to 2048 bytes per frame and does not split messages.
* UNTESTED! Switch to ke::LinkedList<ke::AString> for PrintfBuffer.
Switch from OnGameFrame to FramAction.
Fix compiling on Episode1 by essentially disabling the feature.
* UNTESTED! Cleanup on disconnect, passthrough for >= 2048 msgs
* try reference for CPlayer.
* fix
* remove m_PrintfStop
* remove m_PrintfStop
* ensure empty queue when netchan drops
* flip to serials.
* serials
* style
* Update PlayerManager.cpp
* lift consts to header.
* remove local const references
* ep1 static const
* flip to queue - fix serial on resched.
* Update PlayerManager.h
* Update PlayerManager.cpp
* Update PlayerManager.h
* am-deque.h
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* Add natives to work with 64 bit Protobuf values
* Fix linux build
* FIX alignment requirements
* FIX alignment requirements V2
* Remove legacy API
* Inattention
When lookup of a more specialized entry in the maplists.cfg failed, it wouldn't fallback to the "default" section, but just try to parse the same section again.
* Change lookup strategy for SQL_CheckConfig
* Ensure db conf lookup failures default to ..default
* Revert "Ensure db conf lookup failures default to ..default"
This reverts commit 03dc703daeeeadaa134e2160bf2c7cd812402758.
This simplifies non-sdk build scripts by removing their loops over SM.archs. Instead the top-level
build script will re-evaluate them for each architecture.
This doesn't break any extensions NOT using IDataPack, and we do not know of any that are.
* The extension storage utility of this interface has been broken for the last 9 months, with ISourceMod::CreateDataPack being disabled.
* The plugin interop utility of this interface (its stated purpose) has been broken for the last 11+ years, with ISourceMod::GetDataPackHandleType being disabled.
I imagine it only survived the first cleanup 11 years ago because CSS:DM was using it internally, which it has now been migrated away from.
Compiled all the included extensions without changes (API compat), and loaded extensions build pre-change without issue (ABI compat).