Talk:Pyoff: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Jwaffe (talk | contribs)
Created page with "y axis? Isn't it a Z offset? game.c/G_DrawRooms: // cl setting if (ud.viewbob) { // addz = p->opyoff + (p->opyoff - p->opyoff..."
 
Jwaffe (talk | contribs)
No edit summary
 
Line 8: Line 8:
             // addz = p->opyoff + (p->opyoff - p->opyoff)*smoothratio)
             // addz = p->opyoff + (p->opyoff - p->opyoff)*smoothratio)
                 int32_t addz = (p->opyoff + mulscale16(p->pyoff - p->opyoff, smoothratio));
                 int32_t addz = (p->opyoff + mulscale16(p->pyoff - p->opyoff, smoothratio));
                 if (p->over_shoulder_on) // reduce view bobbing if we're over the shoulder because we're farther away and it will look terrible
                 if (p->over_shoulder_on) // reduce view bobbing if we're over the shoulder because we're farther away  
                     addz >>= 3;
                     addz >>= 3;
                 CAMERA(pos.z) += addz;
                 CAMERA(pos.z) += addz;

Latest revision as of 22:09, 2 December 2014

y axis? Isn't it a Z offset?

game.c/G_DrawRooms:

           // cl setting
           if (ud.viewbob)
           {
           // addz = p->opyoff + (p->opyoff - p->opyoff)*smoothratio)
               int32_t addz = (p->opyoff + mulscale16(p->pyoff - p->opyoff, smoothratio));
               if (p->over_shoulder_on) // reduce view bobbing if we're over the shoulder because we're farther away 
                   addz >>= 3;
               CAMERA(pos.z) += addz;
           }

-75