Commit graph

552 commits

Author SHA1 Message Date
GeckoEidechse
9c35f10f6d 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.

(cherry picked from commit a27c702b7d)
2023-12-01 21:32:54 +01:00
GeckoEidechse
67b005eca4 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>
(cherry picked from commit da7061a846)
2023-12-01 00:57:19 +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
Jan
99c5c86e18
Update libcurl to 8.4.0 (#568)
Addresses:
- https://curl.se/docs/CVE-2023-38545.html
- https://curl.se/docs/CVE-2023-38546.html
2023-10-12 03:01:47 +02:00
Jan
9adf88f46d
Correct submodule detection (#569)
The contents of the submodules were incorrectly counted resulting in a git submodule update on every cmake invocation
2023-10-11 22:55:25 +02:00
GeckoEidechse
16f85420b3
Make link to BUILD.md relative to README.md (#571)
Make link to BUILD.md relative to README.md instead of a hardcoded link to relevant GitHub page
2023-10-11 17:43:06 +02:00
GeckoEidechse
14c01e829c Trim trailing whitespace 2023-10-11 15:44:55 +02:00
GeckoEidechse
a9a1e0822c
Fixed mixed indentation in utils.cmake (#570)
The file had mixed indentation (spaces and tabs) when really it
should've been spaces only from the beginning
2023-10-11 15:41:34 +02:00
GeckoEidechse
57201649e7
Fix incorrect help string text (#567)
Help strings for `ns_server_name` and `ns_server_desc` were swapped.

Co-authored-by: BobTheBob <32057864+BobTheBob9@users.noreply.github.com>
2023-10-10 14:29:24 +02:00
F1F7Y
c1745b29ad
Add mileslog_enable convar (#515)
Adds a convar to toggle whether we should log from the miles log func

Most of these warnings are warnings about events being starved, in some cases slowing down the game due to the number of log calls.
2023-10-10 02:28:32 +02:00
Rémy Raes
a040bff98c
Create mod entry in enabledmods.json if it doesn't exist (#410)
Currently, when you add a new mod to your `mods/` directory, when there's no associated entry in the `enabledmods.json` file, it is considered enabled by default; mod entries are only written in `enabledmods.json` when toggling them via the mods interface.

In this pull request, I propose to create mod entries in `enabledmods.json` on startup when detecting they don't exist.
2023-10-09 01:34:47 +02:00
F1F7Y
70a0114caa
Rewrite crash handler (#477)
The goal of this commit is to make the crash handler code more readable and fix some issues.

- Format registers
- Format Modules
- Format stacktrace
- Format mods
- Create minidump
2023-10-08 22:11:55 +02:00
Jack
024605399a
Reduce warnings due to calling conventions (#555)
Fix instances of "anachronism used: modifiers on data are ignored"
2023-10-07 14:28:43 +02:00
Jack
c093ee10f0
Expose origin auth state and errors to squirrel (#468)
Also moves `NSIsMasterServerAuthenticated` out of `scriptserverbrowser.cpp` because it didn't really fit there

This will be used for showing failed origin auth errors in the game's UI
2023-10-07 12:25:09 +02:00
H0L0
9d8bedf580
Write date to logs (#565)
Next to time also write date to log files.
2023-10-06 00:50:53 +02:00
GeckoEidechse
b269c4df61
Define indent size in editorconfig (#550)
Setting indent size in `.editorconfig` means that things like GitHub web
preview will default to showing tab indent size as 4 spaces.
2023-10-04 13:57:34 +02:00
Jan
5798c6369c
Give g_pMemAllocSingleton a default value (#563)
Give default value as standard does not define value if uninitialised.
2023-10-04 13:56:48 +02:00
Jack
1d30b2d5ee
Always allow the local player through the banlist (#540)
Adds a check to always allow local player through banlist to aid with players accidentally banning themselves.
2023-10-04 01:04:32 +02:00
GeckoEidechse
2a3be90915
Revert "Add a safeguard to map command" (#561)
Revert "Add a safeguard to map command (#529)"

This reverts commit cde626b041.
2023-10-03 19:32:14 +02:00
Jack
d6f0cd508d
Fix crash when running disconnect %%s (#554)
Co-authored-by: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com>
2023-10-02 23:44:27 +02:00
cat_or_not
cde626b041
Add a safeguard to map command (#529)
Adds safeguard to the `map` command that prevents it from executing if the requested map is invalid or no map argument is given.
2023-10-02 23:17:22 +02:00
F1F7Y
0cbdd56728
Set spewlog_enable default value to 0 (#516) 2023-09-17 02:40:00 +02:00
Jack
af1df846a3
Export Northstar version number in DLL (#542)
Export version number in `Northstar.dll`
2023-09-15 01:42:21 +02:00
F1F7Y
1979247175
Fix CSquirrelVM::Init hook in server.dll (#544)
Fix typo in offset
2023-09-15 00:36:25 +02:00
Rémy Raes
e51d345a20
feat: Enforce Thunderstore format for remote mods (#535)
* feat: enforce Thunderstore format for remote mods

* refactor: remove remote mods directory from "classic" mod loading

---------

Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
2023-09-15 00:31:37 +02:00
Cyn
a27368df36
Linux build instructions in BUILD.md (#531)
Adds Linux build instructions and corresponding Docker file.
2023-09-14 21:11:59 +02:00
Jan
07e76e3a8e
Support DLLs in Profile from wsock32 proxy (#527)
* Copy LoadNorthstar from NorthstarLauncher to wsock proxy
* add missing bits
2023-08-05 18:56:33 +02:00
Jan
300521638f
Turn VPKData into a opaque struct (#510) 2023-07-29 23:02:38 +02:00
Jan
0af8c500ae
Validate package pattern before checking for plugins (#525)
Adds missing validation check to ensure that the package folder the plugin is included in matches the `AUTHOR-MOD-VERSION` pattern.
2023-07-29 22:48:24 +02:00
Jan
e3f2c4c662
Warn about the package dir, not the mod dir (#526) 2023-07-29 22:17:18 +02:00