Adding some magazines to try in FPS game

Ziad7
Sun, 23 Dec 2018 16:39:48 +0000
C++

Hello Everyone !

I’m working on a FPS game

and I have the following classes:

Weapon, Magazine and the Character Classes.

In Weapon class I’ve a pointer to the current used Magazine.

In the Character class I’ve an TArray of pointers to the Magazines which the character has…

so the question is how can I generate some magazines to try the ammo consume especially that garbage collector might cause pointer to some non-existing object…

Thanks in advance

1 post - 1 participant