[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - client viewangles at spawn

client viewangles at spawn

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

client viewangles at spawn

Postby qbism » Tue Jan 29, 2013 5:57 pm

I'm experiencing a weird bug in super8... the first time the client spawns in single-player, viewangles are wrong, possibly zeroed-out. But restarting the map (or any map) sets viewangles correctly. As the next step I'll track messages during and right after sign-on in case it's a protocol error.

What makes the very first sign-on different from later sign-ons?

Anyone ever come across this behavior?
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: client viewangles at spawn

Postby mh » Tue Jan 29, 2013 6:17 pm

I got that before but can't remember how I fixed it. Seem to recall it might be something to do with auto-centering of the mouse following a movement, and the window position/size not being updated correctly, but that's the best I can do. If you've been working on any of the globals stored all over the place recently (window_center_x and friends) some of this may sound familiar.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: client viewangles at spawn

Postby r00k » Tue Jan 29, 2013 7:46 pm

r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: client viewangles at spawn

Postby qbism » Wed Jan 30, 2013 4:23 am

Thanks, the idea of centering based on window and raw mouse input might be related. The screenshot is exactly what I'm getting. High and to the left. I don't have "m_raw" but "m_filtered" cvar and "newmouseparams" array which I changed to disable mouse acceleration (or at least request that).

Mouse-centering based on a bogus resolution may be occurring before the screen dims are calculated. I don't know but that's what I'll check.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: client viewangles at spawn

Postby qbism » Wed Jan 30, 2013 4:59 am

Getting warmer...

This is the view on 1st map load (1st single player client spawn):
Image

View if SetCursorPos is commented out in function IN_ActivateMouse:
Image

View after second map load/ spawn, the correct view (45 degree rotation):
Image
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: client viewangles at spawn

Postby mankrip » Wed Jan 30, 2013 7:41 am

There's a fix for that in Makaqu 1.6.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: client viewangles at spawn

Postby mh » Wed Jan 30, 2013 8:59 am

High and to the left seems to suggest I'm on the right track with my recollection. If your window rect was stored as {0, 0, w, h} that would happen in windowed modes; it would also happen if w and h had values that were too small (this would be valid for both windowed or fullscreen modes). I'm willing to bet that if you did a GetWindowRect each frame and updated these globals based on that, this problem would go away (GetWindowRect should be very fast so this shouldn't be a performance problem). Maybe set a breakpoint on that SetCursorPos call and see what values window_center_x and window_center_y have. Also check your ClipCursor call.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: client viewangles at spawn

Postby qbism » Thu Jan 31, 2013 1:57 am

Great, I've been looking forward to the new Makaqu! I'll also look at GetWindowRect, may solve certain other occasional view direction glitches.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: client viewangles at spawn

Postby qbism » Thu Jan 31, 2013 2:48 am

User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: client viewangles at spawn

Postby metlslime » Thu Jan 31, 2013 10:24 pm

this bug has annoyed me forever. Glad it's finally been tracked down!
metlslime
 
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests