mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 03:19:23 +00:00
Mask for controller rays
This commit is contained in:
parent
6b0399f182
commit
b21d5497d9
1 changed files with 11 additions and 0 deletions
|
@ -94,6 +94,12 @@ namespace ml_prm
|
||||||
typeof(IKSystem).GetMethod("OnPreSolverUpdateActiveOffset", BindingFlags.Instance | BindingFlags.NonPublic),
|
typeof(IKSystem).GetMethod("OnPreSolverUpdateActiveOffset", BindingFlags.Instance | BindingFlags.NonPublic),
|
||||||
new HarmonyLib.HarmonyMethod(typeof(GameEvents).GetMethod(nameof(OnOffsetUpdate_Prefix), BindingFlags.Static | BindingFlags.NonPublic))
|
new HarmonyLib.HarmonyMethod(typeof(GameEvents).GetMethod(nameof(OnOffsetUpdate_Prefix), BindingFlags.Static | BindingFlags.NonPublic))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
p_instance.Patch(
|
||||||
|
typeof(ControllerRay).GetMethod("UpdateInteractionMask", BindingFlags.Instance | BindingFlags.NonPublic),
|
||||||
|
null,
|
||||||
|
new HarmonyLib.HarmonyMethod(typeof(GameEvents).GetMethod(nameof(OnControllerRayUpdateInteractionMask_Prefix), BindingFlags.Static | BindingFlags.NonPublic))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
|
@ -210,5 +216,10 @@ namespace ml_prm
|
||||||
}
|
}
|
||||||
return !ms_result.m_result;
|
return !ms_result.m_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void OnControllerRayUpdateInteractionMask_Prefix(ControllerRay __instance)
|
||||||
|
{
|
||||||
|
__instance.generalMask &= ~(1 << CVRLayers.PlayerClone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue