Commit Graph

836 Commits

Author SHA1 Message Date
Nicholas Hastings
ae485c3115
Add A2S_Rules fix for CS:GO to CStrike extension. (#614)
* Add A2S_Rules fix for CS:GO to CStrike extension.

* Dont force set the cvar. Add checks before patching.

* Remove incorrect and useless check.

* Remove checking value as it is in the signature.

* Update build script changes to AMBuild 2.1 API to fix build.

* Fix bad check and ConVarRef being resolved too early.

* Whoops. This line is kinda important. Got nuked when refactoring.

* Remove unused variable.

* Updatet gamedata.

* Switch to "Addresses" gamedata lookup

* Add linux64 gamedata

* Fix mac build

Co-authored-by: Ruben Gonzalez <drifter01620@gmail.com>
Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
2021-03-08 22:42:32 +00:00
Scags
6c2be9bdcc
Add sm_dump_datamaps_xml (#1409) 2021-03-08 14:28:43 -08:00
komashchenko
978fa6b252
Fix detour HandleCommand_Buy_Internal (#1406) 2020-12-18 12:10:10 +00:00
Peace-Maker
ba8753836e Cleanly remove all hooks on extension unload
Allows to e.g. reload sdktools during runtime without crashing. Useful for fast development cycles.
2020-12-16 15:52:48 +01:00
Rostu13
c38b392fdf
sdktools: permit symbol signatures on win32 (#1346)
* Fix sig scanner for windows

* fix linux build

* Update vcaller.cpp

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-10-02 17:33:05 -07:00
Scags
b14c18ee64
Fix invalid sm_dump_netprops_xml output (#1360) 2020-10-01 14:28:07 -07:00
Asher Baker
ea3f55f030
Remove OnEntitySpawned C++ listener (#1342)
This is causing crashes with existing extensions using entity listeners.

Currently no one is asking for a C++ hook here, if it is desired it
needs to be done with proper versioning of the listener interface, which
is going to be a little bit more complicated without an initial hard
break.

https://forums.alliedmods.net/showpost.php?p=2715337&postcount=789
https://discordapp.com/channels/335290997317697536/335290997317697536/748101258186850334

This is a partial revert of #1078.
2020-08-26 12:53:31 +01:00
David Anderson
6e2c5a66b3 Remove use of the Dep API.
This is going away.
2020-08-24 20:48:57 -07:00
David Anderson
785c6aa1cf Update to AMBuild 2.2.
This is a pretty big diff because SourceMod had lots of multi-arch
workarounds that can now go away. I've also changed 'x64' to 'x86_64' in
many places since this is how AMBuild normalizes it, and it's far too
late to pick the shorter string, so we might as well suck it up.

The --target-archs parameter has been replaced with --targets. It works
the same way.

The default behavior for SDK inclusion is now "present" instead of
"all" since this lowers the burden of storing many SDKs. Official builds
will still be made with --sdks=all.
2020-08-18 23:09:43 -07:00
Accelerator74
1b86c8564d
sdktools_voice: implement ClientSpeaking forwards (#1247)
* 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

* Added VoiceHook functions

* Update extension.h

* Update extension.h

* Code optimization

* Added support for more engines

* Invalidate timers

* Fixes

* Update extension.cpp

* Update voice.cpp

* correct Forward event type to ET_Ignore.

* sdktools_voice: de-implement IsClientSpeaking

* sdktools_voice: Add notice/unbind IsClientSpeaking

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-08-18 06:02:34 -07:00
PerfectLaugh
031f80f6e1
sdkhooks: assign velocities in CTakeDamageInfo(Hack) (#1322)
* Attempt to correct SDKHooks_TakeDamage

* Define function on both csgo and non-csgo

* Remove unneeded macros

* Fix velocity copy on CTakeDamageInfoHack init
2020-08-06 20:46:01 -07:00
BotoX
7bab9cc344
sdkhooks: add OnEntitySpawned fwd. (#1078)
* Add OnEntitySpawned to SDKHooks.

* nitpicking

* Add CapabilityProvider SDKHook_OnEntitySpawned

* (unrelated) nits

* nit relocation

* unqualified relocation - my mistake.

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-08-06 20:01:07 -07:00
peace-maker
510bd261f8
core: Add Insurgency support for amd64 Windows (#1295)
* Add basic Insurgency support on Windows x64

This allows SourceMod to load on x64 Insurgency. There are still a lot of variable truncation warnings that have to be dealt with.

* Fix 32bit builds

* Compile MySQL extension as well

The hack for __iob_func being removed from the core runtime, but required by the old mysql we're building against can be simplified a lot due to the `_ReturnAddress` intrinsic available since MSVC 2015.

* Don't include the offset we want to extract in the signature
2020-08-06 19:53:06 -07:00
PerfectLaugh
af76f757b5
Update SDKHooks_TakeDamage for CS:GO changes (#1319)
See alliedmodders/hl2sdk#77
2020-07-25 03:45:35 +01:00
Headline
a0d06b3209
Fix Linux x64 libpcre.a linkage failure (#1320) 2020-07-24 16:29:43 -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
42
f27dc2f4f4
sdktools: Throw error when invalid address passed to SDKCall (#1265) 2020-07-08 18:27:10 -07:00
David Anderson
3b386379dd
Use more STL for vector insertion/removal. (#1284) 2020-06-13 15:57:02 -07:00
David Anderson
5d94f0bea8 Replace ke::Vector with std::vector. 2020-05-31 11:35:51 -07:00
David Anderson
032a30f676 Fix mac build, part 2. 2020-05-20 23:17:15 -07:00
David Anderson
b725196a26 Replace AString with std::string. 2020-05-20 17:57:18 -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
42
881cbcd45d
Add new TF2 Holiday Soldier (#1257) 2020-05-06 23:00:24 +00: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
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
Asher Baker
6465bd83a4 Update for latest Blade Symphony SDK 2020-03-11 22:36:25 +00:00
BotoX
91480b6b91
sdktools: correct various ancient EntityOutput issues. (#1074) 2020-02-26 16:33:52 -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
Ҝờţأķ
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 <headline@users.noreply.github.com>

* Removed padding.

Co-Authored-By: Headline <headline@users.noreply.github.com>

* Removed more padding.

Co-Authored-By: Headline <headline@users.noreply.github.com>

Co-authored-by: Headline <michaelwflaherty@me.com>
2020-02-26 15:52:04 -08:00
42
1a71f4fbde
Fix TF2_MakeBleed using incorrect custom damage type (#1163) 2020-02-08 17:39:47 -08:00
naydef
fba71ed24d
Deprecate IsSoundPrecached (#1172)
Fix #1170
2020-02-06 10:33:44 -08:00
Asher Baker
b5de3eb588
Speculative fix for MySQL crashes (#1135)
https://crash.limetech.org/stats/dbi.mysql.ext.%25/my_real_read
https://crash.limetech.org/stats/dbi.mysql.ext.%25/net_real_write

Both of these are caused by the VIO ptr ending up as null in the middle of reading/writing to a connection - I can't find any indication of a fix for this made to MySQL, so don't think it is a bug fix we're missing, but there are some musings around the internet that it could be caused by improper thread-safety initialisation.

`my_init` (what we had here) is called internally by `mysql_library_init` but I think would have still led to an automatic `mysql_library_init` call the first time `mysql_init` was called (which we can do on a thread in case of threaded connections), which is exactly the thread-safety issue called out by the MySQL docs, so hopefully doing things properly here will help.
2019-12-15 15:01:15 +00:00
BotoX
3dd1e5a318 Validate GetEntityHandle in FindEntityByNetClass (#1089) 2019-11-05 22:25:18 -08:00
Asher Baker
77f4ddf2c2
Fix virtual SDKCall with object params (#1104)
PR #705 made some changes for 64-bit support that required callers to
provide a buffer for object storage, but only added the required code to
the non-virtual call builder, not the virtual call builder.

Copy it over to CreateValveVCall so that ValveParamToBinParam stops
writing to a null pointer.

Fixes #1059 (Hopefully.)
2019-10-18 00:23:45 +01:00
Einyux
e02e6bcb4f Add TR_GetHitBoxIndex() native (#1085)
Fixes #1080
2019-09-17 21:24:36 +01:00
BotoX
d93f6984cc cstrike: Fix wrong timeleft calculation (#1072)
* Fix wrong timeleft calculation

* reorder function calls
2019-09-02 15:33:28 -07:00
Asher Baker
fcafd0784c
Workaround CS:GO Stringtable bug (#1046)
The cause of the infamous "Index error writing string table baseline"
error appears to be a timing issue between the engine's network message
processing, the stringtable encoding, and command processing when adding
stringtable entries in OnConfigsExecuted.

When the first client connects the map is re-loaded which causes a full
refresh, the game's stringtable entries are added at tick 65, the client
connection is registered at tick 66, and stringtable entries added in
OnConfigsExecuted are registered as being added in tick 67. The engine
later calls WriteBaselines with the client's signon tick, and neglects
to encode the SM added entries as it considers them from the future.

To avoid this, always pass INT_MAX as the current tick when encoding
the baseline, so all stringtable entries are included regardless of when
they were added. Tested on both Windows and Linux.
2019-07-19 09:13:34 +01:00
42
199802150b Update TF2_IgnitePlayer to support setting duration of fire (#1038)
Related to #713
2019-07-05 22:37:25 +01:00
JoinedSenses
352f078b07 Add Cookie methodmap (#1012) 2019-05-30 18:27:14 -07:00
Bara
9c55eed549 Add Shield and Bumpmine to cstrike.inc (#991) 2019-05-24 06:03:42 -07:00
Amine B
f9ce25a7fe PassType typo fixup (#1018)
* PassType typo fixup

Just some little observations, I will look up for more in other files whenever I can

* Update natives.cpp

* Update outputnatives.cpp
2019-05-15 07:22:34 -04:00
Nicholas Hastings
7e418933e7
Re-add missing GetEconItemView param (fixes #1001). (#1017) 2019-05-14 20:55:44 -04:00
Nicholas Hastings
05b3fc0fb9
Re-add float cast on TF2_AddCondition param (fixes #1013). (#1016)
Broken by ArgScuffer
2019-05-14 19:22:43 -04:00
Michael Flaherty
dae6d13f06 Fix CSS Builds (#992) 2019-05-01 17:29:55 -04:00
PerfectLaugh
ccf1d7abbd Remove unneeded paramter in CS_DropWeapon (#988)
Updated in 4/30/2019 csgo update
2019-05-01 11:38:02 -04:00
Michael Flaherty
e2eac382c0
Add templated helper class to promote type-safety (#965) 2019-04-12 12:10:37 -07:00
David Anderson
2e11d3400e Fix MSVC2015 build. 2019-03-16 17:25:36 -07:00