mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 18:39:23 +00:00
Offset in VR fix
Fix of illogical bug of null player descriptor
This commit is contained in:
parent
84b0de7065
commit
171f129039
2 changed files with 41 additions and 35 deletions
|
@ -41,25 +41,28 @@ namespace ml_pin
|
|||
{
|
||||
try
|
||||
{
|
||||
bool l_isFriend = Friends.FriendsWith(p_player.ownerId);
|
||||
bool l_notify = false;
|
||||
|
||||
switch(Settings.NotifyType)
|
||||
if(p_player != null) // This happens sometimes, no idea why
|
||||
{
|
||||
case Settings.NotificationType.None:
|
||||
l_notify = false;
|
||||
break;
|
||||
case Settings.NotificationType.Friends:
|
||||
l_notify = (l_isFriend && ShouldNotifyInCurrentInstance());
|
||||
break;
|
||||
case Settings.NotificationType.All:
|
||||
l_notify = ShouldNotifyInCurrentInstance();
|
||||
break;
|
||||
}
|
||||
l_notify |= (l_isFriend && Settings.FriendsAlways);
|
||||
bool l_isFriend = Friends.FriendsWith(p_player.ownerId);
|
||||
bool l_notify = false;
|
||||
|
||||
if(l_notify)
|
||||
m_soundManager?.PlaySound(l_isFriend ? SoundManager.SoundType.FriendJoin : SoundManager.SoundType.PlayerJoin);
|
||||
switch(Settings.NotifyType)
|
||||
{
|
||||
case Settings.NotificationType.None:
|
||||
l_notify = false;
|
||||
break;
|
||||
case Settings.NotificationType.Friends:
|
||||
l_notify = (l_isFriend && ShouldNotifyInCurrentInstance());
|
||||
break;
|
||||
case Settings.NotificationType.All:
|
||||
l_notify = ShouldNotifyInCurrentInstance();
|
||||
break;
|
||||
}
|
||||
l_notify |= (l_isFriend && Settings.FriendsAlways);
|
||||
|
||||
if(l_notify)
|
||||
m_soundManager?.PlaySound(l_isFriend ? SoundManager.SoundType.FriendJoin : SoundManager.SoundType.PlayerJoin);
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
@ -70,25 +73,28 @@ namespace ml_pin
|
|||
{
|
||||
try
|
||||
{
|
||||
bool l_isFriend = Friends.FriendsWith(p_player.ownerId);
|
||||
bool l_notify = false;
|
||||
|
||||
switch(Settings.NotifyType)
|
||||
if(p_player != null) // This happens sometimes, no idea why
|
||||
{
|
||||
case Settings.NotificationType.None:
|
||||
l_notify = false;
|
||||
break;
|
||||
case Settings.NotificationType.Friends:
|
||||
l_notify = (l_isFriend && ShouldNotifyInCurrentInstance());
|
||||
break;
|
||||
case Settings.NotificationType.All:
|
||||
l_notify = ShouldNotifyInCurrentInstance();
|
||||
break;
|
||||
}
|
||||
l_notify |= (l_isFriend && Settings.FriendsAlways);
|
||||
bool l_isFriend = Friends.FriendsWith(p_player.ownerId);
|
||||
bool l_notify = false;
|
||||
|
||||
if(l_notify)
|
||||
m_soundManager?.PlaySound(l_isFriend ? SoundManager.SoundType.FriendLeave : SoundManager.SoundType.PlayerLeave);
|
||||
switch(Settings.NotifyType)
|
||||
{
|
||||
case Settings.NotificationType.None:
|
||||
l_notify = false;
|
||||
break;
|
||||
case Settings.NotificationType.Friends:
|
||||
l_notify = (l_isFriend && ShouldNotifyInCurrentInstance());
|
||||
break;
|
||||
case Settings.NotificationType.All:
|
||||
l_notify = ShouldNotifyInCurrentInstance();
|
||||
break;
|
||||
}
|
||||
l_notify |= (l_isFriend && Settings.FriendsAlways);
|
||||
|
||||
if(l_notify)
|
||||
m_soundManager?.PlaySound(l_isFriend ? SoundManager.SoundType.FriendLeave : SoundManager.SoundType.PlayerLeave);
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue