• Weird Bug: Ignoring Unreasonable Angles/Positions
    7 replies, posted
Both Myself and William are what we would like to think as half okay programmers and are producing our 2-3rd gamemode together. However a pretty weird bug is occurring and we can't seem to be able to work out where it is stemming from. [CODE] class C_BaseFlex[-1]:SetPos( 1.#QNAN0 1.#QNAN0 1.#QNAN0 ): Ignoring unreasonable position. class C_BaseFlex[-1]:SetAngles( 1.#QNAN0 1.#QNAN0 0.000000 ): Ignoring unreasonable angles. [/CODE] Repeatedly spams our console when the bug is occurring. When the bug occurs, which is often after death and then not resolved unless you disconnect or restart your client but sometimes occurs while alive, your gun disappears and appears floating dead centre in the map. It fires with you pressing trigger and you can still shoot people. As this is being posted we continue to scour our code for what is causing this. The weapon mod we are using is CW2 and our gamemode is based on Base, is it possible CW2 requires code created by Sandbox. Before this we used FA:S but got the same issue, somebody said this meant that it was not the weapon mods fault but I did point out both are by Spy so it is possible he reuses code ours conflicts with. I have tried commenting out our custom headbob code and other stuff that plays around with your viewing positions and we have checked our code for anything that changes your weapon position and this did not eliminate the issue. Has anybody experienced anything like this before and is there a better place to start with debugging? We are grateful for anything you may suggest.
A clientside model tried to fly out of the map bounds to crash your game.
[QUOTE=Robotboy655;49406696]A clientside model tried to fly out of the map bounds to crash your game.[/QUOTE] Mmm. It is what I somewhat assumed. Doesn't #QNANO mean a nil or nul number is happening somewhere in the C part of GMoD. With the only model being drawn the viewmodel I guess that must be the one. Is there anyway for me to trace when the value is changed or am I stuck with pouring over all the lines of code?
First of all, try removing all instances of ClientsideModel()s in your code and see if it gets rid of the error I suppose.
[QUOTE=Robotboy655;49406957]First of all, try removing all instances of ClientsideModel()s in your code and see if it gets rid of the error I suppose.[/QUOTE] I don't think I have any of those hanging around but I will check at some point as im not at my dev machine for a bit. Thank you for the suggestions.
I've had this happen on the player when setting view angles before. It might not be a ClientsideModel. I would guess its being caused by SWEP:CalcViewModelView being set to unreasonably high numbers.
[QUOTE=Mechanical Mind;49410823]I've had this happen on the player when setting view angles before. It might not be a ClientsideModel. I would guess its being caused by SWEP:CalcViewModelView being set to unreasonably high numbers.[/QUOTE] This seems aot more likely the issue. Thanks. I'll.hive it a check.
Unfortunately I still can't find the root of this. Is there no debugging solution I can use to trace where a value is being changed? I have tried printing the values being played around with in GM:CalcViewModelView() and they all seem reasonable, i.e the same before and after the glitch occurs.
Sorry, you need to Log In to post a reply to this thread.