I don’t really feel that putting pointer protection and checking if we can fire in the same if
statement is a good idea. Not being able to find the barrel is a far more serious game breaking issue than simply waiting for the projectile to reload, which will happen often in normal gameplay. If we modify the Fire()
method at a later date to subsequently execute further code, then if for whatever reason a Barrel cannot be found, there is no return
from the function to escape Fire()
, potentially causing a crash.
Just thought I’d throw it out there!