Commit Graph

7156 Commits

Author SHA1 Message Date
BotoX
313c555e2e Add "Restart Current Map" to sm_map menu. 2024-06-09 17:45:27 +02:00
BotoX
e5fed0051b Fix GetClientCount(false) 2024-06-09 17:45:27 +02:00
BotoX
c2a86c77fd Add damageCustom argument to SDKHooks_TakeDamage native. 2024-06-09 17:45:24 +02:00
BotoX
8c534e770b fix IsMapValid behavior change by a2246af121 2024-06-09 17:41:10 +02:00
BotoX
2c86e8099a Add OnEntitySpawned to SDKHooks. 2024-06-09 17:41:10 +02:00
BotoX
03eeb23ab3 Implement per-client randomized menus with MenuShufflePerClient native.
Add MenuSetClientMapping native.
2024-06-09 17:41:05 +02:00
BotoX
a9c85d8842 Changes on sm_*say 2024-06-09 17:39:34 +02:00
BotoX
850ee60a18 Add GetClientIClient native. 2024-06-09 17:39:34 +02:00
Obuss
7cd130904b Logging changes to various base plugins. 2024-06-09 17:39:30 +02:00
BotoX
19019d3a4b Extend function calling API for natives and allow catching exceptions.
Change sourcepawn url.
2024-06-09 17:34:33 +02:00
BotoX
b31375f087 Fix @spec not targeting clients in unassigned team. 2024-06-09 17:33:19 +02:00
BotoX
1d999c3984 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.
2024-06-09 17:33:16 +02:00
BotoX
fdcbdb6918 Add more macros to CDetour. 2024-06-09 17:32:32 +02:00
Headline
d42a8c7c1e
Move Safetyhook mess into a mirror repo (#2163)
* Bring in safetyhook mirror repo

* Add proper submodule

* Update submodule for linux fixes

* Update submodule again

* Change the method of compiling safetyhook (#2167)

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>

* Update submodule

* Update submodule for -fPIC

---------

Co-authored-by: Benoist <14257866+Kenzzer@users.noreply.github.com>
Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
2024-06-08 20:05:29 +00:00
Benoist
11d3cf94f7
Add GetFilePermissions (#2177)
Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
2024-06-08 14:17:50 +00:00
Nick Hastings
0e4b1ca4cf Revert "Update sourcepawn submodule (#2146)"
This reverts commit 1bcc5b8a44.
2024-06-08 09:26:13 -04:00
suza
1bcc5b8a44
Update sourcepawn submodule (#2146)
Update SourcePawn and AMTL.
2024-06-04 16:24:22 -07:00
Benoist
7df2f8e045
Reconcile the concept of Edict & Networkable across the codebase (#1903)
* Reconcile the concept of Edict & Networkable across the codebase

* There's no need to check this, it's done elsewhere. Also could be null (segfault)

* This was never needed

* Pseudo review changes

Re-added removed null checks, and added new ones.

Changed the error messages in Get/SetProp natives to better reflect reality.

* Don't change the behaviour of GetEntityNetClass

* Overload IGameHelpers::FindServerClass

* Make error messages more accurate

* Fix a dev comment

* Rename FindServerClass

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
2024-06-01 14:07:55 +00:00
1mpulse
9f3584a056
fix VDECODE_FLAG_ALLOWNOTINGAME flag (#2000)
Corrects the check for the VDECODE_FLAG_ALLOWNOTINGAME flag
2024-06-01 13:57:07 +00:00
Benoist
4e73713fab
Fix rare crash with logs (#2161)
* Fix rare crash with logs

* Nullcheck instead

* Update smn_filesystem.cpp

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
2024-05-24 13:10:24 +02:00
Benoist
e07c120cab
CDetour safetyhook (#2162)
* Add safetyhook, remove libudis86

Co-authored-by: bottiger1 <55270538+bottiger1@users.noreply.github.com>

* Add modified CDetour

Co-authored-by: bottiger1 <55270538+bottiger1@users.noreply.github.com>

* Add CDetour [Safetyhook] to build script

* Re-enable loader/core/corelogic, and fix new C++20 error

* Reenable all extensions (except dhooks)

* Make cstrike compile against new CDetour

* Remove unused variable in sdktools output?

* Make sdktools compile against new cdetour

* Downgrade to C++17

* remove auto

* fix compilation on linux

* Re-enable dhooks

* Re-authorise old compilers

* Fix invalid downgrade of std::optional

* readd libudis86 for dhooks only

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
Co-authored-by: bottiger1 <55270538+bottiger1@users.noreply.github.com>
2024-05-21 01:53:44 +00:00
Kaela
e3734803f0
sdkhooks: retain vtable hook until level end (#2094)
* Band-aid for Bulk SDKHooks performance impact on linux

Platform specific changes.

* Oops forgot about header

* Simplified/improved LevelShutdown code
2024-05-18 12:30:20 +01:00
Nick Hastings
7c757ac119 Trigger build for hl2sdk-l4d2 changes 2024-05-15 09:36:23 -04:00
sappho
c5425def7f
Trigger build for L4D2 changes (#2155) 2024-05-14 17:09:03 -07:00
ojlanders
e60c672485
Add OnServerHibernationUpdate forward (closes #1483) (#2151)
* Add OnServerHibernationUpdate forward (closes #1483)

* Clarify hibernation state

* make it 2 forwards instead of 1

---------

Co-authored-by: Odin Landers <ojl9576@rit.edu>
2024-05-07 01:44:56 +00:00
rtldg
908ffdb523
make RenameFile() on Windows also replace the file (#2060)
* make RenameFile() on Windows also replace the file

* Add MOVEFILE_COPY_ALLOWED to MoveFileExA
2024-05-05 22:20:46 +00:00
Rushaway
d56dc62e03
i18n: Czech Translations (#2120) 2024-05-05 21:19:11 +00:00
Kit o' Rifty
f08f1ef0d6
Fix passing variant_t parameters + fix codegen stack on Win64 (#2117)
* Fix 64-bit JIT not allocating stack space for params on stack
Fix wrong cond check for passing objects by value

* Fix wrong FireOutput detour proto on win64
2024-05-05 21:17:59 +00:00
bottiger1
5cb2d68fd7
AcceptEntityInput 64bit fix (#2149)
* Fix AcceptEntityInput on 64 bit by using struct from SDK instead of pointer math.

* Fix from Malifox. Not sure what it does but it is supposedly related to the AcceptEntityInput crash.

* Fix episode1 and darkm sdk paths
2024-05-05 20:06:06 +00:00
caxanga334
96d0959db1
Update HL2SDK Manifests Submodule (#2150) 2024-05-05 17:14:15 +00:00
Artvin
5a6b2c8ebf
64bit gamedata fixes (#2141)
* save as of now

* save as of now

* progress

* hint towards comments

Please for the love of god, put comments for updating these in the future will be even more annoying.
i dont even know what LevelShutdown it wants.

* forgot

* fix

* fixes

* Update engine.ep2v.txt

* Update engine.ep2v.txt

* Update sm-tf2.games.txt

---------

Co-authored-by: Benoist <14257866+Kenzzer@users.noreply.github.com>
Co-authored-by: Nicholas Hastings <nshastings@gmail.com>
2024-05-05 16:13:39 +00:00
Adrian-Stefan Mares
343f64f6b7
Fix IsClientSourceTV in L4D2 with a custom tv_name (#2143) 2024-04-29 00:17:10 +01:00
Oliver John Hitchcock
f9ad35badf
Stop EntRefToEntIndex returning garbage if a bad parameter is passed (#1323)
* Stop EntRefToEntIndex returning garbage if a bad parameter is passed

Seen multiple bad usage of this function that works only because whatever was passed in was returned as it wasnt an entity reference.
This code should have worked and would be expected to have returned something invalid but instead the the input was returned which allowed the code to work when really it is bad code.
See for one such case https://discordapp.com/channels/335290997317697536/335290997317697536/736518488314871868

* Update documentation of EntRefToEntIndex

Added the error text saying what shall be returned when a invalid parameter is passed.

* Validate entity index instead of just returning INVALID_EHANDLE_INDEX

Not sure if it needs this much validation but this just mirrors how IsValidEntity works, so the entity index returned should be valid else INVALID_EHANDLE_INDEX is returned.

* EntRefToEntIndex improve doc comments to better represent functionality

---------

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2024-04-25 23:19:04 +00:00
Nick Hastings
60b6a8dfb0 Revert "Trigger build for hl2sdk-tf2 changes"
This reverts commit ee51162c3f.
2024-04-22 21:31:14 -04:00
Nick Hastings
00f3970036 Revert "Trigger build for hl2sdk-tf2 changes"
This reverts commit 123ad7aab1.
2024-04-22 18:24:19 -04:00
Alienmario
7d78c141e7
Fix SDKHooks IEntityListener (#2138) 2024-04-21 19:21:47 +00:00
Nick Hastings
123ad7aab1 Trigger build for hl2sdk-tf2 changes
(https://github.com/alliedmodders/hl2sdk/issues/231)
2024-04-21 12:04:44 -04:00
Nick Hastings
ee51162c3f Trigger build for hl2sdk-tf2 changes
https://github.com/alliedmodders/hl2sdk/issues/231
2024-04-20 14:04:26 -04:00
Adrian-Stefan Mares
af93d819c6
Handle INVALID_FUNCTION mismatches at plugin boundaries, redux (#2136) 2024-04-19 21:56:48 -04:00
CookieCat
d426d1f04f
x32 Windows Gamedata Fixes for 4/18/2024 TF2 Update (#2137)
* sm-tf2-games

* FireOutput
2024-04-19 18:00:30 -07:00
ojlanders
6cac489fce
Prevent recursion in sm_ServerCommandEx (fixes #967) (#2133)
* Prevent recursion in sm_ServerCommandEx (fixes #967)

* Update core/smn_console.cpp to fix style

Co-authored-by: Erin <asherkin@limetech.io>

---------

Co-authored-by: Odin Landers <ojl9576@rit.edu>
Co-authored-by: Erin <asherkin@limetech.io>
2024-04-18 11:42:37 +00:00
Peak
5c507cc35c
Implement File.Size (#2131)
* Implement file size method for already open files

* Switch from fseek/ftell to fileno/fstat size reading
2024-04-13 18:14:52 +00:00
Rain
dbec0b165c
Neotokyo: Add "SetOwnerEntity" gamedata (#2126)
This adds game support for `SetOwnerEntity`, `SetEntityCollisionGroup`.
2024-03-21 00:11:59 +00:00
Rushaway
4e8b66bf99
fix: sorted alphabetically, remove duplicate 'ko' (#2121)
* fix: sorted alphabetically, remove duplicate 'ko'

* 'KoreanA' is a valid value
2024-03-05 01:20:40 +00:00
CookieCat
8dcbe14ea0
Throw an error when attempting to remove worldspawn in RemoveEntity/RemoveEdict (#2104)
* Check for worldspawn in RemoveEntity and RemoveEdict

* A little more info
2024-02-20 16:14:00 +01:00
Peak
06dcb991e8
Allow topmenu config file to sort with subcategories (#1757) 2024-02-18 11:46:48 +01:00
Mart
e262064fd8
Update game.nucleardawn.txt (#2116)
add missing GetAttachment offset for ND
2024-02-14 23:22:26 +00:00
dependabot[bot]
a80b9c5c0f
Bump actions/cache from 3 to 4 (#2103)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-12 14:01:26 +01:00
Benoist
638aae0040
Fix sdktools gamedata (#2113)
Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
2024-02-08 00:02:01 +00:00
Benoist
35ac74c7a7
Update gamedata for l4d2 (#2111)
* update gamedata for l4d2

* undo findentitybyclassname sig change

* update gEntList offset accordingly

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
2024-02-02 21:10:42 +00:00