Commit Graph

1119 Commits

Author SHA1 Message Date
BotoX
91cc6b300c Add "Restart Current Map" to sm_map menu. 2023-08-30 22:08:46 +02:00
Your Name
aa2a71fc67 Add damageCustom argument to SDKHooks_TakeDamage native.
# Conflicts:
#	extensions/sdkhooks/natives.cpp
#	plugins/include/sdkhooks.inc
2023-08-30 22:08:46 +02:00
BotoX
632429700b Changes on sm_*say 2023-08-30 22:08:46 +02:00
BotoX
a8d95ca044 Add GetClientIClient native. 2023-08-30 22:08:46 +02:00
Your Name
28b4b248f7 Extend function calling API for natives and allow catching exceptions.
Change sourcepawn url.

# Conflicts:
#	.gitmodules
#	core/logic/AMBuilder
2023-08-30 22:08:46 +02:00
Your Name
d099dbb659 Added hack to make plugins open a menu with all possible targets on ReplyToTargetError COMMAND_TARGET_AMBIGUOUS.
Explanation:
There are two clients in the server, one named gene, the other one "Ene ~special characters~".
An admin issues "sm_slay Ene" and gets following error message: More than one client matched the given pattern.
What this hack will do is: Use GetCmdArg(0, ...); to get the command name "sm_slay".
Use GetCmdArgString(...); to get the arguments supplied to the command.
Use GetLastProcessTargetString(...); (which was implemented in this commit) to retrieve the arguments that were passed to the last ProcessTargetString call.
It will then pass this data to the DynamicTargeting plugin through its AmbiguousMenu native.
The plugin will open up a menu on the client and list all targets which match the pattern that was supplied to ProcessTargetString.
If the client selects a menu entry, FakeClientCommand will be used to re-execute the command with the correct target.

