Commit graph

779 commits

Author SHA1 Message Date
GeckoEidechse
c7edf9bf74
Always print masterserver response request id (#633)
Always print masterserver response request id to logs
2024-01-21 00:13:08 +01:00
Jack
447cace77f
Add and use ScopeGuard (#643)
Use a scope guard instead of `GOTO` statements for curl cleanup
2024-01-20 23:40:27 +01:00
Jan
7c9ffa1cab
Remove structs.h in favor of manual padding (#613)
- delete `structs.h`
- completely remove VPKFileEntry (its completely unused)
- convert all other instances of `OFFSET_STRUCT` to normal structs (this was automated and may be wrong)
- Update `m_bZooming` type from `uint32_t` to `bool`
2024-01-20 23:37:47 +01:00
Jack
f2dd1583ef
Fix debug overlay not rendering script function stuff (#637)
Call our version of the function instead of native
2024-01-13 17:47:44 +01:00
cat_or_not
f98513d71f
Add ban/kick concommand completion (#604)
Adds completion to ban and kick commands when typing them in in-game console.
2024-01-04 22:10:37 +01:00
Jack
dcf6e1b1fd
Use .def for function exports (#625)
Cherry-picked from primedev

Co-authored-by: F1F7Y <filip.bartos07@proton.me>
2024-01-04 00:32:20 +01:00
Jack
eda88bd170
Add cmake format check to CI (#630) 2024-01-04 00:10:06 +01:00
Northstar
a59c64becd Format cmake files 2024-01-04 00:01:43 +01:00
Northstar
1220958ab8 Format cmake files 2024-01-03 23:54:41 +01:00
Northstar
36e1093620 Format cmake files 2024-01-03 23:39:55 +01:00
GeckoEidechse
baa706d25a Run auto-label action at a later time
for testing
2024-01-03 21:46:43 +01:00
Jack
4855b56849
Schedule the merge conflict labelling to run daily (#631) 2024-01-03 21:39:05 +01:00
Jack
a78b7d857f
Simplify vscript stub function (#627)
Since we can get stack info from the sqvm, we don't need to give the function name in the template and stuff.
Cherry picked from primedev
2023-12-30 23:59:56 +01:00
Jack
f5ab6fb5e8
Folder restructuring from primedev (#624)
Copies of over the primedev folder structure for easier cherry-picking of further changes

Co-authored-by: F1F7Y <filip.bartos07@proton.me>
2023-12-27 01:32:01 +01:00
GeckoEidechse
bb8ed59f68
Add Action to add label to PR on merge conflict (#621)
Adds a GitHub Action that auto-adds a label to a PR in case there are merge conflicts.
2023-12-20 16:03:31 +01:00
Northstar
1e5c4a7f6a Format project 2023-12-20 15:20:02 +01:00
Jack
714282b520
Set a better AccessModifierOffset in clang-format (#619)
Default appears to be -2, which causes clang-format to mix tabs and spaces
2023-12-20 15:01:01 +01:00
Jack
0438b5c8cf
Cherry pick "remove unnecessary namespaces" from primedev (#618)
Cherry-picks the removal of unnecessary namespaces from `primedev`
https://github.com/F1F7Y/NorthstarPrime/

Co-authored-by: F1F7Y <filip.bartos07@proton.me>
2023-12-20 14:24:07 +01:00
EladNLG
210dab2b0e
Fix SERVER | CLIENT context specifier error (#566) 2023-12-14 22:34:05 +01:00
Rémy Raes
5a7ad2249b
Mod download UI integration (#595)
UI integration for the mod downloading feature. Feature activation locked behind a convar.
2023-12-14 22:19:21 +01:00
cat_or_not
43f0bce059
Add plugin dependency constants (#458)
Adds dependency constants for plugins so mods can rely on plugins without always producing script errors when the plugin is missing
2023-12-14 13:07:02 +01:00
Jack
0976a3500e
Rework -vanilla to be a vanilla compatibility mode (#601)
Old `-vanilla` behaviour is now handled by `-nonorthstardll`.

New squirrel constant called `VANILLA`. Set to true when in vanilla compatibility mode.

Differences when in vanilla compatibility mode:
- Doesn't restrict server commands (same as `-norestrictservercommands`)
- Doesn't block FairFight screenshot functions 
- Doesn't do Atlas-related stuff (except for mainmenupromos)
2023-12-14 13:00:26 +01:00
Jan
8a4107191b
Disable more compression methods for minizip (#602)
Only use the absolute necessary compression methods in order to still allow compilation under Wine.
2023-12-13 14:56:23 +01:00
Northstar
de5a5006f1 Format project 2023-12-07 21:20:15 +01:00
uniboi
2a30a0d58e
Add clang-format config to pack constructor initializers (#608)
The setting will set each initializer in a new line if all of them don't fit in one line
2023-12-07 21:17:50 +01:00
GeckoEidechse
ad1b6ae61b
Bump clang format action to 0.16.2 (#609)
Current is 0.13 which was released October 2021. This bumps it latest at the time of writing, i.e. 0.16.2
2023-12-04 12:20:47 +01:00
GeckoEidechse
a27c702b7d
Revert "Move player auth to CServer::ConnectClient (#548)" (#610)
This reverts commit 17217a3968 (PR #548) which introduced a regression allowing auth to progress further than intended.
2023-12-01 21:31:20 +01:00
GeckoEidechse
da7061a846
Add a safeguard to map command (#564)
Adds safeguard to the `map` command that prevents it from executing if the requested map is invalid or no map argument is given.

Retry of #529

Co-authored-by: cat_or_not <41955154+catornot@users.noreply.github.com>
2023-11-28 00:05:42 +01:00
Maya
c427fe4abc
Load plugin dependencies from lib folder (#590)
Disables recursive search for plugins in plugin folders and if it exists adds lib folder within plugin folder to DLL load dirs
2023-11-27 23:50:38 +01:00
Jan
cfc53081ff
Replace audio event fetching with hook (#603)
Takes the previous audio event code, which relied on reading out a register using masm, and replaces it with a new hook.
Adapted from NorthstarPrime https://github.com/F1F7Y/NorthstarPrime

Co-authored-by: F1F7Y <filip.bartos07@proton.me>
2023-11-23 18:53:04 +01:00
cat_or_not
17217a3968
Move player auth to CServer::ConnectClient (#548)
Fixes bots crashing servers when they are the first to connect to it. Also moves player auth to `CServer::ConnectClient`. This allows the removal of `iNextPlayerUid` and `pNextPlayerToken` which were the cause of issues previously since they were not initialized by bots.
2023-11-22 02:17:35 +01:00
Jan
90e0376ebc
Improve replacing xinput1_3 with xinput9_1 (#583)
The previous logic incorrectly loaded compared the whole argument, which may be a path, to the string literal.
This fix checks if the argument ends with the string literal instead.
2023-11-22 02:16:22 +01:00
Cyn
aeecd7a69b
Add mod versions when logging that a mod has loaded (#596)
Prints the version of the mod when loaded succesfully
2023-11-21 01:14:37 +01:00
Jack
86c20013c8
Don't log masterserver registration errors in the lobby (#543)
The main purpose of this PR is to not flood the console with errors that aren't really errors, thus preventing various tickets or misleading users.
2023-11-21 00:54:07 +01:00
GeckoEidechse
407bcc7647
Update link for verified mods JSON file (#600)
File was moved with https://github.com/R2Northstar/VerifiedMods/pull/8
2023-11-17 22:06:03 +01:00
cat_or_not
bb822b7638
Plugins v3 (#472)
- nuked presence logic ( moved to the discord rpc plugin )
- more exposed sq functions
- exposed dll addresses
- `g_pCVar` is exposed
- added "userdata" to plugin's async call
- added runframe to plugins
2023-11-06 02:21:50 +01:00
GeckoEidechse
583bae6e1a
Plugin related log error expecting more args (#591)
The related line expected 3 args but only 2 args are passed.

Co-authored-by: cat_or_not <41955154+catornot@users.noreply.github.com>
2023-11-05 20:20:08 +01:00
H0L0
2b269d22a4
Convar print commands (#539)
Adds various concommands such as 
- `convar_findByFlags`
- `convar_list`
- `convar_differences`
- `convar_find`

The first 3 listed above are already registered as concommands natively but didn't seem to do anything when tested.
`convar_findByFlags` and `convar_find` were already implemented by Bob under the names `findflags` and `find` respectively but the names have been changed to reflect already existing convars.
2023-11-05 13:36:06 +01:00
Jack
35581f1ff2
Expose Northstar.dll version to squirrel (#558)
Exposes the version number in the form of individual digits to script.
2023-11-05 13:22:59 +01:00
Rémy Raes
13f2facdb6
Inital native code for verified mod auto-downloading (#545)
Allows client to download a mod archive from the Thunderstore API, and extract included mods in the remote mods folder of the current game profile.

Not all mods can be automatically downloaded, as it would cause some security issues, and Thunderstore mod name cannot be deduced from actual mod name: to be eligible to auto-downloading, a mod must appear in the list of verified mods.

Said list and complete mod verification procedure are described here: https://github.com/R2Northstar/VerifiedMods

Exposes two commands to test the feature:
- `fetch_verified_mods` retrieves verified mods list from the GitHub organization, and stores it locally;
- `download_mod` does the actual mod downloading/extraction job.
2023-11-03 16:32:41 +01:00
Jack
6e32a58480
Refactor debugoverlay.cpp (fix smart pistol lines) (#538)
Refactors `debugoverlay.cpp` based on primedev and fixes smart pistol lines in the process.

Co-authored-by: F1F7Y <64418963+F1F7Y@users.noreply.github.com>
2023-10-30 20:29:15 +01:00
Jack
cfc32a6bd6
Run add-to-project on new PRs (#584)
Fix the add to project workflow so that it works on PRs from forks, securely
2023-10-23 22:41:52 +02:00
Jan
db5eac19f6
Replace field preprocessors with less hacky solutions (#492)
This behavior is a lot simpler and less dependent on how constants are represented during the preprocessing step.
2023-10-23 15:53:16 +02:00
Jack
d463a43474
Use 4th digit in version number for CI build number (#541)
Sets the 4th digit of the version number to the current CI run number.
This is done to more easily link a binary back to the PR or commit it came from.
2023-10-16 14:51:24 +02:00
Jan
f763e66a1f
Fix proton detection output (#534)
Fixes Proton detection logic printing incorrect basename
2023-10-15 22:18:19 +02:00
H0L0
f24089e2d7
Add check for r2/maps folder (#575)
Adds a fix to check if `r2/maps` folder exists before trying to iterate through it.
2023-10-15 22:12:02 +02:00
Jack
98af0dcbb4
Move plugin communication handler init out of plugin manager init (#581)
Plugin state requires this to be initialised even if `-noplugins` is passed, but if `-noplugins` is passed, it doesn't get initialised.

Moving this to `dllmain` guarantees that it is initialised properly and prevents #580
2023-10-15 21:57:41 +02:00
Jan
fb7b538c2f
Revert "Update libcurl to 8.4.0" (#574)
Newer releases of libcurl break the docker container

This reverts commit 99c5c86e18.
2023-10-15 11:22:03 +02:00
GeckoEidechse
db5ef8d6b0
Only run add-to-project action on issues (#577)
Only run on issues
PRs from forks are triggered from that fork which means that they don't have access to the necessary token
2023-10-15 02:05:58 +02:00
Jack
2dd19ab51f
Add workflow for adding PRs and Issues to the project board (#572)
Automatically adds all opened issues and pull requests to the project board.
2023-10-14 22:55:56 +02:00