Well you maybe didnt notice at all that scope sway isnt counted in aim so any suggestions to players who had problems with it maybe didnt help at all
- this is cetainly etmain bug , maybe some mods fix it ( for example in TCE it is ok )
- maybe my way isnt best , you can also compensate this only in cgame by moving scope over screen ( using difference between viewangles and refdef angles )
So here we go…
in cg_view.c comment all CG_ZoomSway() stuff… ( not used anymore )
then put in bg_pmove.c after
if( deltaTime == pm->pmext->weapRecoilDuration ) {
pm->pmext->weapRecoilTime = 0;
pm->pmext->lastRecoilDeltaTime = 0;
} else {
pm->pmext->lastRecoilDeltaTime = deltaTime;
}
}
this
// New scope sway , moved here because it now need to be serverside ( we have low spread and relative accurate sniper rifles , so sway needs to change aim as well , not only shake screen)
if (BG_IsScopedWeapon(pm->ps->weapon) || (pm->ps->eFlags & EF_ZOOMING) ){
float spreadfrac;
float phase;
float x=0, y=0;
spreadfrac = (float)pm->ps->aimSpreadScale / 255.0 );
phase = pm->cmd.serverTime / 1000.0 * ZOOM_PITCH_FREQUENCY * M_PI ;
x += ZOOM_PITCH_AMPLITUDE * sin( phase ) * (spreadfrac+ZOOM_PITCH_MIN_AMPLITUDE);
phase = pm->cmd.serverTime / 1000.0 * ZOOM_YAW_FREQUENCY * M_PI ;
y += ZOOM_YAW_AMPLITUDE * sin( phase ) * (spreadfrac+ZOOM_YAW_AMPLITUDE);
if ( pm->ps->pm_flags & PMF_DUCKED ) {
x *= 0.66;
y *= 0.66;
}
pm->ps->viewangles[PITCH] +=x;
pm->ps->viewangles[YAW] +=y;
}
If you see bug or typo repair me , this is from FalckonET code and I remove things like stamina/health dependency and also merged EF_CROUCHING and EF_PRONE to PMF_DUCKED and set only one value , this is to match stock ET code , and at last removed level 3 cvops check for reducing sway…