1527 Commits

Author SHA1 Message Date
Kawe Mazidjatari
41083a7324 Revert typedef 2022-09-22 17:13:05 +02:00
Kawe Mazidjatari
de2400f6a2 Implement StrintCount utility
Counts the number or delimiters found in a given string
2022-09-22 17:08:20 +02:00
Kawe Mazidjatari
4cda4371cb ScriptFunctionBinding_t: light cleanup and map out more fields 2022-09-22 17:07:36 +02:00
Kawe Mazidjatari
7818385fa0 Improve naming convention in sqcript.h/cpp
Use Squirrel's naming convention.
2022-09-22 16:26:55 +02:00
Kawe Mazidjatari
8e880b8052 CSquirrelVM: define "DEVELOPER" at the earliest stage possible
'Script_DestroySignalEntryListHead' is the last function to be called before 'init.nut' is loaded and parsed. Defining "DEVELOPER" with value of "developer" convar allows us to utilize this constant in 'init.nut'.
2022-09-22 15:26:21 +02:00
Kawe Mazidjatari
eec4d9598e CSquirrelVM: define "DEVELOPER" to value of "ceveloper" convar
In this retail engine, "DEV" is always zero, except for scripts.rson. I think Respawn Entertainment defined this as zero for production builds under each context except the global one.. To fix this problem, we define a new constant named "DEVELOPER", change all references in scripts that where DEV (now R5DEV due to legacy reasons to mitigate this problem), to DEVELOPER. When the game is launched with -dev, anything within #if DEVELOPER with compiled, like the development behavior of DEV.
2022-09-22 15:00:01 +02:00
Kawe Mazidjatari
3af0c7c0b0 Fix dedicated.dll compile errors 2022-09-22 00:22:43 +02:00
Kawe Mazidjatari
42c6be9e08 Fix client.dll compile errors 2022-09-22 00:08:49 +02:00
Kawe Mazidjatari
678909f40f Increment SDK version
Version gate next release due to several security fixes.
2022-09-21 21:47:45 +02:00
Kawe Mazidjatari
df986f7d3b ConVar renames
Renamed:
- sv_pylonRefreshInterval => sv_pylonRefreshRate.
- sv_banlistRefreshInterval  => sv_banlistRefreshRate.
- sv_statusRefreshInterval => sv_statusRefreshRate.
2022-09-21 21:23:09 +02:00
Kawe Mazidjatari
0b77621129 Add missing function dbg print 2022-09-21 21:07:43 +02:00
Kawe Mazidjatari
63f4aafb67 Update playlists file 2022-09-21 21:04:41 +02:00
Kawe Mazidjatari
4c7ed95894 Update CFG files
Set 'sv_quota_stringCmdsPerSecond' to "256" for development.
Enable 'bhit_enable' for development.
2022-09-21 20:57:26 +02:00
Kawe Mazidjatari
c269d297b8 Update basepanel.cpp 2022-09-21 20:41:10 +02:00
Kawe Mazidjatari
8e75c57f0d Use retail/dev naming convention
Renamed 'debug' cfg's to 'dev', refered anything in code as retail/dev/prod.
2022-09-21 20:40:34 +02:00
Kawe Mazidjatari
693516ceb3 CL_CopyExistingEntity: remove Host_Error call
Calling Host_Error at this stage will cause a dead lock. Removed the call after performing several test (i think the reason all error calls are removed as of Titanfall 2 and Apex Legends (compared to Titanfall 1) is for this reason). Returning false does the job and allows the client to recover as soon as a valid packet comes in.
2022-09-21 20:13:51 +02:00
Kawe Mazidjatari
7912b79fa2 CL_CopyExistingEntity: implement missing bounds check
Implement bounds check for non-sanitized value of u.m_nNewEntity.
Debug builds of the engine have an assertion, however in release these are stripped.
This fixes a full chain client RCE exploit, for more information, see: https://ctf.re/source-engine/exploitation/2021/05/01/source-engine-2/
2022-09-21 02:38:58 +02:00
Kawe Mazidjatari
7a48c5ab6e Use shifted pointer 2022-09-21 00:38:46 +02:00
Kawe Mazidjatari
7804241376 CClient: add rate limit logic for 'ProcessStringCmd'
Client's can run string commands on the server with no rate limit. This means when you run 50k+ commands that are unknown, or spam 30k 'status' commands, you will be able to hang the server for 800/1200ms (15k/30kms if script printing to console is enabled!). Although the netchan processing budget system will kick you, the damage has already been done at this point. This change effectively breaks the ability to DOS the server from the client using networked string commands.
In easier words; binding 'status' to your mousewheel will get you kicked from the server, without hitching the server.
2022-09-20 22:48:55 +02:00
Kawe Mazidjatari
793c2e8e50 Rename 'Reputation_t' enumerant 2022-09-20 02:04:25 +02:00
Kawe Mazidjatari
dcc2c6224b Improve NetChan process time limit
* Check if m_MessageHandler is removed before running limit test.
* Add warning DevMsg if client exceeds value.
* Default 'net_processTimeBudget' value to '200'.
2022-09-20 02:00:52 +02:00
Kawe Mazidjatari
21756f8057 Update SDK version to 'VGameSDK004' 2022-09-19 20:21:40 +02:00
Kawe Mazidjatari
41f801365a CConsole: fixed color bug when missing newline
* Fixed bug where the in-game console could not color the line when no newline was found.
* Changed behavior to only newline when: '\n' has been found, or the context has changed (using a print without newline will continue to print on the same line in the console).
* Pass ImVec4 parameter in 'CTextLogger::InsertTextAt' by reference.
2022-09-19 20:21:18 +02:00
I-Am-Zee
f2eb97bb26 Merge remote-tracking branch 'upstream/master' into indev 2022-09-18 20:25:39 -05:00
Kawe Mazidjatari
7b0baf5d1f CLogSystem: make notify fade out animation 500ms slower 2022-09-19 01:46:35 +02:00
Kawe Mazidjatari
58cadb529b 'Bad behaving player' systems improvement
* Use 'CClient::Disconnect(..)' for all kicks and bans (this automatically clears the entire CClient slot, and removes the net channel).
* Only force disconnect when 'CNetChan::m_nSignonState' has a value that is not NULL.
* Clear the ServerPlayer slot on 'CClient::Disconnect(..)' and 'CClient::Connect(..)'.
* Only kick player for NetChannel overflow when value exceeds processing budget (not equals).
2022-09-19 01:28:43 +02:00
Kawe Mazidjatari
3311c99917 SQVM: use const qualifiers for SQCONTEXT 2022-09-19 01:18:14 +02:00
Kawe Mazidjatari
1ed7fd8203 Light warning string cleanup 2022-09-19 01:17:34 +02:00
Kawe Mazidjatari
fdd74aa622 Implement net message processing budget
Implement net message process budget (channel gets removed if value is exceeded).
Use 'net_processLimit' to enable the implementation on the server. It will get enabled by default after testing and some cleanup. This helps against people trying to slow the server down by spamming net messages with a higher rate, e.g. using 'bind "mousewheel_up" "status"'.
2022-09-18 23:19:50 +02:00
rexx
f81780a72d fix flags on sv_forceChatToTeamOnly 2022-09-18 21:49:14 +01:00
rexx
7e92150eae Merge branch 'indev' of https://github.com/Mauler125/r5sdk into indev 2022-09-18 20:42:18 +01:00
rexx
7d8d515190 add global text chat
use sv_forceChatToTeamOnly 0 to enable global chat
2022-09-18 20:42:16 +01:00
kralrindo
e22a45795f Custom trainer 2022-09-18 21:58:43 +03:00
kralrindo
25937055d3
Merge branch 'Mauler125:master' into master 2022-09-18 21:47:44 +03:00
kralrindo
d66e2a8da8 Add trainer to playlist 2022-09-18 21:47:20 +03:00
Kawe Mazidjatari
e90d2572b1 Implement 'ThreadInServerFrameThread()'
Tier0 export in r2, inline in r5.
2022-09-18 19:01:37 +02:00
Marvin D
514a407e4c RPakHeader_t/RPakLoadedInfo_t additions 2022-09-18 13:55:44 +02:00
Kawe Mazidjatari
6f7e275b9a Merge branch 'indev' v2.1_rc8 2022-09-18 01:26:08 +02:00
Kawe Mazidjatari
0b6eee20d3 Fix client.dll compile error 2022-09-18 00:48:00 +02:00
Kawe Mazidjatari
4ec7239b57 Add 'CNetChan::ProcessMessages(..)' hook body
Compat from S0 to S7.
2022-09-17 23:34:36 +02:00
Kawe Mazidjatari
8f2fb9b3a2 Light help strings cleanup
Everything marked '( !slower! )' could potentially slow the process down through usage or abuse (script prints could be abused as conhost is slow and bottlenecks the thread, they are by default only logged using SpdLog, which is very fast and won't cause a hitch even when you dump 2 live netchannels).
2022-09-17 20:48:41 +02:00
Kawe Mazidjatari
c523d13864 Remove FCVAR_CHEAT flag from 'net_tracePayload'
Flag is useless; allow dumping traffic at all times for static analysis (if launched as dev).
2022-09-17 20:43:16 +02:00
Kawe Mazidjatari
34b779735e Don't allow server to execute 'disconnect' on client
Removed extraneous 'FCVAR_SERVER_CAN_EXECUTE' flag. We disconnect clients using 'CClient::Disconnect(..)', relying on the client is useless without an anti-cheat and anti-tamper. Client can still use this to disconnect on its own though.

'migrateme' seemed useless as well, removed 'FCVAR_SERVER_CAN_EXECUTE'.

This makes all 'FCVAR_SERVER_CAN_EXECUTE' require 'FCVAR_DEVELOPMENTONLY' to be stripped, in order to execute without the '-devsdk' parameter (development launch arg),
2022-09-17 20:43:16 +02:00
kralrindo
94bea82358
Merge branch 'Mauler125:master' into master 2022-09-17 14:38:10 +03:00
kralrindo
3b66322b31 Add Mirage Voyage to playlists 2022-09-17 14:37:40 +03:00
I-Am-Zee
2a2be063fc update name vars foreach playlist 2022-09-16 16:06:38 -05:00
Kawe Mazidjatari
f6c37f5aad
Merge pull request #78 from kralrindo/master
Mirage Voyage Localization
2022-09-16 20:55:36 +02:00
kralrindo
a2cc62539c Mirage Voyage Localization 2022-09-16 18:29:23 +03:00
Amos
96b192075e Fix help string 2022-09-16 15:03:05 +02:00
Kawe Mazidjatari
3cbd98b900 Expose kick/ban/unban to UI SQVM 2022-09-16 01:40:17 +02:00