Finally fixed it. I was doing this:

IInput* input = new CInput;

Whereas I should have been doing this:

static CInput g_Input;
IInput* input = (IInput*)&g_Input;

The project compiles fine without g_Input, so it's presumably accessed 
from an engine DLL. Quite why attaching a debugger makes that access 
fail in a way that doesn't generate an error is beyond me!

The screen was black because the game was starting up with a 
third-person camera (that's handled by IInput for some reason) which 
prevented some variables from initialising, and I found the solution 
above before working out what was happening to the mouse.

@Olly: IInput also handles usercmds. Our problems may not be 
coincidental. ;-)

Tom Edwards wrote:
> Finally making some headway on this. The client doesn't know the 
> camera's origin: in CViewRender::RenderView(), all three view.origin 
> values are NaN ("1.#QNAN00" to be precise). All of the view object's 
> other variables are present and correct though... :s
>
> Tom Edwards wrote:
>   
>> If launch my mod with a debugger attached, the world is not rendered. 
>> The server is working fine and I can hear myself walking about, but 
>> apart from UI elements the screen is completely black. The mouse is also 
>> permanently captured in the middle of the screen even after I disconnect 
>> and if the map doesn't load.
>>
>> Yet when I launch normally, there isn't a problem! I have no idea at all 
>> what's causing this to happen. Has anyone seen it before?
>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives, 
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>>   
>>     
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>   


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to