Commit Graph
6547 Commits
Author SHA1 Message Date
David Anderson c2df49ee33 Rename ke::Lambda to ke::Function. 2020-05-17 12:33:52 -07:00
David Anderson a253e175bb Replace all uses of AMTL threads with STL threads.
This also rewrites the work loop for threaded queries. It has been
simplified significantly.
2020-05-16 22:35:56 -07:00
David Anderson 15023777f4 Merge pull request #1266 from alliedmodders/threads-3
Pare down ThreadSupport and remove ancient thread code.
2020-05-14 10:45:50 -07:00
David Anderson ff018a9a5d Improve Travis coverage.
Our official builds use clang-3.4 (for macOS) and clang-3.8 for Linux.
Linux uses libstdc++-4.9. Make sure these two compilers are being tested
and that libstdc++-4.9 is being used for STL.

Add a macOS builder to get coverage there. This will use a newer
clang than we actually use, but as opposed to the linux builder will
test the platform-specific bits.

Finally, use the latest GCC and clang versions from a bionic image, so
we have some coverage of a popular distribution.
2020-05-13 19:09:20 -07:00
David Anderson f76cb94511 Pare down ThreadSupport and remove ancient thread code.
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.
2020-05-13 00:35:29 -07:00
David Anderson 87cc42d348 Fix build failures with clang 10. 2020-05-12 23:04:55 -07:00
wanted241 5177cfdf97 Fix unnecessary ConCommand cache misses (#1256) 2020-05-08 15:28:45 -07:00
Deathreus 13621a1274 Add an array operations to CDataPack (#1219) 2020-05-08 15:23:48 -07:00
peace-maker bc89e54f6d NPOTB: Always use hl2sdk-proxy-repo in checkout-deps (#1236) 2020-05-08 15:12:21 -07:00
Arron Vinyard 5ed2f79217 Replace GetCmdArgs with args param (#1229) 2020-05-08 15:09:44 -07:00
Vladimir 3696a4cd9e Correct parameter detail in OnEntityDestroyed (#1237) 2020-05-08 15:08:34 -07:00
Arron Vinyard 8259bd316a Alert players of map history console output (#1242) 2020-05-08 15:04:57 -07:00
⭐ B3none 6717f45469 Standardize some spacing in translation phrases (#1254) 2020-05-08 14:55:05 -07:00
Scags 44615b7ade Prevent uncessary re-tagging for address functions (#1250) 2020-05-08 14:54:01 -07:00
Loïc f3200b2232 Fix GetDataDescMap not work on Day Of Infamy (#1263)
During the Split Day of Infamy to separate engine build #718 on 3 Nov 2017, it was forgotten to add the engine doi the list.
2020-05-07 12:20:29 +01:00
42 881cbcd45d Add new TF2 Holiday Soldier (#1257) 2020-05-06 23:00:24 +00:00
Loïc 30a4032067 Fix timelimit not correct for Black Mesa (#1262)
* 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
2020-05-06 22:59:43 +00:00
peace-maker 5597fc56d3 Fix crash when ArrayList runs out of memory (#1235)
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
2020-04-30 17:59:54 +01:00
Erik Minekus adcc0efda6 Fix matching Regex against an empty string (#1253)
Removed the offset check from MatchRegex, as this
is already handled by pcre_exec.
2020-04-29 00:37:45 +00:00
AndrewandKyle Sanderson d044b13ce4 datapack: free all elements on clear (#1251)
* 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 <[email protected]>
2020-04-27 18:09:13 -07:00
Loïc d42c304a55 Bump version for non-VCS builds (#1243) 2020-04-27 15:50:03 +01:00
Loïc d876f04baf Update Function Offsets For PVKII 0.4.2.2 (#1227)
* Update Function Offsets For PVKII 0.4.2.2

-Updates offsets for Linux/Win/Mac
-Update func sig FireOutput for Linux/Win/Mac
2020-04-22 01:03:34 +00:00
Loïc 593552f8d6 Update Function Offsets For PVKII 0.4.2.2 (#1226)
* Update Function Offsets For PVKII 0.4.2.2

-Updates offsets for Linux/Win/Mac
2020-04-22 01:03:22 +00:00
thewavelength 25462071df Make GetStringTableData native binary-safe (#1232)
Replace StringToLocalUTF8 with LocalToString and memcpy to make this binary compatible and update the documentation.
2020-04-14 17:51:39 +01:00
Nick Hastings 1d98c3a782 Fix Linux SetClientName/SetUserConVar gamedata on Nuclear Dawn (Fixes #1225). 2020-04-08 17:47:49 -04:00
Tom 7f239bb931 Prevent clients from spamming global chat using sm_nominate (#1217) 2020-03-21 17:24:45 +00:00
peace-maker 23efe26655 Update Contagion gamedata again (#1216)
Updates vtable offsets after Patch 2.1.2.2 again. #1171
2020-03-18 16:04:41 +00:00
Asher Baker ece447182f Fix basecomm failing to load on games without sv_alltalk (#1212) 2020-03-11 21:24:16 -07:00
Asher Baker 6465bd83a4 Update for latest Blade Symphony SDK 2020-03-11 22:36:25 +00:00
rumblefrog e941c1acea Update Black Mesa gamedata (#1208) 2020-03-10 20:20:08 +00:00
Asher Baker ecad8f25a8 Revert "csgo: enable SayText + raise msg limits (#1118)" (#1209)
This reverts commit 4a8e0799bd.
2020-03-08 13:27:13 +00:00
Asher Baker 48c3a9f2fa NMRiH gamedata update (#1204) 2020-03-05 18:37:09 +00:00
Asher Baker d59edc5d0a Use GetCmdArgInt(Ex) in base plugins (#1203) 2020-03-04 22:07:00 +00:00
Asher Baker 17440fc4be Update Reload offset (#1202)
Update Reload offset
2020-03-04 21:56:08 +00:00
Asher Baker bff8585411 Add an option to build against no SDKs (#1201) 2020-03-04 21:52:07 +00:00
Asher Baker 6a307bfcee Restore the frame pointer on Linux (#1200)
Looks like the default here changed when we upgraded the Linux build server.

This is causing issues when debugging crash dumps.
2020-03-04 21:43:13 +00:00
Headline 604942f0e7 Add helper stocks for getting numerical command arguments (#1194) 2020-03-04 13:17:10 -08:00
Kyle Sanderson 22eeb2f3a5 DarkM: build-fix for engine msg caching (#1195)
* 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...
2020-03-03 07:13:03 -08:00
BotoXandKyle Sanderson cc6059a4b7 engine: Implement message buffering. (#1071)
* 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 <[email protected]>
2020-02-27 16:21:31 -08:00
BotoX 91480b6b91 sdktools: correct various ancient EntityOutput issues. (#1074) 2020-02-26 16:33:52 -08:00
GAMMACASE 4a8e0799bd csgo: enable SayText + raise msg limits (#1118)
Rised limits for SayText and HintText protobuffs in csgo, also switched from TextMsg to SayText in csgo.
2020-02-26 16:31:50 -08:00
Arthurdead bcd5e40842 sdktools: expose additional tr sdk capabilities (#1145)
* add the rest of the trace enumerate funcs

* fix ident
2020-02-26 16:19:55 -08:00
2251307218 9fb6430313 sdkhooks: correct velocity issues with dropweapon (#1159) 2020-02-26 16:11:17 -08:00
stickz 68e45f3583 mapchooser: Replace existing map entry from exclusion list (#1184) 2020-02-26 15:59:35 -08:00
Arron Vinyard a1ed47be87 IsServerProcessing: improve grammar / present|correctness. (#1188)
Wording of comment was a bit off.
2020-02-26 15:54:19 -08:00
ded3867605 regex: add/document missing offset param (#1175)
* Regex Little Changes

* Prevented to triple and double call `strlen`.
* More informative message on `if (offset >= len)`.
* Add missing parametr in navite `MatchRegex`.

* Regex Little Changes v2

* Using `strdup` instead `strcpy`.
* Replaced NULL to nullptr.
* Removed note about MatchOffset.

Co-Authored-By: Headline <[email protected]>

* Removed padding.

Co-Authored-By: Headline <[email protected]>

* Removed more padding.

Co-Authored-By: Headline <[email protected]>

Co-authored-by: Headline <[email protected]>
2020-02-26 15:52:04 -08:00
David Anderson 2b6833f65d Merge pull request #1167 from Scags/teleport-defaulted
Add default values to TeleportEntity
2020-02-26 13:17:45 -08:00
SM9 4d38f11367 Clarify detour creation errors (#1191)
A logic error here meant that it wasn't printing the failing sig name in the common case
2020-02-26 19:14:51 +00:00
Juice a3dd25f354 Update csgo InfoChanged offset (#1192) 2020-02-26 18:46:09 +00:00
komashchenko 4b0e73ca5a WriteBaselines gamedata update (#1189) 2020-02-25 10:21:04 +00:00