Commit graph

779 commits

Author SHA1 Message Date
GeckoEidechse
acdfefdc33
Fix typo in class member function (#750)
`pushSQObject` does not exist

Co-authored-by: EladNLG <e1lad8955@gmail.com>
2024-07-10 15:13:31 +02:00
Rémy Raes
52b1102299
fix: Do not crash on unknown MAD manifesto format (#749)
Verify JSON has attributes before trying to access them
2024-07-10 01:21:40 +02:00
Rémy Raes
497945bbbd
Fix multiple audio file overrides (#677)
This basically prevents audio files from being loaded into memory if matching audio event has already been overriden by a previous mod, preventing a crash from occurring.

This means that audio mods now respect the load priority, i.e. mods with higher priority (= lower int value) will have priority over other mods on audio overrides.
2024-07-06 12:40:36 +02:00
Rémy Raes
3edcc91c72
Expose mods remote status to Squirrel VM (#684)
Add a Squirrel VM method to know if a given mod is remote or not.
2024-07-04 23:34:16 +02:00
EladNLG
afa2469780
Make Script Errors from Northstar Callbacks Fatal (#698)
Because:
- Errors are incredibly confusing when non-fatal - there is no indicator that an error is happening
- The error is unknown without a try/catch block
- Errors cannot be tracked to a line, or file, and its location has to be figured out manually
- They can throw a game into an unexpected state with no indicator, confusing both players AND developers
2024-07-04 23:25:07 +02:00
BobTheBob
193ab49056
Properly handle invalid cvar replications without blocking netmessage (#408)
Properly handle invalid cvar replications without blocking netmessage entirely and restore `ns_server_name` replication
2024-07-04 22:53:38 +02:00
Jan
fc087d8044
Remove unused typedefs from precompiled header (#737) 2024-06-28 01:01:28 +02:00
Jan
778e338335
Remove precompiled header from wsock proxy (#739)
The wsock proxy is so small and self contained that it really does not benefit from a precompiled header.
2024-06-28 00:44:59 +02:00
Jan
4d8798e5cc
Remove EXPORT macro from precompiled header (#738)
as its used once and does not warrant being in the precompiled header
2024-06-28 00:39:03 +02:00
Jan
f29823a0d3
Check for Console Window before allocating one (#741)
Check for Console Window before allocating one and remove "console already exists" from error message, we know it doesn't
2024-06-28 00:37:26 +02:00
Jan
d52aaadc9a
Add missing object check in mod manager (#731)
`HasMember` asserts `IsObject()` internally.
In release builds this is not an issue but this does not work on Debug builds.
2024-06-24 14:38:56 +02:00
Jan
4ada6a354e
Fix const-qualified assignment in RapidJSON (#717)
pulls in https://github.com/Tencent/rapidjson/pull/719
resolves https://github.com/Tencent/rapidjson/issues/2277
2024-06-23 01:38:58 +02:00
Jan
c07ebd8728
Restructure primelauncher cmake logic (#727)
Move primelauncher cmake logic into its subdirectory allowing everything related to it to be self contained
2024-06-23 01:34:30 +02:00
Jan
1c9f39ddde
Fix memalloc problems (#728)
alloc declarations to work with CRT
implement missing _recalloc_base and _msize
2024-06-22 20:46:43 +02:00
Jan
225eb1849a
Use static MSVC Runtime Library (#718)
I think its best if we use the static runtime to remove more dynamic dependencies that we can't anticipate.
2024-06-22 12:03:04 +02:00
Jan
3c87644816
Add overrides to custom_sink_it_ methods (#708)
the compiler knows we want to override here, since the original `custom_sink_it_` is virtual but we should be explicit to prevent any mistakes.
2024-06-22 11:59:46 +02:00
Jan
874afd95ff
Remove useless this pointer check (#710)
The standard states that this must always be a valid pointer so these checks are optimized out anyway.
Sane compilers, such as clang, also complain about this and state that this is pointless.
2024-06-20 16:47:05 +02:00
Jan
f1a990575e
Lowercase all linked libraries for building on Linux (#726)
Microsoft, in their infinite wisdom, decided to suffix some libraries with `.Lib` instead of `.lib`
This causes issues with cmake on Linux because it only looks for `.lib` which it won't be able to resolve because the file system is case sensitive.
Microsoft does this for backwards compatibility, in cmake this is a limitation so the best solution is to bite the bullet and lowercase all libraries which setups such as wine-msvc and xwin already do.
2024-06-20 16:44:01 +02:00
Jan
26fffcfdba
Remove invalid memset in ServerPresence (#709)
The use of sizeof is incorrect here since `this` is a pointer and sizeof is used on the pointer directly, instead of what the pointer points to.
It seems to work without issue due to padding but could cause issues if an instanced class like `std::string` gets nulled.
2024-06-20 16:42:17 +02:00
Jan
8e56367314
Add missing case for switch cases in JSON deserialization function (#712)
RapidJSON switch gets a new case for null, where we do nothing. Future enum values would result in a new warning.
2024-06-19 14:40:23 +02:00
GeckoEidechse
7f3fe6c9b4
Update actions/upload-artifact to v4 (#725)
v3 is outdated and will soon be deprecated

Co-authored-by: Jan <sentrycraft123@gmail.com>
2024-06-19 13:55:53 +02:00
Jan
9a60c23811
Add clang CI (#721)
Builds Northstar with the Microsoft provided clang-cl build next to MSVC
Release builds are unchanged and still only built with MSVC
2024-06-19 13:44:34 +02:00
GeckoEidechse
b02e6097c4
Update actions/checkout to v4 (#724)
v3 is outdated and will soon be deprecated

Co-authored-by: Jan <sentrycraft123@gmail.com>
2024-06-19 13:32:40 +02:00
Jan
ec974f60cb
Don't instantiate templates before declaration, add missing instantiation (#706)
In C++ explicit template instantiations need to be done AFTER template declarations are made.
2024-06-17 14:35:59 +02:00
Jan
75bb4143ce
Add default case for SquirrelContext switch (#716)
Add default case for SquirrelContext switch and logs errors so we can catch them if they do ever happen.
2024-06-16 17:57:52 +02:00
Jan
f75aff1425
Use double brackets to let compiler know assignment is intentional (#707)
Use double brackets to let compiler know that assignment inside `if` statement is intentional and not the cause of a missing second `=`.
2024-06-16 13:14:24 +02:00
Jan
4a716e54f7
Check if hook target is non null before calling MinHook (#711) 2024-06-16 13:11:51 +02:00
Jan
742c4a133a
Remove duplicate wsock32 export (#714) 2024-06-16 13:06:37 +02:00
Jan
d8d861c3db
Assign CreateInterface member instead of creating a new variable (#705)
Assign CreateInterface member instead of creating a new variable. This fixes valid Plugins failing to load.
2024-06-15 12:39:35 +02:00
Jan
a06319c974
Use old Mutex constructor to deal with redist incompatibility (#704)
See GitHub PR for detailed explanation
2024-06-14 10:40:05 +02:00
wolf109909
220b7a1bf7
Fix engine error crash caused by language detection hooks (#699)
Previous logic would always return `true`
2024-05-21 15:50:22 +02:00
Jan
ab653555f6
Fix plugin with NULL strings causing UB (#695)
Instance string members only after checking for null pointers to prevent UB
2024-05-05 18:00:04 +02:00
GeckoEidechse
9a64c1885c
Add instructions to build with podman (#686)
Add instructions to build NorthstarLauncher with podman under SELinux enabled distros
2024-04-05 19:33:19 +02:00
GeckoEidechse
1004c06706 Trim trailing whitespace in build instructions 2024-04-05 17:01:59 +02:00
Jack
d3ee91c1f5
Fix crash in silver-bun (#679) 2024-03-09 00:20:49 +01:00
Jack
85a2fb9c56
Address C4100 compiler warnings (unused var) (#648)
Adds and uses a macro to avoid the warning
2024-03-04 01:12:05 +01:00
Jack
4b0726d977
Update silver-bun to 72c74b4 (#664)
Bumps the vendored silver-bun library to the newest commit in upstream

Co-authored-by: F1F7Y <filip.bartos07@proton.me>
Co-authored-by: IcePixelx <41352111+IcePixelx@users.noreply.github.com>
2024-03-04 01:01:32 +01:00
Jack
e1eb2a6f4b
Don't allow too many arguments to be sent to the map command (#673)
`map` should only take a single arg that specifies the map to load.
2024-03-02 15:29:58 +01:00
Jack
026adbebe5
Check OpenExternalWebBrowser custom flag better (#674)
Properly check string prefix to see if we should open it in browser
2024-03-02 15:29:02 +01:00
cat_or_not
ec5dc504bf
Fix bad offsets of sq_getfunction (#672)
and remove duplicate assignment
2024-02-25 19:29:38 +01:00
Jan
30e58ac08b
Clean up wsock proxy code and move wsock build system logic (#671)
- moves `WSockProxy` to `wsockproxy/CmakeLists`
- remove exepath stuff from dllmain
  + its still done in loader.cpp because its used when reporting failure
- Disabled any Thread Library calls
  + we don't need to know about threads at all in the proxy
- yoink `wsock32.asm` into outer space
  + turns out, we can just call the function in a void shim since that wont touch the registers
- stop copying `wsock32.dll` to the game directory
  + this should improve the state of things when using the EA App
2024-02-18 22:11:09 +01:00
GeckoEidechse
fc63948e09
Update default mods list URL (#662)
The default branch for the VerifiedMods repo was renamed from `master` to `main`.
2024-02-06 23:03:10 +01:00
Jack
73262ca616
Port navmesh debug renderer from primedev (#626)
Adds support for rendering navmeshes in-game using debug overlay

Cherry-picked from primedev, originally written by F1F7Y

Co-authored-by: F1F7Y <filip.bartos07@proton.me>
Co-authored-by: Maya <11448698+RoyalBlue1@users.noreply.github.com>
2024-02-05 18:01:22 +01:00
uniboi
edf013952c
Plugin interfaces (plugins v4) (#615)
Replaces the current plugin api with source interfaces.

- backwards compatible
- no more json in binaries (wtf)
- does not rely on structs from third party libraries (wtf)
- actually initializes variables
- no more basically unused classes

The launcher exposes almost everything required by plugins in interfaces that allow for backwards compatibility.
The only thing that's passed to a plugin directly is the northstar dll HWND and a struct of data that's different for each plugin.
2024-02-04 02:14:46 +01:00
Jack
6ad955ae0a
ScopeGuard improvements (#651)
`std::function` introduced a layer of indirection that can be removed through templating the class.
2024-01-30 23:06:40 +01:00
Jack
350e6b1463
Remove unused variable in mod concommands (#652)
Remove unused variable that was also leaking memory
2024-01-27 14:16:11 +01:00
Jack
abe5d029e5
Pull zlib from custom fork (#650)
Fixes builds failing due to 2e3d86c4e1
2024-01-24 22:58:18 +01:00
Jack
7f84bdf8fd
Address C4267 compiler warnings (#647)
Implicit conversion from `size_t` to a smaller type
2024-01-21 20:34:19 +01:00
Jack
e72f0cbbac
Cherry-pick changes from more recent RapidJSON to reduce warnings (#646)
* fix C5054 (cherry-pick change from https://github.com/Tencent/rapidjson/pull/1817)

* fix C4099  in Rapidjson. Cherry-picks the following:
d87b698d0f
https://github.com/Tencent/rapidjson/pull/1568
2024-01-21 18:56:09 +01:00
Rémy Raes
bf7b5e0a81
Add slow-speed timeout when downloading mod (#611)
Abort request if network connection is dropped or too slow.
2024-01-21 00:56:33 +01:00