View Full Version : Slight annoyance in InventoryManager
11-12-2009, 08:02 AM
I've noticed the inventorymanager class has been changed slightly, mostly for the better, but the PendingFire array has been marked private. This sort of makes sense as to how the inventorymanager code has been changed. However it has one obvious flaw that you can no longer access it once you subclass the InventoryManager. Is there a reason why you didn't just mark it as protected?
Of course the problem isn't that big, as you can just change it and recompile the package, but I'm just curious if there is a reason behind it.
11-12-2009, 08:07 AM
The provided functions appear to be satisfactory for interacting with the array:
simulated function INT GetPendingFireLength(Weapon InWeapon)
simulated function SetPendingFire(Weapon InWeapon, int InFiringMode)
simulated function ClearPendingFire(Weapon InWeapon, int InFiringMode)
simulated function bool IsPendingFire(Weapon InWeapon, INT InFiringMode)
simulated function ClearAllPendingFire(Weapon InWeapon)
And by appearances it looks like they might be planning to extend the system in the future, perhaps to support multiple weapons being used at the same time (dual wield any two arbitrary weapons?)
11-12-2009, 09:48 AM
It is indeed satisfactory, but the one specific functionality I am missing is to add or remove elements from the array, as the set and get functions are only able to set the values for existing elements, thus requiring you to hard code the number of elements.
11-12-2009, 04:18 PM
True, although weapons have traditionally only had 2 firing modes.
The alternate thing you can do is override those functions to use whatever new array or system you like in your InventoryManager subclass.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.