Re: ArmedObjects having NULL weapons in their weapon list [message #490203 is a reply to message #490202] |
Wed, 31 December 2014 07:54 |
Neijwiert
Messages: 124 Registered: October 2009
Karma:
|
Recruit |
|
|
Jerad Gray wrote on Wed, 31 December 2014 07:49 |
Neijwiert wrote on Wed, 31 December 2014 07:46 | Then why is it called Nod_Turret_MP?
MP = Multiplayer.
Also you could just do Commands->Select_Weapon(obj, NULL); whichs deselects your weapon even if you have one. So there must be some logic for that.
EDIT:
Also there's a function called Deselect in WeaponBagClass.
|
And those functions might just switch to the NULL weapon is all I'm saying.
Either that or your just seeing the end of the list IE:
Weapon1->next = Weapon2
Weapon2->next = NULL
|
Yeah it could be indeed for deselecting but It's not the end of the list. I'm using a for loop starting with index 0 and going until WeaponBagClass::Get_Count(). Then every iteration I use WeaponBagClass::Peek_Weapon(int index) which is simply return WeaponList[ index ];
|
|
|