# Conflicts:
#	tools/buildbot/PackageScript
2023-08-30 22:08:46 +02:00
Mikusch
a5ff53f00f TF2: Add TFCond_ImmuneToPushback condition (#2023)
(cherry picked from commit 531b053096)
2023-08-30 22:08:46 +02:00
nosoop
d356d80537 Add functions for working with entity lumps (#1673) 2023-08-30 22:08:45 +02:00
Deathreus
d481e5fcb7 Add a PluginIterator methodmap (#1779)
* Add a PluginIterator methodmap

* Follow convention

* Update sourcemod.inc

* Turn method ReadPlugin into property Plugin

* Requested change

* Update sourcemod.inc

* Curse you VSC

* Follow behavior of other iterators instead of the natives

* Fix a stray space

* Implement a hacked CPluginIterator

* Oops

Copy paste go brr

* Revert a change made before the custom impl
2023-08-30 22:08:45 +02:00
Psykotikism
25184aa9c7 Add "DispatchKeyValueInt" stock (#1764) 2023-08-30 22:08:45 +02:00
Arron Vinyard
b789d30658 Remove unnecessary timer typeset entry (#1735) 2023-08-30 22:08:45 +02:00
Arron Vinyard
305799b441 NPOTB: Use camel casing for variables in adminhelp.sp (#1750)
This is a stylistic change to ensure more adhered-to consistency throughout base plugins
2023-08-30 22:08:45 +02:00
Sikari
92fc27f67f Prevent workshop prefix from showing in nominations results menu (#1737)
Prevents workshop prefixes from being shown instead of the display names in results menus when items are disabled
2023-08-30 22:08:45 +02:00
domino_
5292721f0b Add a OnPlayerRunCmdPre forward (#1760)
Adds an OnPlayerRunCmdPre forward in order for plugins to be able to hook OnPlayerRunCmd with the guarantee that none of the parameters have been modified by other plugins. As such, OnPlayerRunCmdPre's parameters cannot be modified and are read-only. 

Plugins that wish to use OnPlayerRunCmdPre can maintain backwards compatibility with SourceMod 1.10 by falling back to OnPlayerRunCmd if the Pre variant was never fired.
2023-08-30 22:08:45 +02:00
Kyle
ec92653bb7 Honor AUTOLOAD_EXTENSIONS in clientprefs include (#1718)
* Optional autoload extensions

* revert autoload for cstrike/tf2
2023-08-30 22:08:45 +02:00
peace-maker
b25d25890a DHooks: Allow setting CBaseEntity* param to NULL #1751 (#1754)
* DHooks: Allow setting CBaseEntity* param to NULL #1751

The param had to be a valid entity and wasn't allowed to be set to NULL. Behave similar to SetReturn which maps INVALID_ENT_REFERENCE (or -1) to NULL.

* Update include documentation
2023-08-30 22:08:45 +02:00
Gaben
7c1095e4e7 Allow h-flag admins to bypass vote delay (#1733) 2023-08-30 22:08:45 +02:00
Arron Vinyard
686e8b4d7e Add GetCmdArgFloat(Ex) stocks (#1742) 2023-08-30 22:08:45 +02:00
Mikusch
1ad8bb4560 Remove misleading note on DynamicHook.RemoveHook docs (#1725) 2023-08-30 22:08:45 +02:00
rtldg
4547270934 Correct some function docs that return char count (#1721) 2023-08-30 22:08:45 +02:00
V
3a2c5cb0f7 Inline one-expression single-use functions (#1700) 2023-08-30 22:08:45 +02:00
Corey D
ffb6d769e8 Add MAX_AUTHID_LENGTH (#1696) 2023-08-30 22:08:45 +02:00
Erik Minekus
77f999f810 Database.Format destination buffer should not be marked const (#1714) 2023-08-30 22:08:45 +02:00
Corey D
c5049990a3 Add bitwise SetBitFlags for AdminId and GroupId (#1677)
* Add bitwise SetFlags for AdminId

* Inline SetFlags natives
2023-08-30 22:08:45 +02:00
Alienmario
e03320c80e Enable nextmap for Black Mesa (#1695) 2023-08-30 22:08:45 +02:00
Ҝℴţأķ
2ae4624344 Remove hardcoded question mark from sm_vote (#1699) 2023-08-30 22:08:45 +02:00
iNilo
66c8005666 adminhelp.sp -> Switch to the new CommandIterator() (#1388)
* Switch to the new CommandIterator() methodmap

`ReadCommandIterator` 
->
```
CmdIter.GetName(Name, sizeof(Name));
Flags = CmdIter.Flags;
CmdIter.GetDescription(Desc, sizeof(Desc));
```

* PeaceMaker fixes

* Don't fetch unused properties

Co-authored-by: Michael Flaherty <michaelwflaherty@me.com>
Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
2023-08-30 22:08:45 +02:00
Arron Vinyard
210219030e Update dhooks.inc documentation for consistency (#1658)
* Update dhooks.inc documentation for consistency

- Modifies whitespace (change tabs to spaces for non initial indents, fix alignments, create consistency with rest of SM docs)
- Change `/*` to `/**` for consistency and to indicate comment doc
- Removes incorrect `@noreturn` doc

* Split long comments across multiple lines

* Remove `@noreturn` in IGameConfigs.h

* Remove `@noreturn` from IGameHelpers.h

* Remove `@noreturn` from asm.c

* Add `@noreturn` to ThrowError

* Add `@noreturn` and `@error` to ThrowNativeError
2023-08-30 22:08:45 +02:00
Corey D
fb0144900f Add ArrayStack.Clear native (#1676) 2023-08-30 22:08:45 +02:00
Mikusch
542b7673d6 Add LookupEntityAttachment & GetEntityAttachment natives (#1653)
Using the virtual `CBaseAnimating::GetAttachment(int, matrix3x4_t &)` was a deliberate choice because virtual offsets are generally easier to maintain than signatures. The `matrix3x4_t` is converted to world position and world angles internally.
Some of the other overloads are also inlined on a few games, making this the best choice.

Since this call can only be used on classes inheriting `CBaseAnimating`, we check if the `DT_BaseAnimating` SendTable exists on the entity, throwing a native error if it doesn't.
This safeguard could be greatly improved with a call to `CBaseEntity::GetBaseAnimating`, but would require more gamedata (maybe something to consider for the future?)
2023-08-30 22:08:45 +02:00
Corey D
cc1c02e3de Fix ArrayList return types (#1679)
ArrayList.SetString and ArrayList.SetArray both have int return types but their methodmap natives use void.
2023-08-30 22:08:45 +02:00
Headline
85b8e09e8a Prevent enum shadowing & pin sourcemod for build fixes (#1661) 2023-08-30 22:08:45 +02:00
Benoist
8c001872a8 sdktools: Add EntityCollisionRulesChanged & SetEntityOwner natives (#1620)
* Add EntityCollisionRulesChanged & SetEntityOwner natives

* fix win build, and unpushed changes

* Fixed bad world loop

* Requested changes + csgo offsets

* small copy paste mistake

* Strip the debug log lines

* Tiny clean up in comments

* line

* <dvander> try again

* sdktools: add default Param for owner.

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2023-08-30 22:08:45 +02:00
Peace-Maker
3c0f700a6b Import DHooks + Dynamic Detouring
This is the latest DHooks version from 1314f2d1b4
2023-08-30 22:08:45 +02:00
Nick Hastings
b064366169 Disable Reserved Slots plugin on Contagion.
(It doesn't have sv_visiblemaxplayers).
2023-08-30 22:08:45 +02:00
FortyTwoFortyTwo
62f08a31fc Fix compiling with tf2_stocks 2023-08-30 22:08:45 +02:00
David Anderson
377888276e Update to the new SourcePawn compiler.
This imports the brand new SourcePawn compiler. The new compiler is much
faster to compile and generates significantly improved code around
array generation and array access.

There are a number of compatibility changes in the new compiler. Most of
these are due to improved type checking and error detection. The full
list of notes can be found here:

https://github.com/alliedmodders/sourcepawn/blob/master/docs/upgrading-1.11.md

Additionally, .smx files generated by the new compiler will NOT load on
earlier versions of SourceMod, including earlier versions of 1.11. Old
plugins will continue to load as normal.
2023-08-30 22:08:45 +02:00
Nick Hastings
bb6e6fd3b6 Reorder SDKCallType enum for better compatibility with existing plugins. 2023-08-30 22:08:45 +02:00
dragokas
0449342bb0 Exposed SDKCall_Server call type to use CBaseServer methods 2023-08-30 22:08:45 +02:00
Vladimir
255f5ea745 Add OnClientLanguageChanged() forward (#1597) 2023-08-30 22:08:45 +02:00
Nick Hastings
88bdbf4866 Add support for other Steam ID formats to admin-sql-threaded (#1520). 2023-08-30 22:08:45 +02:00
Charles
daa1a4df14 Removed incorrect parameter RemoveChangeHook desc 2023-08-30 22:08:45 +02:00
Charles
4e2ace9d2f Removed incorrect parameter in description 2023-08-30 22:08:45 +02:00
Corey D
ee722d778f Use words instead of quotes for better clarity
As suggested by sneak-it
2023-08-30 22:08:45 +02:00
Corey D
e82f0acdb8 Missed Database.Escape 2023-08-30 22:08:45 +02:00
Corey D
383cd81be6 Clarify SQL_EscapeString usage
It's hard to see the difference between 2 single-quotes and 1 double-quote unless you highlight it.
2023-08-30 22:08:45 +02:00
GAMMACASE
8ae3be7185 Fix CS_OnCSWeaponDrop after latest CSGO update (21/10/21) (#1602) 2023-08-30 22:08:45 +02:00
Nick Hastings
55382e0a0f Add option to not bypass hooks with TakeDamage and DropWeapon natives. 2023-08-30 22:08:45 +02:00
naydef
02e2659ba5 Update float.inc (#1591) 2023-08-30 22:08:44 +02: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