I'm working on modding a weapons pack for use in TTT. I've successfully done this before and have never run into this problem.
Weapon works 100% in Sandbox, but when I add TTT code and load into the game mode, the view model is never drawn.
There is a PreDraw hook that sets the blend of the model to 0 (transparent), so I know that's where that comes from, but all of the weapon's model fancy-ness is done in a PostDraw hook, which it seems is not being called, leaving the model transparent.
Deploy is functioning correctly and returning true.
I've looked through other weapons for a solution and can't find anything.
Anyone know if TTT handles view models differently and know of ways to further debug this? I'm out of ideas.
I don't know really. I recompiled a CSS world model, but the ViewModel didn't show up. It showed up on another one though.
Return PreDraw true?
[QUOTE=Humility;42354475]I don't know really. I recompiled a CSS world model, but the ViewModel didn't show up. It showed up on another one though.
Return PreDraw true?[/QUOTE]
The return wasn't there but I added it and nothing changed.
PostDraw still isn't being called.
Still not able to figure this out.
No one has any more ideas?
[QUOTE=wranders;42363616]Still not able to figure this out.
No one has any more ideas?[/QUOTE]
Make sure PreDraw and PostDraw are actually being called (add print statements.) If they aren't try hooking into the gamemode hooks client-side and then calling the functions from there.
[QUOTE=OzymandiasJ;42367553]Make sure PreDraw and PostDraw are actually being called (add print statements.) If they aren't try hooking into the gamemode hooks client-side and then calling the functions from there.[/QUOTE]
PreDraw is being called, because it's blending the model to transarent, then the chain stops there.
Printed statements were the first thing I tried in debugging.
I inserted the Msg "PREDRAW IS RUNNING", and that's all I get in the console. Just a stream of that.
I did the same for postdraw, only "POSTDRAW IS RUNNING". This never prints.
Sorry, you need to Log In to post a reply to this thread.