Manhack help



  • How exactly is the view controlled when using the Manhack? Having a strange issue on my server where when trying to use the Drone or Manhack instead of the camera going to them, it just goes inside of the players head. I have no idea how to fix this issue cause all I can see is the primary fire of the controller sets a Boolean that leads me nowhere



  • How exactly is the view controlled when using the Manhack? Having a strange issue on my server where when trying to use the Drone or Manhack instead of the camera going to them, it just goes inside of the players head. I have no idea how to fix this issue cause all I can see is the primary fire of the controller sets a Boolean that leads me nowhere



  • entities\entities\prop_manhack\cl_init.lua
    13: hook.Add(“CalcView”, self, self.CalcView)
    180: function ENT:CalcView(pl, origin, angles, fov, znear, zfar)

    You have an addon that’s improperly hijacking things.



  • @JetBoom:

    entities\entities\prop_manhack\cl_init.lua
    13: hook.Add(“CalcView”, self, self.CalcView)
    180: function ENT:CalcView(pl, origin, angles, fov, znear, zfar)

    You have an addon that’s improperly hijacking things.

    Hmm there are two addons I use that hook into CalcView and that’s GM+ and Simple Third Person, it’s most likely the later.

    Edit: Nope seems it was GM+ but I dunno how to fix this issue as having a return is required in CalcView, but perhapes I could do a check if ShouldDrawLocalPlayer is true then just ignore all the code since it’s designed to affect weapons



  • Having a return isn’t required for calcview. Only if you want to tell the engine to override the defaults.

    Remember that Vector and Angle are userdata, and are thus passed as references.

    You can then do:
    origin:Set(Vector(0, 1, 2))
    or
    origin.x = 0 origin.y = 1 origin.z = 2

    Then the hook won’t halt other hooks. You can manually check if they’re controlling a manhack or do some kind of flag in a hijacked GM:CalcView instead of a hook.



  • Interesting well the confusing part is GM+ makes some rather heavy changes to CalcView, and I tried adding a check but that didn’t work cause it also screws up the endround camera when the last human dies

    Mainly everything is packed into a table labeled gmp.DynaviewData, an example of said table

    	gmp.DynaviewData.origin =		origin
    		gmp.DynaviewData.angles =		angles
    		gmp.DynaviewData.fov =			fov
    		gmp.DynaviewData.znear =		znear
    		gmp.DynaviewData.zfar =			zfar
    		gmp.DynaviewData.vm_origin =	vm_origin
    		gmp.DynaviewData.vm_angles =	vm_angles
    		gmp.DynaviewData.drawviewer =	drawviewer
    

Log in to reply
 

11
Online

11072
Users

15300
Topics

297994
Posts

Looks like your connection to NoXiousNet was lost, please wait while we try to reconnect.