Missing brackets and other minor corrections
Made use of Core_fnc_changeProjectileDirection