Update to .NET 8; Check for housing void fog to avoid false positives

This commit is contained in:
Jade Macho 2024-04-05 22:17:44 +02:00
parent f78090c455
commit 51adb846e4
Signed by: 0x0ade
GPG Key ID: E1960710FE4FBEEF
3 changed files with 23 additions and 4 deletions

View File

@ -162,7 +162,26 @@ public sealed unsafe class Plugin : IDalamudPlugin
var exec = _envStateCopyHook.Original(dest, src);
if (dest->SkyId == 0 || Preview != null)
var replace = Preview != null;
if (!Service.ClientState.IsLoggedIn)
{
replace |= dest->SkyId == 0;
}
else
{
replace |=
dest->SkyId == 0 &&
dest->Fog.Color == new Vector4(0, 0, 0, 1.0f) &&
dest->Fog.Distance == 50.0f &&
dest->Fog.Thickness == 5.0f &&
dest->Fog._unk1 == 1000.0f &&
dest->Fog._unk2 == 1.0f &&
dest->Fog.Opacity == 0.0f &&
dest->Fog.SkyVisibility == 0.0f;
}
if (replace)
{
Replace(dest);
}

View File

@ -3,14 +3,14 @@
<PropertyGroup>
<Authors>0x0ade</Authors>
<Company></Company>
<Version>0.1.0.5</Version>
<Version>0.1.0.6</Version>
<Description></Description>
<Copyright></Copyright>
<PackageProjectUrl></PackageProjectUrl>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<Platforms>x64</Platforms>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>

View File

@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net7.0-windows7.0": {
"net8.0-windows7.0": {
"DalamudPackager": {
"type": "Direct",
"requested": "[2.1.12, )",