Clearly machine guns.
The generals in WWI had communications and STILL sent massed troops into the face of machine guns. There's no reason to believe they wouldn't have done the same thing in the Civil War. Read Pickett's Charge - massed troops into the face of devastating cannon fire.
The slowest learners in the world are generals.
