Commit Graph

6603 Commits

Author SHA1 Message Date
PerfectLaugh
af76f757b5
Update SDKHooks_TakeDamage for CS:GO changes (#1319)
See alliedmodders/hl2sdk#77
2020-07-25 03:45:35 +01:00
Headline
b7650b11d6
NPOTB: Add x64 builds to travis-ci (#1321) 2020-07-24 16:48:22 -07:00
Headline
a0d06b3209
Fix Linux x64 libpcre.a linkage failure (#1320) 2020-07-24 16:29:43 -07:00
PerfectLaugh
c52edbd863
NPOTB: Trigger hl2sdk-csgo changes (#1316) 2020-07-24 00:19:58 -07:00
David Anderson
7355e34946 Fix AppVeyor. 2020-07-15 20:18:55 -07:00
Headline
5fa25e70ad
trie: implement clone() method (#852)
* Add Clone() for StringMap

* Fix for std::string addition

* trie: broken return key.

* clonetrie: correct handle leakage.

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-07-14 20:11:23 -07:00
Kyle Sanderson
b8ae4e617b
NPOTB travis-ci: address warnings / info. (#1311)
* Update .travis.yml

* travis-ci: test cache folder damage.

* travis-ci: cache invalidates checkout-deps.
2020-07-14 19:15:26 -07:00
Kyle Sanderson
353ced0e41
gamedata: align with core project values. (#1310)
* Rename blacklist.plugins.txt to blocklist.plugins.txt
* gamedata: adjust gamedata name.
* packagescript: adjust filename.
2020-07-14 18:40:28 -07:00
David Anderson
ed9f214256
appveyor: relocate in-tree and convert to MSVC2015. (#969)
* Move appveyor in-tree and move to MSVC2015.

* appveyor: sync.

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* appveyor: align SDKs with travis-ci.

* Update appveyor.yml

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-07-13 17:56:12 -07:00
Headline
939bdaf669
regex: update pcre to 8.44 (bug 6650, r=KyleS) (#1309)
* Update OSX PCRE dependency to 8.44

* Add OSX build instructions

* Update Windows PCRE dependency to 8.44

* Update Linux PCRE dependency to 8.44
2020-07-13 15:35:17 -07:00
Headline
2d2ba818e7
Add pcre lib for Windows x64 builds (#1307) 2020-07-11 16:08:14 -07:00
Headline
2653a450fc
handlesys: Output allocation timestamp during panic (#1110)
* Track Handle creation time

* Move ConVar operations outside of loop

* We support bee's here

* Catch windows awfulness

* Prevent Character Truncation

* Add timestamp info to memory leak dump

* Remove last line and adjust new leak dump output

* KyleS fixes

* Fixed width output

* Create invalid parameter failure redirection helper

* Fix rebase regression

* Update sm_invalidparamhandler.h

* Update HandleSys.cpp

* Update HandleSys.cpp

* Update HandleSys.cpp

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-07-09 18:21:45 -07:00
Impact
a065773b6d
Update OnLibraryAdded and OnLibraryRemoved docs (#1303)
`OnLibraryAdded` and `OnLibraryRemoved` are called whether or not a optional dependency exists
2020-07-09 10:09:59 +01:00
Miikka Ylätalo
4e0ae0cb5e
Change int[] to any[] for data r/w functions (#1221) 2020-07-09 10:09:13 +01:00
Ҝℴţأķ
611bad4036
ArrayStack: add Clone method (#1304)
* Provide ArrayStack.Clone method

* Clean definition for old syntax.

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-07-08 20:59:17 -07:00
eyal282
4a4b9ce7f0
cookies: Align output with sm_help (#977)
* Update clientprefs.sp

* Update clientprefs.sp

* Update clientprefs.sp

* Update clientprefs.sp

* Update clientprefs.sp

* Update clientprefs.sp

* Create natives.sp

* Delete natives.sp
2020-07-08 20:38:35 -07:00
stickz
100f1e56ca
mapchooser: Add option for persistent map storage (#1183)
* Add option for persistent previous map storage

* Fix spacer

* Recall previous maps before CreateNextVote()

* Remove MAPCHOOSER_TXT define

* nits and bits

* Update mapchooser.sp

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-07-08 19:56:26 -07:00
nosoop
69ae224938
testing: Add stock AssertStrEq (#1185)
* Add AssertStrEq to testing include

* Remove unnecessary last param
2020-07-08 19:18:39 -07:00
stickz
287628bfee
mapchooser: Clear map history on limit change (#1197)
This commit fixes a bug where if the value of `sm_mapvote_exclude` is reduced, the change may not take effect right away.
2020-07-08 18:36:50 -07:00
42
f27dc2f4f4
sdktools: Throw error when invalid address passed to SDKCall (#1265) 2020-07-08 18:27:10 -07:00
42
1282f13442 Update TF2 CanBeAutobalanced Gamedata 2020-07-03 19:42:07 -04:00
Erik Minekus
47514c7708
Do not require quotes around message in sm_psay (#1300) 2020-07-01 18:58:20 +01:00
Nicholas Hastings
b364bf8b06
Merge pull request #1102 from nosoop/sf11
TF2: Add new condition from Scream Fortress XI
2020-06-29 09:01:59 -04:00
Nicholas Hastings
dea3ef70a2
Add string_t SetEntPropString support for ep1 (fixes #1287) (#1299) 2020-06-28 20:09:57 -04:00
Nick Hastings
1cc7d37189 Fix Dark Messiah build. 2020-06-28 13:41:27 -04:00
42
3164af7e34
Fix TFResourceNames using array based enum struct (#1154) 2020-06-28 01:34:59 +00:00
Nick Hastings
4c8103a4e1 Add string_t SetEntPropString support for ep1 (fixes #1287) 2020-06-25 21:20:56 -04:00
Nick Hastings
2ebbf2774b Update Fortress Forever gamedata. 2020-06-25 12:49:31 -04:00
Peace-Maker
15450a6d0c Fix use-after-free when creating custom user messages
When creating our own "owned and local" protobuf message in `StartProtobufMessage`, `m_FakeEngineBuffer` is used to track that message. In `EndMessage` the message is optionally converted to a "private" one with the right abi on osx and passed to the engine's `SendUserMessage`. On linux and windows the same message as in the `m_FakeEngineBuffer` is passed though without conversion. `engine->SendUserMessage` has a vtable hook which sets `m_FakeEngineBuffer` to the passed argument.

`m_FakeEngineBuffer` frees the message it previously held, since it's "owned" from `StartProtobufMessage`, but that's the same one that's passed in as argument so a use-after-free in the engine happens when the now-freed message pointer is forwarded to the real `SendUserMessage` in the engine.

The message created in `StartProtobufMessage` wasn't free'd at all when hooks are blocked too. This fix moves the message buffer into a local variable which is destroyed at the end of the function.

Fixes #1286 and #1296
2020-06-23 10:32:55 -07:00
Headline
832519ab64
Prevent multiple calls to SDK_OnAllLoaded (#1293) 2020-06-21 23:32:11 -07:00
Headline
4e2806c951
Notify plugin reloads on next frame (#1292) 2020-06-21 23:31:52 -07:00
Nicholas Hastings
7e0dd1fd41
Update TF2 CanBeAutobalanced gamedata. 2020-06-17 00:50:43 +00:00
Accelerator74
2d971a9fb7
Prevent voteban evading & add ban length cvar (#1249) 2020-06-13 16:00:44 -07:00
David Anderson
3b386379dd
Use more STL for vector insertion/removal. (#1284) 2020-06-13 15:57:02 -07:00
David Anderson
7b887ee9f6 Update SourcePawn.
This will fix a utf8 regression reported in issue #1286.
2020-06-02 13:33:57 -07:00
David Anderson
67f0e4be60 Update SourcePawn and AMTL. 2020-06-01 13:22:29 -07:00
David Anderson
80acff8d7d Replace ke::LinkedList with std::list. 2020-05-31 23:19:41 -07:00
David Anderson
d5d4d78023 Update SourcePawn and AMTL to fix the Mac build. 2020-05-31 22:57:14 -07:00
David Anderson
5d94f0bea8 Replace ke::Vector with std::vector. 2020-05-31 11:35:51 -07:00
David Anderson
e5ddbd9886 Introduce a pbproxy library to solve macOS linker issues.
On SDKs which use protobufs, the engine has objects compiled against a specific
version of protobuf. Normally this is fine, we take care on Linux to use the
same C++ ABI. On macOS however, we use libc++ to enable C++11 functionality,
whereas the protobuf library has been compiled with libstc++. These ABIs are
not compatible.

To address the problem, we introduce PbHandle. PbHandle is a wrapper around
protobuf::Message with two added pieces of state: whether or not the handle
"owns" the message (and can free it in its destructor), and whether or not
the handle was created by the engine (private) or created by SourceMod
(local).

Whenever we transfer a protobuf::Message pointer to SourceMod, we must take
care to convert it to a Local version first. Whenever we transfer a protobuf
pointer to the engine, we must convert it to a Private handle.

For platforms with no ABI differences (almost all of them), the handle is a
no-op. The private and local localities are compatible and no translation
takes place.

On macOS, CS:GO does require translation. SourceMod loads a tiny shim
library that contains a copy of the protobuf sources compiled against the
game's ABI. It then provides serialization and deserialization methods.
SourceMod must not interact with the game's protobuf objects without first
going through this proxy library.

Note that PbHandle is not quite like unique_ptr. It can be converted into a
PbHandle that does not destroy the underlying object. This is mainly because
UserMessages.cpp has rather complex state, so it is useful to track locality
without destroying an object. An unowned PbHandle must not outlive the
owning PbHandle.
2020-05-30 22:13:07 -07:00
David Anderson
d525b466ec Use C++11 for macOS and CS:GO. 2020-05-30 22:13:07 -07:00
David Anderson
333227fad8 Build csgo-x64 on travis. 2020-05-30 22:13:07 -07:00
David Anderson
288a781555 Fix startup crash. 2020-05-30 19:10:23 -07:00
David Anderson
979e410efc Update AMTL, replace ke::Deque with std::deque. 2020-05-30 12:44:02 -07:00
Fyren
75fa198321
Change bootstrap.pl and startbuild.pl to also take CXX. (#1280) 2020-05-27 21:18:49 -04:00
David Anderson
49669f6585 Revert "Fix linking on Linux."
This reverts commit acf8782786.
2020-05-26 20:04:55 -07:00
David Anderson
acf8782786 Fix linking on Linux. 2020-05-25 21:35:50 -07:00
David Anderson
6d2e0aa684 Fix Windows build. 2020-05-21 00:11:23 -07:00
David Anderson
032a30f676 Fix mac build, part 2. 2020-05-20 23:17:15 -07:00
David Anderson
c9f574c27b Fix mac build. 2020-05-20 22:50:41 -07:00