Fix initializing return buffer.

Use "bufSize", not the "buf" itself.
Fix possible array overrun.
We should clamp the index value to the size of the weaponMountNode[], which is ShapeBase::MaxMountedImages (4) and SceneObject::NumMountPoints = 31.
Remove unneeded double-initialization of the vars.
Merge pull request #839 from eightyeight/bank-fixes

Some engine fixes