google-site-verification: googlebaca44933768a824.html OB engine zoom - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

OB engine zoom

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    OB engine zoom

    How do you get the engine to change the field of view? I've tried various things like hooking SetupMain3DView, Push3DView, and RenderView. None worked; the SetupMain3DView hook worked, but the game crashed while calling the original Setupmain3DView. Any ideas?

    #2
    Nevermind, I got the SetupMain3DView hook to work with some inline assembly. Since its a class member function intercept and the 'this' pointer is passed in ECX I had to preserve it and call the original function from inline assembly.

    Comment


      #3
      play around with r_aspectratio.
      I 0x90 you!

      Comment


        #4
        Originally posted by dirty
        How do you get the engine to change the field of view? I've tried various things like hooking SetupMain3DView, Push3DView, and RenderView. None worked; the SetupMain3DView hook worked, but the game crashed while calling the original Setupmain3DView. Any ideas?
        do what avit says,
        or just get baseplayer->mi_Fov
        & play with that in some frame based function.






        gibs coins @
        1KatP9B8KG7mvcoFhdLGua1isG88nYZE8C

        Comment


          #5
          I tried CBasePlayer::SetFOV first which didn't work, its supposed to be called on the server. What i did was in my SetupMain3DView intercept I check a global var 'zoom' and if I'm supposed to be zoomed in then i change view.fov to whatever I need, that worked beautifully.

          Now if I can just find out where dod source does its bullet spread. I'm pretty sure its not CShotManipulator::ApplySpread because i hooked it and it was never called, unless I did something wrong. I think they added their own mod specific function for bullet spread. I know when i fire a bullet random->RandomFloat(-5.0f, 5.0f); gets called 4 or 5 times in a row so that might help me locate the function.

          Comment


            #6
            OB bullet spread algorithm

            I found the FX_FireBullets function in the new DOD, here's the assembly, pastebin - collaborative debugging tool.

            It looks a lot different than the one in the SDK. Has anyone figured out the algorithm yet? those -0.5 and 0.5s are the arguments to RandomFloat, they are in a loop, they get called 4 times every time i checked with RandomFloat intercepted.

            Comment


              #7
              ok, actually it is the same spread algorithm, i got the no-spread working.

              Comment

              Working...
              X