mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 18:39:23 +00:00
Propper game events
Ragdoll body parts grab
This commit is contained in:
parent
8bead6a764
commit
84c255660e
12 changed files with 279 additions and 20 deletions
|
@ -24,8 +24,8 @@ namespace ml_pin
|
|||
{
|
||||
m_soundManager = null;
|
||||
|
||||
CVRGameEventSystem.Player.OnJoin.RemoveListener(OnPlayerJoin);
|
||||
CVRGameEventSystem.Player.OnLeave.RemoveListener(OnPlayerLeave);
|
||||
CVRGameEventSystem.Player.OnJoinEntity.RemoveListener(OnPlayerJoin);
|
||||
CVRGameEventSystem.Player.OnLeaveEntity.RemoveListener(OnPlayerLeave);
|
||||
}
|
||||
|
||||
IEnumerator WaitForInstances()
|
||||
|
@ -36,17 +36,17 @@ namespace ml_pin
|
|||
m_soundManager = new SoundManager();
|
||||
m_soundManager.LoadSounds();
|
||||
|
||||
CVRGameEventSystem.Player.OnJoin.AddListener(OnPlayerJoin);
|
||||
CVRGameEventSystem.Player.OnLeave.AddListener(OnPlayerLeave);
|
||||
CVRGameEventSystem.Player.OnJoinEntity.AddListener(OnPlayerJoin);
|
||||
CVRGameEventSystem.Player.OnLeaveEntity.AddListener(OnPlayerLeave);
|
||||
}
|
||||
|
||||
void OnPlayerJoin(PlayerDescriptor p_player)
|
||||
void OnPlayerJoin(CVRPlayerEntity p_player)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(p_player != null) // This happens sometimes, no idea why
|
||||
if((p_player != null) && (p_player.PlayerDescriptor != null)) // This happens sometimes, no idea why
|
||||
{
|
||||
bool l_isFriend = Friends.FriendsWith(p_player.ownerId);
|
||||
bool l_isFriend = Friends.FriendsWith(p_player.PlayerDescriptor.ownerId);
|
||||
bool l_notify = false;
|
||||
|
||||
switch(Settings.NotifyType)
|
||||
|
@ -72,13 +72,13 @@ namespace ml_pin
|
|||
MelonLoader.MelonLogger.Warning(e);
|
||||
}
|
||||
}
|
||||
void OnPlayerLeave(PlayerDescriptor p_player)
|
||||
void OnPlayerLeave(CVRPlayerEntity p_player)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(p_player != null) // This happens sometimes, no idea why
|
||||
if((p_player != null) && (p_player.PlayerDescriptor != null)) // This happens sometimes, no idea why
|
||||
{
|
||||
bool l_isFriend = Friends.FriendsWith(p_player.ownerId);
|
||||
bool l_isFriend = Friends.FriendsWith(p_player.PlayerDescriptor.ownerId);
|
||||
bool l_notify = false;
|
||||
|
||||
switch(Settings.NotifyType)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[assembly: MelonLoader.MelonInfo(typeof(ml_pin.PlayersInstanceNotifier), "PlayersInstanceNotifier", "1.0.7", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
|
||||
[assembly: MelonLoader.MelonInfo(typeof(ml_pin.PlayersInstanceNotifier), "PlayersInstanceNotifier", "1.0.8", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
|
||||
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")]
|
||||
[assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||
[assembly: MelonLoader.MelonPlatformDomain(MelonLoader.MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<Authors>SDraw</Authors>
|
||||
<Company>None</Company>
|
||||
<Product>PlayersInstanceNotifier</Product>
|
||||
<Version>1.0.7</Version>
|
||||
<Version>1.0.8</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue