|
Post by adavidson617 on Aug 22, 2019 15:30:22 GMT
Hi Invector, I noticed that vItemManager was adding a new persistent listener to the On Instantiate Equipment event for the left and right equip points every time the player was selected in the hierarchy, but it was only adding it for the shooter manager. I found that this is because we are using a subclass that derives from vShooterManager.
In vItemManagerUtilities_Shooter, I have added a check for subtypes as well as the base class.
Here is the fix for the left equip point:
if ((equipPointL.onInstantiateEquiment.GetPersistentTarget(i).GetType().Equals(typeof(vShooterManager)) || equipPointL.onInstantiateEquiment.GetPersistentTarget(i).GetType().IsSubclassOf(typeof(vShooterManager))) && equipPointL.onInstantiateEquiment.GetPersistentMethodName(i).Equals("SetLeftWeapon")) { containsListener = true; break; } Here is the fix for the right equip point:
if ((equipPointR.onInstantiateEquiment.GetPersistentTarget(i).GetType().Equals(typeof(vShooterManager)) || equipPointR.onInstantiateEquiment.GetPersistentTarget(i).GetType().IsSubclassOf(typeof(vShooterManager))) && equipPointR.onInstantiateEquiment.GetPersistentMethodName(i).Equals("SetRightWeapon")) { containsListener = true; break; }
|
|