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

View file

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