Commit Graph

917 Commits

Author SHA1 Message Date
dragokas
ffc23a1a1e Exposed SDKCall_Server call type to use CBaseServer methods 2021-10-26 17:18:16 -04:00
Nick Hastings
f9309c83d2 Don't cache replay_enable value when evaling whether to use FileExists hook.
Speculative fix for #1581
2021-10-24 08:54:15 -05:00
Nick Hastings
536750b428 Add missing parameters for CSWeaponDrop. 2021-10-22 23:42:45 -04:00
GAMMACASE
11e7bb10f1
Fix CS_OnCSWeaponDrop after latest CSGO update (21/10/21) (#1602) 2021-10-22 16:20:54 +01:00
Nick Hastings
97383028e5 Add option to not bypass hooks with TakeDamage and DropWeapon natives. 2021-10-13 12:56:26 -04:00
Nick Hastings
4a6d263dad Remove obsolete core-legacy checks. 2021-10-13 12:56:26 -04:00
Nick Hastings
ed96da1afc Fix incorrect param types in CS:GO GNI (otherwise broken for x64). 2021-10-12 20:56:51 -04:00
Nick Hastings
da3146e294 Remove manual ptr math in vnatives for params not mapped to cell params. 2021-10-12 20:56:51 -04:00
Nick Hastings
5aa0cdfd45 Fix Blade Symphony GiveNamedItem call on x64. 2021-10-12 20:56:51 -04:00
Nick Hastings
0be7813398 Add ValveType_Object type.
This is for the few cases where we have function parameters to objects that
don't fit our other predefined types (CBaseEntity, CBasePlayer, string).

Most calls currently pass those as POD (which is incorrect, but works on
x86), or one of the other pointer types (which is also incorrect, and can
lead to confusion, but works on x86 and x86-64).

This type only works when manually buffering the parameter for calls, and
is not supported for return types.
2021-10-12 20:56:51 -04:00
Nick Hastings
115e3d4392 Update multiple SDKTools calls to be x64-safe [sizeof(void*) != sizeof(int)] 2021-10-12 20:56:51 -04:00
Nick Hastings
9295bc4fbb Fix crash with IBinTools calls on x64 for functions with void return. 2021-10-12 20:56:51 -04:00
Nick Hastings
9e083ec668 Use new GetIServer call and updated IServerTools calls on Blade Symphony. 2021-10-12 20:56:51 -04:00
Nick Hastings
68c8857410 Enable more CS:GO engine logic for Blade Symphony. 2021-10-12 20:56:51 -04:00
Nick Hastings
dc2967b2e7 Fix CS:GO transposing of GiveNamedItem last param and return. 2021-10-12 20:56:51 -04:00
A1m`
59840685a4
Fix 'GiveNamedItem' in the game left4dead2. (#1590)
* Fix 'GiveNamedItem' in the game left4dead2.

The method 'CCSPlayer::GiveNamedItem(char const*, int, CBaseEntity*)' does not work in game left4dead2, any given weapon and object immediately falls to the ground, besides, the code is missing a parameter to call this method (even with the added parameter does not give a weapon to hands). Another method 'CTerrorPlayer::GiveNamedItem(char const*, int, bool, CBaseEntity*)' works great, besides it makes it possible to give out all the items that exist in the game.

* Add x64 support

Add x64 support

* Changed argument type to bool.

Changed argument type to bool.
2021-10-02 14:45:18 +00:00
nosoop
57a38636fc
TF2Tools: Prevent CalcIsAttackCriticalHelper* from being called twice (#1573)
* Ensure CalcIsAttackCriticalHelper only gets called once

* fixup: move origReturnValue up
2021-09-23 12:00:52 +02:00
David Anderson
1b0c7bc1b8 Add support for hl2sdk-mock. 2021-09-22 12:36:44 -07:00
Asher Baker
78cb89938d
Remove OnEntitySpawned forward (#1571)
`OnEntitySpawned` is 1.11 only, so this is fine given our API stability guarantees.

Unfortunately the forward name clashes with quite a few plugins using the same name for their SDKHook callback. Normally we'd just put up with this but there are difficult to solve binary compatibility issues where those plugins will get the callback double-called, and there is a separate issue where the forward isn't called for all entity spawns (unlike the SDKHook), so most plugins can't switch to the forward anyway.

Resolves #1558.

This reverts commit 7bab9cc344.
2021-08-23 21:36:20 +01:00
Asher Baker
5ea096e61e
Support reading legacy sendprop arrays (#1550)
This rounds out the work started in #1548 to complete support for
reading the older SendPropArray type array netprops, along with bringing
SDKTools' GameRule netprop code in sync with core to add string array
support.

There aren't many SendPropArray type props around but this opens up a
few interesting opportunities for plugin developers, particularly in
L4D2 with manipulation of the EMS HUD.

Tested reading the `m_vCPPositions` array in TF2, and reading/writing
the `m_szScriptedHUDStringSet` EMS HUD netprop in L4D2. Closes #1386.
2021-08-23 21:21:11 +01:00
Asher Baker
3c79701208
Catch exceptions from TraceRay filters/enumerators (#1557)
When a custom TraceRay filter / EnumerateEntities enumerator callback
throws an exception we currently continue execution and then return
execution to the calling code as if there were no problems. This
currently causes a heap tracking issue in SourcePawn, but even ignoring
that it is likely the wrong behaviour and differs from our other
synchronous callbacks.

This change causes the exception to be caught, immediately terminates
the trace / enumeration, and propagates the exception state back to the
calling plugin correctly. The implementation here is based on how
SortCustom1D handles exceptions.
2021-08-02 11:57:36 +01:00
Vladimir
f708842e09
Fix conflict with extensions using SteamWorks (#1531)
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>
2021-07-18 00:01:24 +01:00
Asher Baker
70c9a6528a Remove entity lump manipulation from OnLevelInit
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
2021-07-17 20:52:51 +01:00
Vladimir
54364d213d
Fix output hooks when caller/activator are flipped (#1411)
Co-authored-by: Asher Baker <asherkin@limetech.io>
2021-07-17 15:30:09 +01:00
Adam Short
5aedb73aae
sdktools: Rename SetCollisionGroup to SetEntityCollisionGroup (#1513)
Better aligns the with other natives - makes more sense.
2021-07-10 13:10:26 -07:00
Einyux
823b55c22a
sdkhooks: Allow overriding SDKHook_Think (#1397)
* Allow to block Think()

* Update SDKHookCB comment
2021-07-10 12:42:17 -07:00
Accelerator
b0563a493c
Update GeoIP2 extension to new GeoLite2 .mmdb database format (#1245)
* 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>
2021-06-30 13:01:12 +02:00
Adam Short
a9d3cf4574
sdktools: Add SetCollisionGroup native (#1461) (#1507)
* Add SetCollisionGroup native

* Add newline to end of file

* Fix gamedata locations

* Remove extra spaces

* Fix gamedata formatting

* Add Windows signature for CS:GO

* Fix native doc comment

* Revert formatting change

* Change references of client -> entity

* Moved CallWrapper into method

* typofix

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2021-06-24 15:04:10 -07:00
rtldg
3b2fa89926
sdktools: Clean non-ingame clients from NormalSHook (#1450) 2021-06-24 14:32:47 -07:00
peace-maker
1fbe5e1daa
A2S_Rules fix: Only change host_rules_show if patching was successful (#1459)
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
2021-04-19 09:33:36 +02:00
peace-maker
e5342afe2a
Add PostgreSQL database driver (#32)
* Add PostgreSQL DBI extension

Bug #3849
This adds a postgresql database driver called "pgsql".
The ambuild script changes could be very wrong ;)

* Add pgsql support to clientprefs

This was originally made by Lyfe in bug 3849! Thanks for that.
PostgreSQL supports the 'IF NOT EXISTS' clause when creating tables
since version 9.1, so i've switched to use that.

* Added pgsql support to sql-admin-manager

* Add --pgsql-path to ambuild configure

* More ambuild fixes

* Compile libpq with ambuild

* Try to generate postgres configs

* Add dummy config file

* More ambuild fixes

* Get errorcode and readable error in preparequery

No need to stop getting the errorCode, if the error string should be
retrieved. Just return both!

* Fix indentation in AMBuilderPGSQL

* Try to patch and configure postgres through ambuild

* Revert "Try to patch and configure postgres through ambuild"

This reverts commit 68dfc82b8eb0ce11f621af67ec247b5f47e4a189.

* Update to use PostgreSQL 9.4

* Move postgres preparation into seperate script

Fetching, preparing and configuring of the postgresql sourcecode
is done in a seperate prepare_postgresql.sh script now.

People can use this script for their manual builds,
if they don't want to use checkout-deps.sh.

* Add patch to configure.in again

Remove the version check for autoconf in postgres 9.4 too.

* Nit: Support older objdirs for hasPgSql ambuild option

* Update to use PostgreSQL 9.4.6

* Use newer AMTL and PGSQL 9.6

* Fix threaded queries

When running the thread part of a query, it already gets the atomic
lock. Don't try to get it twice in that case.

Use a seperate lock to protect access to the lastInsertID and
lastAffectedRows variables.

* Fix SetCharacterSet racing with threaded queries

Same fix like in the mysql driver.

* Use ke::AutoLock for lastInsertID mutex

* Fix fetching one more row than available

Don't try to access a row that doesn't exist when iterating rows.

* Improve sanity checks on column access

Don't call libpq functions with out of bounds column indices.

* Let QuoteString return false if quoting failed

* Fix build for x64 support changes and update to PGSQL 9.6.9

* Fix linux build

* Fix building of connection options string

snprintf doesn't support overlapping buffers.

* Update to PostgreSQL 9.6.15

* Fix crash after freeing first IQuery object

* Fix code crunch

* Fix memory leak, cleanup

* Nuke MSVC project and Makefile

* Remove unsupported numeric error codes

* Use STL threads

* Add prebuilt libpq for Linux and Windows

* Restore and fix version.rc file

* Add PostgreSQL build instructions

* Add prebuilt libpq for Mac

* Add win64 libpq build

This is version 9.6.15 since that's what I still had laying around.

* Fix buildscript

* Fix x64 build on linux and mac

Co-authored-by: Erik Minekus <tsunami@tsunami-productions.nl>
2021-03-11 11:21:51 +01:00
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
Nicholas Hastings
5e7596dea6
Upgrade SQLite from v3.22.0 to v3.26.0. (#935) 2018-12-19 17:26:29 -05:00
Nick Hastings
4bebdc18a2 Hmm... 2018-12-06 20:31:29 -05:00
Nick Hastings
a01529b210 Add new GiveNamedItem param for CS:GO. 2018-12-06 20:18:21 -05:00
Ruben Gonzalez
d79c5e0dfa Switch CS:GO Clantag set/get to use netprops + offset over sig + offset. (#922)
* Switch CS:GO Clantag set/get to use netprops + offset over sig+offset.

* Make sure the new functions are defined before using them...

* Fix offset name

* Fix incorrectly dereferencing.
2018-11-09 07:13:17 -05:00
Kyle Sanderson
cb8d92edeb
SDKHooks: Reset global hookid when unhooking in SH. (#916)
Fixes https://github.com/alliedmodders/sourcemod/issues/912
2018-10-28 11:06:57 -07:00
Asher Baker
a1271ec3a8
Handle NULLs in SDKCall string return (Fixes #874) (#906)
`SDKCall` has existing semantics that a `-1` retval indicates null, so use that and writes an empty string to the buffer.

Consumers can tell the difference between `""` and `NULL` by checking if the return value is `0` or `-1`.
2018-10-11 00:18:03 +01:00
SlidyBat
3add38f665 Add additional TraceRay natives (#885)
* More TR natives

* Fix small typo

* Fix another typo

* Fix TR_AllSolid description

* Change Disp to Displacement

* Reorder params in TR_GetSurfaceName

* Fix TR_GetSurfaceName

* Another fix for TR_GetSurfaceName -_-

* Change if block to switch

* Make handle first param in TR_GetSurfaceName

* Reorder TR_GetStartPosition params

* Make TranslatePartitionFlags static

* Change tabs used for formatting to spaces

* Change inline comment style to be consistent with rest of file
2018-10-07 14:15:54 -07:00
Michael Flaherty
a9ca1a2fd6
NPOTB: Clarify preprocessor logic (#900) 2018-10-05 04:22:29 -07:00
Asher Baker
1ca4517f46 Revert "Remove arch loops from build scripts. (#889)"
This reverts commit 7ed329c11f.
2018-10-04 17:59:40 +00:00
Michael Flaherty
22b43e3869 Fix regression in vstk size (#894)
* Fix regression in vstk size

* Fix macro comment mistake

* More macro comment removals
2018-10-04 08:08:29 -04:00
Michael Flaherty
fc14e37d0f Fix CS_TerminateRound calls & detour (#893) 2018-10-03 22:50:31 -04:00
David Anderson
7ed329c11f
Remove arch loops from build scripts. (#889)
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.
2018-09-30 09:59:28 -07:00
Ruben Gonzalez
75193e9ee9
Add new weapons to CSWeaponID enum. (#869) 2018-09-12 10:13:39 -04:00
SlidyBat
144fb907f1 Add new Traceray natives (#754) 2018-08-13 23:02:12 +01:00
Michael Flaherty
aaac0b9eb2 Individualize NameHashSet Hashing & Revisit #709 (#740)
* Make mac/win lookups lowercase'd

* Revert #709 & 81042cc

* Adjust HashPolicy implementation across sourcemod

Basically, in order to implement our own (actual) hash policy in
`PluginSys.h`, we needed to remove the blanket implementation of `hash`
that was used before. Now, each policy must implement `hash` along with
`matches` in order to be used with `NameHashSet`. While this does force
us to change every implementation of policies across the entirety of
sourcemod, it allows core to use flexible implementations of `hash`.

* Remove logic duplication

* Improve lowercase checks
2018-07-10 17:38:40 -04:00
Nick Hastings
a9c9da1066 Update SDKTools sound functionality for hl2sdk-csgo changes. 2018-07-07 08:57:00 -04:00
Michael Flaherty
b9b6832a11 Streamline ConfDb loading proceedure (#791)
* Create DatabaseConfBuilder & remove locking
* Remove all refcounting

This is part 1/n in regards to this PR's rework
* Move db conf lookup out of RunThreadPart
* Return default configuration for failed lookups
* RefPtr members & stop leaks
* fix uint comparison warning
2018-06-19 09:35:37 -07:00
peace-maker
6fcb411fe4 MySQL: Support multiple result sets in prepared queries (#825)
Prepared statements can return multiple result sets since MySQL 5.5. That can happen when calling stored procedures using `CALL x();`.

This change removes the previous caching of result bindings, since the number of fields in a result can differ from result set to result set. This could potentially have a negative impact on prepared statements always only returning one result set, since the result binding buffers are recreated everytime the statement is executed instead of once. That difference should be negligible.

Fixes #823.
2018-06-05 18:33:33 +01:00
peace-maker
9cc518e408 Fix MySQL extension build using vs2015 (#824)
MySQL defines its own timespec_t. Official mysql builds are built using VS2013, so you still need to compile the client library yourself to be able to link it, but this change makes the dbi extension compatible with future versions already.
2018-06-05 09:29:11 -04:00