Quote from doomwiki.org :
"Hell knights and barons of Hell throw the same projectiles. Contrary to popular belief, this has nothing to do with the fact that Hell knights and barons do not infight with one another in the PC version of the game. Rather, there is a hard-coded exception for these two enemies which causes them to consider each other as belonging to the same species. This exception was overlooked when the Doom II source code was combined with the Atari Jaguar code base to create the Sony PlayStation port of Doom II, and as a result, barons and knights infight in both that game and its offspring, Doom 64. "