I totally understand what you're trying to do and it's also something I really want in OA too. BTW this is totally a cgame thing, not engine, so I might move this.
It's a bit harder to implement since cgame handles the viewmodel very differently than Quake and all derivatives (Source engine included) afterward. I tried to implement a port of Engoo's figure 8 bobbing (unreal-esque) in cgame
in the leixperimental repository and failed. I did however, manage to 'port' the old Quake bobbing code which goes well with a centered gun

Darkplaces has weapon swaying/leaning like Source fyi (cl_leanmodel / cl_followmodel), though I see it more as a Quake2 feature. Generally the idea is to lowpass/highpass the old origin and angles instead of absolutely setting its value. Engoo partially implemented the Darkplaces code, but simplified and without low/highpasses (which I couldn't get to work). for either engine, check view.c
The problem: In Q3, viewmodel is always 0,0,0. In Q1, it's the vieworigin (coordinates being 22 units above the player's crotch in the map). IIRC