add force_centerview command to x11 targets

This commit is contained in:
Bill Currie 2001-01-18 22:16:43 +00:00
parent 5d15e27a3e
commit 45c62d5923
2 changed files with 14 additions and 8 deletions

View file

@ -29,9 +29,11 @@
$Id$ $Id$
*/ */
#define _BSD #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif
#define _BSD
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
@ -60,6 +62,7 @@
#include "client.h" #include "client.h"
#include "console.h" #include "console.h"
#include "context_x11.h" #include "context_x11.h"
#include "cmd.h"
#include "cvar.h" #include "cvar.h"
#include "dga_check.h" #include "dga_check.h"
#include "host.h" #include "host.h"
@ -481,6 +484,12 @@ IN_Shutdown (void)
x11_close_display (); x11_close_display ();
} }
void
Force_CenterView_f (void)
{
cl.viewangles[PITCH] = 0;
}
void void
IN_Init (void) IN_Init (void)
{ {
@ -527,7 +536,7 @@ IN_Init (void)
x11_add_event (ButtonRelease, &event_button); x11_add_event (ButtonRelease, &event_button);
x11_add_event (MotionNotify, &event_motion); x11_add_event (MotionNotify, &event_motion);
return; Cmd_AddCommand ("force_centerview", Force_CenterView_f, "No Description");
} }
void void

View file

@ -586,8 +586,7 @@ _COM_FOpenFile (char *filename, QFile **gzfile, char *foundname, int zip)
fn = filename; fn = filename;
#endif #endif
if (fn) { // found it! if (fn) { // found it!
if (developer->int_val) Con_DPrintf ("PackFile: %s : %s\n", pak->filename, fn);
Sys_Printf ("PackFile: %s : %s\n", pak->filename, fn);
// open a new file on the pakfile // open a new file on the pakfile
strncpy (foundname, fn, MAX_OSPATH); strncpy (foundname, fn, MAX_OSPATH);
*gzfile = *gzfile =
@ -615,8 +614,7 @@ _COM_FOpenFile (char *filename, QFile **gzfile, char *foundname, int zip)
continue; continue;
} }
if (developer->int_val) Con_DPrintf ("FindFile: %s\n", netpath);
Sys_Printf ("FindFile: %s\n", netpath);
*gzfile = COM_OpenRead (netpath, -1, -1, zip); *gzfile = COM_OpenRead (netpath, -1, -1, zip);
return com_filesize; return com_filesize;
@ -624,8 +622,7 @@ _COM_FOpenFile (char *filename, QFile **gzfile, char *foundname, int zip)
} }
if (developer->int_val) Con_DPrintf ("FindFile: can't find %s\n", filename);
Sys_Printf ("FindFile: can't find %s\n", filename);
*gzfile = NULL; *gzfile = NULL;
com_filesize = -1; com_filesize = -1;