]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/viewloc.qc
Optimize the redundancy check and ignore color codes (they're stripped anyway)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / viewloc.qc
index e4e5ba991bec4fafa3dfc4bfbe278d69f4e2214c..e1be43af0d41f9826993c9b9a7e1dceb247b9e16 100644 (file)
@@ -48,7 +48,7 @@ void viewloc_PlayerPhysics(entity this)
                        if(PHYS_CS(this).movement_x > 0) // right
                                this.angles_y = forward.y;
                }
-
+       #if 0
                //if(!PHYS_INPUT_BUTTON_CROUCH(this) && !IS_DUCKED(this))
                if(!(this.viewloc.spawnflags & VIEWLOC_FREEMOVE))
                {
@@ -65,6 +65,7 @@ void viewloc_PlayerPhysics(entity this)
                        //else { input_buttons &= ~16; this.flags &= ~FL_DUCKED; }
 #endif
                }
+       #endif
        }
 }
 
@@ -199,4 +200,10 @@ void viewloc_SetViewLocation()
        }
 }
 
+STATIC_INIT_LATE(viewloc_cursor)
+{
+       // fix the mouse position on init so it isn't in the corner
+       viewloc_mousepos = '0.5 0 0' * autocvar_vid_conwidth + '0 0.5 0' * autocvar_vid_conheight;
+}
+
 #endif