mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 11:29:23 +00:00
Detecting destroyed pickup
This commit is contained in:
parent
4b171bbbad
commit
c28b1dc826
3 changed files with 12 additions and 7 deletions
|
@ -61,10 +61,15 @@ namespace ml_pam
|
|||
|
||||
void Update()
|
||||
{
|
||||
if(m_enabled && (m_pickup != null))
|
||||
if(m_enabled && !ReferenceEquals(m_pickup, null))
|
||||
{
|
||||
Matrix4x4 l_result = m_pickup.transform.GetMatrix() * m_offset;
|
||||
m_target.position = l_result * ms_pointVector;
|
||||
if(m_pickup != null)
|
||||
{
|
||||
Matrix4x4 l_result = m_pickup.transform.GetMatrix() * m_offset;
|
||||
m_target.position = l_result * ms_pointVector;
|
||||
}
|
||||
else
|
||||
this.OnPickupDrop(m_pickup);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue