mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Trying to kill a few warnings.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3542 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
1e1084bed7
commit
0b1e3020d3
38 changed files with 141 additions and 159 deletions
|
@ -319,7 +319,6 @@ CLIENT_OBJS = $(CLIENT_ASM_OBJS) \
|
|||
p_null.o \
|
||||
p_classic.o \
|
||||
r_partset.o \
|
||||
r_efrag.o \
|
||||
renderer.o \
|
||||
renderque.o \
|
||||
sbar.o \
|
||||
|
|
|
@ -146,9 +146,9 @@ int Mod_GetBoneRelations(struct model_s *model, int firstbone, int lastbone, fra
|
|||
int Mod_GetBoneParent(struct model_s *model, int bonenum);
|
||||
char *Mod_GetBoneName(struct model_s *model, int bonenum);
|
||||
|
||||
void Draw_FunString(int x, int y, const unsigned char *str);
|
||||
void Draw_AltFunString(int x, int y, const unsigned char *str);
|
||||
void Draw_FunStringWidth(int x, int y, const unsigned char *str, int width);
|
||||
void Draw_FunString(int x, int y, const void *str);
|
||||
void Draw_AltFunString(int x, int y, const void *str);
|
||||
void Draw_FunStringWidth(int x, int y, const void *str, int width);
|
||||
|
||||
|
||||
#ifdef SERVERONLY
|
||||
|
|
|
@ -269,8 +269,6 @@ extern qboolean isDedicated;
|
|||
|
||||
|
||||
|
||||
void FTE_DEPRECATED R_RenderMeshBuffer(struct meshbuffer_s *mb, qboolean shadowpass);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -2303,7 +2303,7 @@ void Surf_DrawWorld (void)
|
|||
else
|
||||
#endif
|
||||
{
|
||||
extern cvar_t temp1;
|
||||
//extern cvar_t temp1;
|
||||
if (0)//temp1.value)
|
||||
vis = R_MarkLeafSurfaces_Q1();
|
||||
else
|
||||
|
|
|
@ -30,9 +30,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
extern int r_framecount;
|
||||
|
||||
struct msurface_s;
|
||||
struct batch_s;
|
||||
|
||||
typedef union {
|
||||
int num;
|
||||
unsigned int num;
|
||||
#ifdef D3DQUAKE
|
||||
void *ptr;
|
||||
#endif
|
||||
|
@ -294,7 +295,7 @@ enum uploadfmt
|
|||
#define R_AllocNewTexture(w,h) GL_AllocNewTexture()
|
||||
#define R_Upload GL_UploadFmt
|
||||
#define R_LoadTexture GL_LoadTextureFmt
|
||||
#define R_DestroyTexture(tno) 0
|
||||
#define R_DestroyTexture GL_DestroyTexture
|
||||
#endif
|
||||
|
||||
#define R_LoadTexture8(id,w,h,d,f,t) R_LoadTexture(id,w,h,t?TF_TRANS8:TF_SOLID8,d,f)
|
||||
|
@ -511,4 +512,4 @@ extern void (_stdcall *qglFinish) (void);
|
|||
#else
|
||||
#define RSpeedEnd(spt) rspeeds[spt] += r_speeds.value?Sys_DoubleTime()*1000000 - rsp:0
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -165,7 +165,7 @@ void Draw_ExpandedString(int x, int y, conchar_t *str)
|
|||
}
|
||||
|
||||
//Draws a marked-up string using the regular char set with no width limit. doesn't support new lines
|
||||
void Draw_FunString(int x, int y, const unsigned char *str)
|
||||
void Draw_FunString(int x, int y, const void *str)
|
||||
{
|
||||
conchar_t buffer[2048];
|
||||
COM_ParseFunString(CON_WHITEMASK, str, buffer, sizeof(buffer), false);
|
||||
|
@ -173,7 +173,7 @@ void Draw_FunString(int x, int y, const unsigned char *str)
|
|||
Draw_ExpandedString(x, y, buffer);
|
||||
}
|
||||
//Draws a marked up string using the alt char set (legacy mode would be |128)
|
||||
void Draw_AltFunString(int x, int y, const unsigned char *str)
|
||||
void Draw_AltFunString(int x, int y, const void *str)
|
||||
{
|
||||
conchar_t buffer[2048];
|
||||
COM_ParseFunString(CON_ALTMASK, str, buffer, sizeof(buffer), false);
|
||||
|
@ -182,7 +182,7 @@ void Draw_AltFunString(int x, int y, const unsigned char *str)
|
|||
}
|
||||
|
||||
//Draws a marked up string no wider than $width virtual pixels.
|
||||
void Draw_FunStringWidth(int x, int y, const unsigned char *str, int width)
|
||||
void Draw_FunStringWidth(int x, int y, const void *str, int width)
|
||||
{
|
||||
conchar_t buffer[2048];
|
||||
conchar_t *w = buffer;
|
||||
|
@ -203,7 +203,7 @@ void Draw_FunStringWidth(int x, int y, const unsigned char *str, int width)
|
|||
}
|
||||
|
||||
//Draws a marked up string with at most $numchars characters. obsolete
|
||||
FTE_DEPRECATED void Draw_FunStringLen(int x, int y, unsigned char *str, int numchars)
|
||||
FTE_DEPRECATED void Draw_FunStringLen(int x, int y, void *str, int numchars)
|
||||
{
|
||||
conchar_t buffer[2048];
|
||||
|
||||
|
|
|
@ -483,10 +483,10 @@ int main (int c, char **v)
|
|||
|
||||
memset(&parms, 0, sizeof(parms));
|
||||
|
||||
COM_InitArgv(c, v);
|
||||
parms.argc = c;
|
||||
parms.argv = v;
|
||||
COM_InitArgv(parms.argc, parms.argv);
|
||||
TL_InitLanguages();
|
||||
parms.argc = com_argc;
|
||||
parms.argv = com_argv;
|
||||
|
||||
parms.memsize = 16*1024*1024;
|
||||
|
||||
|
|
|
@ -2631,7 +2631,7 @@ void Cmd_set_f(void)
|
|||
end = strstr(text, "//");
|
||||
if (end)
|
||||
{
|
||||
*end--;
|
||||
end--;
|
||||
while (end >= text)
|
||||
{
|
||||
if (*end == ' ')
|
||||
|
|
|
@ -3018,7 +3018,7 @@ void COM_Version_f (void)
|
|||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
Con_Printf("Compiled with GCC version: %i.%i.%i (%i)\n",__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__, __VERSION__);
|
||||
Con_Printf("Compiled with GCC version: %i.%i.%i (%s)\n",__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__, __VERSION__);
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
#ifdef __OPTIMIZE_SIZE__
|
||||
|
|
|
@ -78,7 +78,7 @@ void InsertLinkAfter (link_t *l, link_t *after);
|
|||
// (type *)STRUCT_FROM_LINK(link_t *link, type, member)
|
||||
// ent = STRUCT_FROM_LINK(link,entity_t,order)
|
||||
// FIXME: remove this mess!
|
||||
#define STRUCT_FROM_LINK(l,t,m) ((t *)((qbyte *)l - (int)&(((t *)0)->m)))
|
||||
#define STRUCT_FROM_LINK(l,t,m) ((t *)((qbyte *)l - (qbyte*)&(((t *)0)->m)))
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
|
|
@ -135,7 +135,6 @@ int fs_hash_files;
|
|||
|
||||
|
||||
|
||||
static int COM_FileOpenRead (char *path, FILE **hndl);
|
||||
static const char *FS_GetCleanPath(const char *pattern, char *outbuf, int outlen);
|
||||
void FS_RegisterDefaultFileSystems(void);
|
||||
|
||||
|
@ -833,8 +832,8 @@ vfsfile_t *FS_DecompressGZip(vfsfile_t *infile, gzheader_t *header)
|
|||
|
||||
|
||||
{
|
||||
char inbuffer[16384];
|
||||
char outbuffer[16384];
|
||||
unsigned char inbuffer[16384];
|
||||
unsigned char outbuffer[16384];
|
||||
int ret;
|
||||
|
||||
z_stream strm = {
|
||||
|
@ -1749,7 +1748,7 @@ void COM_Gamedir (const char *dir)
|
|||
if (strchr(dir, ';'))
|
||||
{
|
||||
//separate case because parsestringset splits by whitespace too
|
||||
while (dir = COM_ParseStringSet(dir))
|
||||
while ((dir = COM_ParseStringSet(dir)))
|
||||
{
|
||||
if (!strcmp(dir, ";"))
|
||||
continue;
|
||||
|
@ -2558,6 +2557,10 @@ extern searchpathfuncs_t doomwadfilefuncs;
|
|||
void FS_RegisterDefaultFileSystems(void)
|
||||
{
|
||||
FS_RegisterFileSystemType("pak", &packfilefuncs);
|
||||
#ifndef _WIN32
|
||||
/*for systems that have case sensitive paths, also include *.PAK */
|
||||
FS_RegisterFileSystemType("PAK", &packfilefuncs);
|
||||
#endif
|
||||
#ifdef AVAIL_ZLIB
|
||||
FS_RegisterFileSystemType("pk3", &zipfilefuncs);
|
||||
FS_RegisterFileSystemType("pk4", &zipfilefuncs);
|
||||
|
|
|
@ -1599,7 +1599,7 @@ void PF_strdecolorize (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
{
|
||||
char *in = PR_GetStringOfs(prinst, OFS_PARM0);
|
||||
char result[8192];
|
||||
unsigned long flagged[8192];
|
||||
unsigned int flagged[8192];
|
||||
COM_ParseFunString(CON_WHITEMASK, in, flagged, sizeof(flagged), false);
|
||||
COM_DeFunString(flagged, result, sizeof(result), true);
|
||||
|
||||
|
@ -1741,8 +1741,8 @@ void PF_buf_copy (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
void PF_buf_sort (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
int bufno = G_FLOAT(OFS_PARM0)-1;
|
||||
int sortpower = G_FLOAT(OFS_PARM1);
|
||||
int backwards = G_FLOAT(OFS_PARM2);
|
||||
//int sortpower = G_FLOAT(OFS_PARM1);
|
||||
//int backwards = G_FLOAT(OFS_PARM2);
|
||||
|
||||
if ((unsigned int)bufno >= NUMSTRINGBUFS)
|
||||
return;
|
||||
|
@ -1755,7 +1755,7 @@ void PF_buf_sort (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
void PF_buf_implode (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
int bufno = G_FLOAT(OFS_PARM0)-1;
|
||||
char *glue = PR_GetStringOfs(prinst, OFS_PARM1);
|
||||
//char *glue = PR_GetStringOfs(prinst, OFS_PARM1);
|
||||
|
||||
if ((unsigned int)bufno >= NUMSTRINGBUFS)
|
||||
return;
|
||||
|
@ -1821,8 +1821,8 @@ void PF_bufstr_set (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
void PF_bufstr_add (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
int bufno = G_FLOAT(OFS_PARM0)-1;
|
||||
char *string = PR_GetStringOfs(prinst, OFS_PARM1);
|
||||
int order = G_FLOAT(OFS_PARM2);
|
||||
//char *string = PR_GetStringOfs(prinst, OFS_PARM1);
|
||||
//int order = G_FLOAT(OFS_PARM2);
|
||||
|
||||
if ((unsigned int)bufno >= NUMSTRINGBUFS)
|
||||
return;
|
||||
|
@ -1837,7 +1837,7 @@ void PF_bufstr_add (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
void PF_bufstr_free (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
int bufno = G_FLOAT(OFS_PARM0)-1;
|
||||
int index = G_FLOAT(OFS_PARM1);
|
||||
//int index = G_FLOAT(OFS_PARM1);
|
||||
|
||||
if ((unsigned int)bufno >= NUMSTRINGBUFS)
|
||||
return;
|
||||
|
@ -1850,8 +1850,8 @@ void PF_bufstr_free (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
void PF_buf_cvarlist (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
int bufno = G_FLOAT(OFS_PARM0)-1;
|
||||
char *pattern = PR_GetStringOfs(prinst, OFS_PARM1);
|
||||
char *antipattern = PR_GetStringOfs(prinst, OFS_PARM2);
|
||||
//char *pattern = PR_GetStringOfs(prinst, OFS_PARM1);
|
||||
//char *antipattern = PR_GetStringOfs(prinst, OFS_PARM2);
|
||||
|
||||
if ((unsigned int)bufno >= NUMSTRINGBUFS)
|
||||
return;
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
|
||||
#define MAX_BONES 256
|
||||
|
||||
static model_t *loadmodel;
|
||||
|
||||
#include "com_mesh.h"
|
||||
|
||||
//FIXME
|
||||
|
@ -881,10 +879,6 @@ static qboolean R_CalcModelLighting(entity_t *e, model_t *clmodel, unsigned int
|
|||
static shader_t reskinnedmodelshader;
|
||||
void R_DrawGAliasModel (entity_t *e, unsigned int rmode)
|
||||
{
|
||||
#ifndef GLQUAKE
|
||||
#pragma message("DISABLED MODEL RENDERING")
|
||||
#else
|
||||
extern cvar_t r_drawflat;
|
||||
model_t *clmodel;
|
||||
galiasinfo_t *inf;
|
||||
mesh_t mesh;
|
||||
|
@ -1157,7 +1151,6 @@ void R_DrawGAliasModel (entity_t *e, unsigned int rmode)
|
|||
qglDepthRange (gldepthmin, gldepthmax);
|
||||
|
||||
BE_SelectMode(rmode, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
//returns the rotated offset of the two points in result
|
||||
|
|
|
@ -857,19 +857,19 @@ static float *FTableForFunc ( unsigned int func )
|
|||
void Shader_LightPass_Std(char *shortname, shader_t *s, const void *args)
|
||||
{
|
||||
char shadertext[8192*2];
|
||||
sprintf(shadertext, LIGHTPASS_SHADER, args, LIGHTPASS_GLSL_SHARED LIGHTPASS_GLSL_VERTEX LIGHTPASS_GLSL_FRAGMENT);
|
||||
sprintf(shadertext, LIGHTPASS_SHADER, (char*)args, LIGHTPASS_GLSL_SHARED LIGHTPASS_GLSL_VERTEX LIGHTPASS_GLSL_FRAGMENT);
|
||||
Shader_DefaultScript(shortname, s, shadertext);
|
||||
}
|
||||
void Shader_LightPass_PCF(char *shortname, shader_t *s, const void *args)
|
||||
{
|
||||
char shadertext[8192*2];
|
||||
sprintf(shadertext, PCFPASS_SHADER, args, "", LIGHTPASS_GLSL_SHARED LIGHTPASS_GLSL_VERTEX LIGHTPASS_GLSL_FRAGMENT);
|
||||
sprintf(shadertext, PCFPASS_SHADER, (char*)args, "", LIGHTPASS_GLSL_SHARED LIGHTPASS_GLSL_VERTEX LIGHTPASS_GLSL_FRAGMENT);
|
||||
Shader_DefaultScript(shortname, s, shadertext);
|
||||
}
|
||||
void Shader_LightPass_Spot(char *shortname, shader_t *s, const void *args)
|
||||
{
|
||||
char shadertext[8192*2];
|
||||
sprintf(shadertext, PCFPASS_SHADER, args, "#define SPOT\n", LIGHTPASS_GLSL_SHARED LIGHTPASS_GLSL_VERTEX LIGHTPASS_GLSL_FRAGMENT);
|
||||
sprintf(shadertext, PCFPASS_SHADER, (char*)args, "#define SPOT\n", LIGHTPASS_GLSL_SHARED LIGHTPASS_GLSL_VERTEX LIGHTPASS_GLSL_FRAGMENT);
|
||||
Shader_DefaultScript(shortname, s, shadertext);
|
||||
}
|
||||
|
||||
|
@ -1145,7 +1145,7 @@ static void GenerateTCMods(const shaderpass_t *pass, int passnum)
|
|||
|
||||
//source is always packed
|
||||
//dest is packed too
|
||||
static void colourgen(const shaderpass_t *pass, int cnt, const avec4_t *src, avec4_t *dst, const mesh_t *mesh)
|
||||
static void colourgen(const shaderpass_t *pass, int cnt, const vec4_t *src, vec4_t *dst, const mesh_t *mesh)
|
||||
{
|
||||
switch (pass->rgbgen)
|
||||
{
|
||||
|
@ -1299,14 +1299,14 @@ static void deformgen(const deformv_t *deformv, int cnt, const vecV_t *src, vecV
|
|||
{
|
||||
default:
|
||||
case DEFORMV_NONE:
|
||||
if (src != dst)
|
||||
if (src != (const avec4_t*)dst)
|
||||
memcpy(dst, src, sizeof(*src)*cnt);
|
||||
break;
|
||||
|
||||
case DEFORMV_WAVE:
|
||||
if (!mesh->normals_array)
|
||||
{
|
||||
if (src != dst)
|
||||
if (src != (const avec4_t*)dst)
|
||||
memcpy(dst, src, sizeof(*src)*cnt);
|
||||
return;
|
||||
}
|
||||
|
@ -1328,7 +1328,7 @@ static void deformgen(const deformv_t *deformv, int cnt, const vecV_t *src, vecV
|
|||
case DEFORMV_NORMAL:
|
||||
//normal does not actually move the verts, but it does change the normals array
|
||||
//we don't currently support that.
|
||||
if (src != dst)
|
||||
if (src != (const avec4_t*)dst)
|
||||
memcpy(dst, src, sizeof(*src)*cnt);
|
||||
/*
|
||||
args[0] = deformv->args[1] * shaderstate.curtime;
|
||||
|
@ -2612,7 +2612,6 @@ static void BaseBrushTextures(entity_t *ent)
|
|||
#ifdef RTLIGHTS
|
||||
void BE_BaseEntShadowDepth(void)
|
||||
{
|
||||
extern model_t *currentmodel;
|
||||
int i;
|
||||
|
||||
if (!r_drawentities.value)
|
||||
|
@ -2643,7 +2642,6 @@ void BE_BaseEntShadowDepth(void)
|
|||
|
||||
void BE_BaseEntTextures(void)
|
||||
{
|
||||
extern model_t *currentmodel;
|
||||
int i;
|
||||
unsigned int bef;
|
||||
|
||||
|
|
|
@ -80,11 +80,9 @@ void GL_UploadFmt(texid_t tex, char *name, enum uploadfmt fmt, void *data, void
|
|||
GL_Upload8Pal32(data, palette, width, height, flags);
|
||||
break;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
default:
|
||||
Sys_Error("Unsupported image format type\n");
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,11 +112,9 @@ texid_t GL_LoadTextureFmt (char *name, int width, int height, enum uploadfmt fmt
|
|||
case TF_HEIGHT8:
|
||||
return GL_LoadTexture8Bump(name, width, height, data, flags, r_shadow_bumpscale_basetexture.value);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
default:
|
||||
Sys_Error("Unsupported image format type\n");
|
||||
break;
|
||||
#endif
|
||||
return r_nulltex;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ void R_InitBubble(void)
|
|||
avec4_t flashblend_colours[FLASHBLEND_VERTS+1];
|
||||
vecV_t flashblend_vcoords[FLASHBLEND_VERTS+1];
|
||||
vec2_t flashblend_tccoords[FLASHBLEND_VERTS+1];
|
||||
int flashblend_indexes[FLASHBLEND_VERTS*3];
|
||||
index_t flashblend_indexes[FLASHBLEND_VERTS*3];
|
||||
mesh_t flashblend_mesh;
|
||||
shader_t *flashblend_shader;
|
||||
void R_InitFlashblends(void)
|
||||
|
|
|
@ -908,10 +908,10 @@ static void R_SaveRTLights_f(void)
|
|||
,
|
||||
(light->flags & LFLAG_NOSHADOWS)?"!":"", light->origin[0], light->origin[1], light->origin[2],
|
||||
light->radius, light->color[0], light->color[1], light->color[2],
|
||||
light->style-1,
|
||||
"", 0,
|
||||
light->style-1
|
||||
/*, "", 0,
|
||||
0, 0, 0,
|
||||
0, 0, 0, light->flags&(LFLAG_NORMALMODE|LFLAG_REALTIMEMODE)
|
||||
0, 0, 0, light->flags&(LFLAG_NORMALMODE|LFLAG_REALTIMEMODE*/
|
||||
));
|
||||
}
|
||||
VFS_CLOSE(f);
|
||||
|
|
|
@ -31,9 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include "glsupp.h"
|
||||
|
||||
|
||||
|
||||
extern texid_t missing_texture;
|
||||
|
|
|
@ -844,7 +844,7 @@ void SHM_RecursiveWorldNodeQ3_r (dlight_t *dl, mnode_t *node)
|
|||
}
|
||||
#endif
|
||||
|
||||
static SHM_ComposeVolume_BruteForce(dlight_t *dl)
|
||||
static void SHM_ComposeVolume_BruteForce(dlight_t *dl)
|
||||
{
|
||||
shadowmeshsurfs_t *sms;
|
||||
unsigned int tno;
|
||||
|
|
|
@ -226,6 +226,11 @@ texid_t GL_AllocNewTexture(void)
|
|||
return r;
|
||||
}
|
||||
|
||||
void GL_DestroyTexture(texid_t tex)
|
||||
{
|
||||
qglDeleteTextures(1, &tex.num);
|
||||
}
|
||||
|
||||
void APIENTRY GL_DrawRangeElementsEmul(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
|
||||
{
|
||||
qglDrawElements(mode, count, type, indices);
|
||||
|
|
|
@ -778,22 +778,22 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette)
|
|||
|
||||
// set vid parameters
|
||||
if ((i = COM_CheckParm("-conwidth")) != 0)
|
||||
vid.conwidth = Q_atoi(com_argv[i+1]);
|
||||
vid.width = Q_atoi(com_argv[i+1]);
|
||||
else
|
||||
vid.conwidth = 640;
|
||||
vid.width = 640;
|
||||
|
||||
vid.conwidth &= ~7; // make it a multiple of eight
|
||||
vid.width &= ~7; // make it a multiple of eight
|
||||
|
||||
if (vid.conwidth < 320)
|
||||
vid.conwidth = 320;
|
||||
if (vid.width < 320)
|
||||
vid.width = 320;
|
||||
|
||||
// pick a conheight that matches with correct aspect
|
||||
vid.conheight = vid.conwidth*3 / 4;
|
||||
vid.height = vid.width*3 / 4;
|
||||
|
||||
if ((i = COM_CheckParm("-conheight")) != 0)
|
||||
vid.conheight = Q_atoi(com_argv[i+1]);
|
||||
if (vid.conheight < 200)
|
||||
vid.conheight = 200;
|
||||
vid.height = Q_atoi(com_argv[i+1]);
|
||||
if (vid.height < 200)
|
||||
vid.height = 200;
|
||||
if (!vid_dpy)
|
||||
vid_dpy = XOpenDisplay(NULL);
|
||||
if (!vid_dpy)
|
||||
|
@ -946,12 +946,10 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette)
|
|||
vid.pixelwidth = info->width;
|
||||
vid.pixelheight = info->height;
|
||||
|
||||
if (vid.conheight > info->height)
|
||||
vid.conheight = info->height;
|
||||
if (vid.conwidth > info->width)
|
||||
vid.conwidth = info->width;
|
||||
vid.width = vid.conwidth;
|
||||
vid.height = vid.conheight;
|
||||
if (vid.height > info->height)
|
||||
vid.height = info->height;
|
||||
if (vid.width > info->width)
|
||||
vid.width = info->width;
|
||||
|
||||
vid.aspect = ((float)vid.height / (float)vid.width) * (320.0 / 240.0);
|
||||
vid.numpages = 2;
|
||||
|
|
|
@ -85,7 +85,7 @@ void *Hash_GetKey(hashtable_t *table, int key)
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
void *Hash_GetNext(hashtable_t *table, char *name, void *old)
|
||||
void *Hash_GetNext(hashtable_t *table, const char *name, void *old)
|
||||
{
|
||||
int bucknum = Hash_Key(name, table->numbuckets);
|
||||
bucket_t *buck;
|
||||
|
@ -115,7 +115,7 @@ void *Hash_GetNext(hashtable_t *table, char *name, void *old)
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
void *Hash_GetNextInsensative(hashtable_t *table, char *name, void *old)
|
||||
void *Hash_GetNextInsensative(hashtable_t *table, const char *name, void *old)
|
||||
{
|
||||
int bucknum = Hash_KeyInsensative(name, table->numbuckets);
|
||||
bucket_t *buck;
|
||||
|
@ -147,7 +147,7 @@ void *Hash_GetNextInsensative(hashtable_t *table, char *name, void *old)
|
|||
}
|
||||
|
||||
|
||||
void *Hash_Add(hashtable_t *table, char *name, void *data, bucket_t *buck)
|
||||
void *Hash_Add(hashtable_t *table, const char *name, void *data, bucket_t *buck)
|
||||
{
|
||||
int bucknum = Hash_Key(name, table->numbuckets);
|
||||
|
||||
|
@ -158,7 +158,7 @@ void *Hash_Add(hashtable_t *table, char *name, void *data, bucket_t *buck)
|
|||
|
||||
return buck;
|
||||
}
|
||||
void *Hash_AddInsensative(hashtable_t *table, char *name, void *data, bucket_t *buck)
|
||||
void *Hash_AddInsensative(hashtable_t *table, const char *name, void *data, bucket_t *buck)
|
||||
{
|
||||
int bucknum = Hash_KeyInsensative(name, table->numbuckets);
|
||||
|
||||
|
@ -181,7 +181,7 @@ void *Hash_AddKey(hashtable_t *table, int key, void *data, bucket_t *buck)
|
|||
return buck;
|
||||
}
|
||||
|
||||
void Hash_Remove(hashtable_t *table, char *name)
|
||||
void Hash_Remove(hashtable_t *table, const char *name)
|
||||
{
|
||||
int bucknum = Hash_Key(name, table->numbuckets);
|
||||
bucket_t *buck;
|
||||
|
@ -208,7 +208,7 @@ void Hash_Remove(hashtable_t *table, char *name)
|
|||
return;
|
||||
}
|
||||
|
||||
void Hash_RemoveData(hashtable_t *table, char *name, void *data)
|
||||
void Hash_RemoveData(hashtable_t *table, const char *name, void *data)
|
||||
{
|
||||
int bucknum = Hash_Key(name, table->numbuckets);
|
||||
bucket_t *buck;
|
||||
|
|
|
@ -26,12 +26,12 @@ int Hash_Key(const char *name, int modulus);
|
|||
void *Hash_Get(hashtable_t *table, const char *name);
|
||||
void *Hash_GetInsensative(hashtable_t *table, const char *name);
|
||||
void *Hash_GetKey(hashtable_t *table, int key);
|
||||
void *Hash_GetNext(hashtable_t *table, char *name, void *old);
|
||||
void *Hash_GetNextInsensative(hashtable_t *table, char *name, void *old);
|
||||
void *Hash_Add(hashtable_t *table, char *name, void *data, bucket_t *buck);
|
||||
void *Hash_AddInsensative(hashtable_t *table, char *name, void *data, bucket_t *buck);
|
||||
void Hash_Remove(hashtable_t *table, char *name);
|
||||
void Hash_RemoveData(hashtable_t *table, char *name, void *data);
|
||||
void *Hash_GetNext(hashtable_t *table, const char *name, void *old);
|
||||
void *Hash_GetNextInsensative(hashtable_t *table, const char *name, void *old);
|
||||
void *Hash_Add(hashtable_t *table, const char *name, void *data, bucket_t *buck);
|
||||
void *Hash_AddInsensative(hashtable_t *table, const char *name, void *data, bucket_t *buck);
|
||||
void Hash_Remove(hashtable_t *table, const char *name);
|
||||
void Hash_RemoveData(hashtable_t *table, const char *name, void *data);
|
||||
void Hash_RemoveKey(hashtable_t *table, int key);
|
||||
void *Hash_AddKey(hashtable_t *table, int key, void *data, bucket_t *buck);
|
||||
|
||||
|
|
|
@ -507,7 +507,7 @@ typedef struct
|
|||
|
||||
int secondaryversion; //Constant - to say that any version 7 progs are actually ours, not someone else's alterations.
|
||||
} dprograms_t;
|
||||
#define standard_dprograms_t_size ((int)&((dprograms_t*)NULL)->ofsfiles)
|
||||
#define standard_dprograms_t_size ((size_t)&((dprograms_t*)NULL)->ofsfiles)
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -536,5 +536,5 @@ typedef struct typeinfo_s
|
|||
|
||||
int ofs; //inside a structure.
|
||||
int size;
|
||||
char *name;
|
||||
string_t name;
|
||||
} typeinfo_t;
|
||||
|
|
|
@ -2688,7 +2688,7 @@ retry:
|
|||
pr_types[i].num_parms = PRLittleLong(current_progstate->types[i].num_parms);
|
||||
pr_types[i].ofs = PRLittleLong(current_progstate->types[i].ofs);
|
||||
pr_types[i].size = PRLittleLong(current_progstate->types[i].size);
|
||||
pr_types[i].name = (char *)PRLittleLong((long)current_progstate->types[i].name);
|
||||
pr_types[i].name = PRLittleLong(current_progstate->types[i].name);
|
||||
#endif
|
||||
pr_types[i].name += stringadjust;
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ void QC_FlushProgsOffsets(progfuncs_t *progfuncs)
|
|||
//origionaloffs is used to track matching field offsets. fields with the same progs offset overlap
|
||||
|
||||
//note: we probably suffer from progs with renamed system globals.
|
||||
int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, int engineofs, int progsofs)
|
||||
int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, size_t engineofs, size_t progsofs)
|
||||
{
|
||||
// progstate_t *p;
|
||||
// int pnum;
|
||||
|
@ -296,7 +296,7 @@ int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, i
|
|||
}
|
||||
}*/
|
||||
if (engineofs&3)
|
||||
Sys_Error("field %s is %i&3", name, engineofs);
|
||||
Sys_Error("field %s is %i&3", name, (int)engineofs);
|
||||
field[fnum].ofs = ofs = engineofs/4;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -101,7 +101,7 @@ void QC_InitShares(progfuncs_t *progfuncs);
|
|||
void QC_StartShares(progfuncs_t *progfuncs);
|
||||
void QC_AddSharedVar(progfuncs_t *progfuncs, int num, int type);
|
||||
void QC_AddSharedFieldVar(progfuncs_t *progfuncs, int num, char *stringtable);
|
||||
int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, int requestedpos, int originalofs);
|
||||
int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, size_t requestedpos, size_t originalofs);
|
||||
pbool Decompile(progfuncs_t *progfuncs, char *fname);
|
||||
int PR_ToggleBreakpoint(progfuncs_t *progfuncs, char *filename, int linenum, int flag);
|
||||
void StripExtension (char *path);
|
||||
|
|
|
@ -132,7 +132,7 @@ struct progfuncs_s {
|
|||
|
||||
int lastcalledbuiltinnumber; //useful with non-implemented opcodes.
|
||||
|
||||
int (*RegisterFieldVar) (progfuncs_t *prinst, unsigned int type, char *name, int requestedpos, int originalofs);
|
||||
int (*RegisterFieldVar) (progfuncs_t *prinst, unsigned int type, char *name, size_t requestedpos, size_t originalofs);
|
||||
|
||||
char *tempstringbase; //for engine's use. Store your base tempstring pointer here.
|
||||
int tempstringnum; //for engine's use.
|
||||
|
|
|
@ -900,6 +900,6 @@ char *TypeName(QCC_type_t *type);
|
|||
void QCC_PR_IncludeChunk (char *data, pbool duplicate, char *filename);
|
||||
void QCC_PR_IncludeChunkEx(char *data, pbool duplicate, char *filename, CompilerConstant_t *cnst);
|
||||
pbool QCC_PR_UnInclude(void);
|
||||
extern void *(*pHash_Get)(hashtable_t *table, char *name);
|
||||
extern void *(*pHash_GetNext)(hashtable_t *table, char *name, void *old);
|
||||
extern void *(*pHash_Add)(hashtable_t *table, char *name, void *data, bucket_t *);
|
||||
extern void *(*pHash_Get)(hashtable_t *table, const char *name);
|
||||
extern void *(*pHash_GetNext)(hashtable_t *table, const char *name, void *old);
|
||||
extern void *(*pHash_Add)(hashtable_t *table, const char *name, void *data, bucket_t *);
|
||||
|
|
|
@ -125,9 +125,9 @@ int optres_logicops;
|
|||
int optres_test1;
|
||||
int optres_test2;
|
||||
|
||||
void *(*pHash_Get)(hashtable_t *table, char *name);
|
||||
void *(*pHash_GetNext)(hashtable_t *table, char *name, void *old);
|
||||
void *(*pHash_Add)(hashtable_t *table, char *name, void *data, bucket_t *);
|
||||
void *(*pHash_Get)(hashtable_t *table, const char *name);
|
||||
void *(*pHash_GetNext)(hashtable_t *table, const char *name, void *old);
|
||||
void *(*pHash_Add)(hashtable_t *table, const char *name, void *data, bucket_t *);
|
||||
|
||||
QCC_def_t *QCC_PR_DummyDef(QCC_type_t *type, char *name, QCC_def_t *scope, int arraysize, unsigned int ofs, int referable, pbool saved);
|
||||
QCC_type_t *QCC_PR_NewType (char *name, int basictype);
|
||||
|
@ -3016,7 +3016,6 @@ QCC_def_t *QCC_PR_ParseFunctionCall (QCC_def_t *func) //warning, the func could
|
|||
QCC_type_t *t, *p;
|
||||
int extraparms=false;
|
||||
int np;
|
||||
int laststatement = numstatements;
|
||||
|
||||
int callconvention;
|
||||
|
||||
|
|
|
@ -1123,7 +1123,7 @@ strofs = (strofs+3)&~3;
|
|||
qcc_typeinfo[i].aux_type = (QCC_type_t*)(qcc_typeinfo[i].aux_type - qcc_typeinfo);
|
||||
if (qcc_typeinfo[i].next)
|
||||
qcc_typeinfo[i].next = (QCC_type_t*)(qcc_typeinfo[i].next - qcc_typeinfo);
|
||||
qcc_typeinfo[i].name = (char *)QCC_CopyDupBackString(qcc_typeinfo[i].name);
|
||||
qcc_typeinfo[i].name = QCC_CopyDupBackString(qcc_typeinfo[i].name);
|
||||
}
|
||||
|
||||
progs.ofsfiles = 0;
|
||||
|
|
|
@ -8377,7 +8377,7 @@ void PF_setattachment(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
Con_DPrintf("setattachment(edict %i, edict %i, string \"%s\"): tried to find tag named \"%s\" on entity %i (model \"%s\") but could not find it\n", NUM_FOR_EDICT(prinst, e), NUM_FOR_EDICT(prinst, tagentity), tagname, tagname, NUM_FOR_EDICT(prinst, tagentity), sv.models[modelindex]->name);
|
||||
}
|
||||
else
|
||||
Con_DPrintf("setattachment(edict %i, edict %i, string \"%s\"): Couldn't load model %s\n", NUM_FOR_EDICT(prinst, e), NUM_FOR_EDICT(prinst, tagentity), tagname, sv.modelname[modelindex]);
|
||||
Con_DPrintf("setattachment(edict %i, edict %i, string \"%s\"): Couldn't load model %s\n", NUM_FOR_EDICT(prinst, e), NUM_FOR_EDICT(prinst, tagentity), tagname, sv.strings.model_precache[modelindex]);
|
||||
}
|
||||
else
|
||||
Con_DPrintf("setattachment(edict %i, edict %i, string \"%s\"): tried to find tag named \"%s\" on entity %i but it has no model\n", NUM_FOR_EDICT(prinst, e), NUM_FOR_EDICT(prinst, tagentity), tagname, tagname, NUM_FOR_EDICT(prinst, tagentity));
|
||||
|
@ -9796,11 +9796,11 @@ int pr_numbuiltins = sizeof(pr_builtin)/sizeof(pr_builtin[0]);
|
|||
|
||||
void PR_RegisterFields(void) //it's just easier to do it this way.
|
||||
{
|
||||
#define comfieldfloat(ssqcname,sharedname,csqcname) PR_RegisterFieldVar(svprogfuncs, ev_float, #ssqcname, (int)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldvector(ssqcname,sharedname,csqcname) PR_RegisterFieldVar(svprogfuncs, ev_vector, #ssqcname, (int)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldentity(ssqcname,sharedname,csqcname) PR_RegisterFieldVar(svprogfuncs, ev_entity, #ssqcname, (int)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldstring(ssqcname,sharedname,csqcname) PR_RegisterFieldVar(svprogfuncs, ev_string, #ssqcname, (int)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldfunction(ssqcname,sharedname,csqcname) PR_RegisterFieldVar(svprogfuncs, ev_function, #ssqcname, (int)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldfloat(ssqcname,sharedname,csqcname) PR_RegisterFieldVar(svprogfuncs, ev_float, #ssqcname, (size_t)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldvector(ssqcname,sharedname,csqcname) PR_RegisterFieldVar(svprogfuncs, ev_vector, #ssqcname, (size_t)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldentity(ssqcname,sharedname,csqcname) PR_RegisterFieldVar(svprogfuncs, ev_entity, #ssqcname, (size_t)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldstring(ssqcname,sharedname,csqcname) PR_RegisterFieldVar(svprogfuncs, ev_string, #ssqcname, (size_t)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldfunction(ssqcname,sharedname,csqcname) PR_RegisterFieldVar(svprogfuncs, ev_function, #ssqcname, (size_t)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
comqcfields
|
||||
#undef comfieldfloat
|
||||
#undef comfieldvector
|
||||
|
@ -9808,17 +9808,17 @@ comqcfields
|
|||
#undef comfieldstring
|
||||
#undef comfieldfunction
|
||||
#ifdef VM_Q1
|
||||
#define comfieldfloat(name) PR_RegisterFieldVar(svprogfuncs, ev_float, #name, sizeof(stdentvars_t) + (int)&((extentvars_t*)0)->name, -1)
|
||||
#define comfieldvector(name) PR_RegisterFieldVar(svprogfuncs, ev_vector, #name, sizeof(stdentvars_t) + (int)&((extentvars_t*)0)->name, -1)
|
||||
#define comfieldentity(name) PR_RegisterFieldVar(svprogfuncs, ev_entity, #name, sizeof(stdentvars_t) + (int)&((extentvars_t*)0)->name, -1)
|
||||
#define comfieldstring(name) PR_RegisterFieldVar(svprogfuncs, ev_string, #name, sizeof(stdentvars_t) + (int)&((extentvars_t*)0)->name, -1)
|
||||
#define comfieldfunction(name) PR_RegisterFieldVar(svprogfuncs, ev_function, #name, sizeof(stdentvars_t) + (int)&((extentvars_t*)0)->name, -1)
|
||||
#define comfieldfloat(name) PR_RegisterFieldVar(svprogfuncs, ev_float, #name, sizeof(stdentvars_t) + (size_t)&((extentvars_t*)0)->name, -1)
|
||||
#define comfieldvector(name) PR_RegisterFieldVar(svprogfuncs, ev_vector, #name, sizeof(stdentvars_t) + (size_t)&((extentvars_t*)0)->name, -1)
|
||||
#define comfieldentity(name) PR_RegisterFieldVar(svprogfuncs, ev_entity, #name, sizeof(stdentvars_t) + (size_t)&((extentvars_t*)0)->name, -1)
|
||||
#define comfieldstring(name) PR_RegisterFieldVar(svprogfuncs, ev_string, #name, sizeof(stdentvars_t) + (size_t)&((extentvars_t*)0)->name, -1)
|
||||
#define comfieldfunction(name) PR_RegisterFieldVar(svprogfuncs, ev_function, #name, sizeof(stdentvars_t) + (size_t)&((extentvars_t*)0)->name, -1)
|
||||
#else
|
||||
#define comfieldfloat(ssqcname) PR_RegisterFieldVar(svprogfuncs, ev_float, #ssqcname, (int)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldvector(ssqcname) PR_RegisterFieldVar(svprogfuncs, ev_vector, #ssqcname, (int)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldentity(ssqcname) PR_RegisterFieldVar(svprogfuncs, ev_entity, #ssqcname, (int)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldstring(ssqcname) PR_RegisterFieldVar(svprogfuncs, ev_string, #ssqcname, (int)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldfunction(ssqcname) PR_RegisterFieldVar(svprogfuncs, ev_function, #ssqcname, (int)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldfloat(ssqcname) PR_RegisterFieldVar(svprogfuncs, ev_float, #ssqcname, (size_t)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldvector(ssqcname) PR_RegisterFieldVar(svprogfuncs, ev_vector, #ssqcname, (size_t)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldentity(ssqcname) PR_RegisterFieldVar(svprogfuncs, ev_entity, #ssqcname, (size_t)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldstring(ssqcname) PR_RegisterFieldVar(svprogfuncs, ev_string, #ssqcname, (size_t)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#define comfieldfunction(ssqcname) PR_RegisterFieldVar(svprogfuncs, ev_function, #ssqcname, (size_t)&((stdentvars_t*)0)->ssqcname, -1)
|
||||
#endif
|
||||
|
||||
comextqcfields
|
||||
|
|
|
@ -991,16 +991,14 @@ qboolean SVQ3_Command(void);
|
|||
//
|
||||
// sv_phys.c
|
||||
//
|
||||
void SV_ProgStartFrame (void);
|
||||
void SV_SetMoveVars(void);
|
||||
void SV_RunNewmis (void);
|
||||
qboolean SV_Physics (void);
|
||||
void SV_CheckVelocity (edict_t *ent);
|
||||
void SV_AddGravity (edict_t *ent, float scale);
|
||||
trace_t SV_Trace_Toss (edict_t *ent, edict_t *ignore);
|
||||
void SV_ProgStartFrame (void);
|
||||
void SV_RunEntity (edict_t *ent);
|
||||
qboolean SV_RunThink (edict_t *ent);
|
||||
void SV_Physics_Toss (edict_t *ent);
|
||||
void SV_RunNewmis (void);
|
||||
void SV_Impact (edict_t *e1, edict_t *e2);
|
||||
void SV_SetMoveVars(void);
|
||||
|
||||
//
|
||||
// sv_send.c
|
||||
//
|
||||
|
|
|
@ -808,7 +808,6 @@ void SV_BanIP_f (void)
|
|||
netadr_t banadr;
|
||||
netadr_t banmask;
|
||||
char *reason = NULL;
|
||||
int reasonsize = 0;
|
||||
|
||||
if (Cmd_Argc() < 2)
|
||||
{
|
||||
|
|
|
@ -331,10 +331,8 @@ void SV_SendChat(void)
|
|||
text++;
|
||||
s2++;
|
||||
}
|
||||
*s2='\n';
|
||||
*s2++;
|
||||
*s2='\n';
|
||||
*s2++;
|
||||
*s2++='\n';
|
||||
*s2++='\n';
|
||||
*s2='\0';
|
||||
for (i = 0; i < host_client->chat.options; i++)
|
||||
{
|
||||
|
|
|
@ -1705,7 +1705,7 @@ void SV_WritePlayersToClient (client_t *client, client_frame_t *frame, edict_t *
|
|||
continue;
|
||||
|
||||
// ignore if not touching a PV leaf
|
||||
if (!sv.world.worldmodel->funcs.EdictInFatPVS(sv.world.worldmodel, (wedict_t*)ent, pvs))
|
||||
if (!sv.world.worldmodel->funcs.EdictInFatPVS(sv.world.worldmodel, &((wedict_t*)ent)->pvsinfo, pvs))
|
||||
continue;
|
||||
|
||||
if (!((int)clent->xv->dimension_see & ((int)ent->xv->dimension_seen | (int)ent->xv->dimension_ghost)))
|
||||
|
|
|
@ -70,14 +70,14 @@ extern cvar_t sv_nomsec;
|
|||
|
||||
#define MOVE_EPSILON 0.01
|
||||
|
||||
void SV_Physics_Toss (edict_t *ent);
|
||||
static void SV_Physics_Toss (edict_t *ent);
|
||||
|
||||
/*
|
||||
================
|
||||
SV_CheckAllEnts
|
||||
================
|
||||
*/
|
||||
void SV_CheckAllEnts (void)
|
||||
static void SV_CheckAllEnts (void)
|
||||
{
|
||||
int e;
|
||||
edict_t *check;
|
||||
|
@ -210,7 +210,7 @@ SV_Impact
|
|||
Two entities have touched, so run their touch functions
|
||||
==================
|
||||
*/
|
||||
void SV_Impact (edict_t *e1, edict_t *e2)
|
||||
static void SV_Impact (edict_t *e1, edict_t *e2)
|
||||
{
|
||||
int old_self, old_other;
|
||||
|
||||
|
@ -256,7 +256,7 @@ Slide off of the impacting object
|
|||
*/
|
||||
#define STOP_EPSILON 0.1
|
||||
//courtesy of darkplaces, it's just more efficient.
|
||||
void ClipVelocity (vec3_t in, vec3_t normal, vec3_t out, float overbounce)
|
||||
static void ClipVelocity (vec3_t in, vec3_t normal, vec3_t out, float overbounce)
|
||||
{
|
||||
int i;
|
||||
float backoff;
|
||||
|
@ -284,7 +284,7 @@ If steptrace is not NULL, the trace of any vertical wall hit will be stored
|
|||
============
|
||||
*/
|
||||
#define MAX_CLIP_PLANES 5
|
||||
int SV_FlyMove (edict_t *ent, float time, trace_t *steptrace)
|
||||
static int SV_FlyMove (edict_t *ent, float time, trace_t *steptrace)
|
||||
{
|
||||
int bumpcount, numbumps;
|
||||
vec3_t dir;
|
||||
|
@ -452,7 +452,7 @@ SV_AddGravity
|
|||
|
||||
============
|
||||
*/
|
||||
void SV_AddGravity (edict_t *ent, float scale)
|
||||
static void SV_AddGravity (edict_t *ent, float scale)
|
||||
{
|
||||
if (!scale && progstype != PROG_QW)
|
||||
scale = 1;
|
||||
|
@ -474,7 +474,7 @@ SV_PushEntity
|
|||
Does not change the entities velocity at all
|
||||
============
|
||||
*/
|
||||
trace_t SV_PushEntity (edict_t *ent, vec3_t push, unsigned int traceflags)
|
||||
static trace_t SV_PushEntity (edict_t *ent, vec3_t push, unsigned int traceflags)
|
||||
{
|
||||
trace_t trace;
|
||||
vec3_t end;
|
||||
|
@ -514,7 +514,7 @@ typedef struct
|
|||
vec3_t angles;
|
||||
// float deltayaw;
|
||||
} pushed_t;
|
||||
pushed_t pushed[MAX_EDICTS], *pushed_p;
|
||||
static pushed_t pushed[MAX_EDICTS], *pushed_p;
|
||||
|
||||
/*
|
||||
============
|
||||
|
@ -524,7 +524,7 @@ Objects need to be moved back on a failed push,
|
|||
otherwise riders would continue to slide.
|
||||
============
|
||||
*/
|
||||
qboolean SV_PushAngles (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||
static qboolean SV_PushAngles (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||
{
|
||||
int i, e;
|
||||
edict_t *check, *block;
|
||||
|
@ -704,7 +704,7 @@ SV_Push
|
|||
|
||||
============
|
||||
*/
|
||||
qboolean SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||
static qboolean SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||
{
|
||||
int i, e;
|
||||
edict_t *check, *block;
|
||||
|
@ -848,7 +848,7 @@ SV_PushMove
|
|||
|
||||
============
|
||||
*/
|
||||
void SV_PushMove (edict_t *pusher, float movetime)
|
||||
static void SV_PushMove (edict_t *pusher, float movetime)
|
||||
{
|
||||
int i;
|
||||
vec3_t move;
|
||||
|
@ -878,7 +878,7 @@ SV_Physics_Pusher
|
|||
|
||||
================
|
||||
*/
|
||||
void SV_Physics_Pusher (edict_t *ent)
|
||||
static void SV_Physics_Pusher (edict_t *ent)
|
||||
{
|
||||
float thinktime;
|
||||
float oldltime;
|
||||
|
@ -943,7 +943,7 @@ SV_Physics_Follow
|
|||
Entities that are "stuck" to another entity
|
||||
=============
|
||||
*/
|
||||
void SV_Physics_Follow (edict_t *ent)
|
||||
static void SV_Physics_Follow (edict_t *ent)
|
||||
{
|
||||
vec3_t vf, vr, vu, angles, v;
|
||||
edict_t *e;
|
||||
|
@ -987,7 +987,7 @@ SV_Physics_Noclip
|
|||
A moving object that doesn't obey physics
|
||||
=============
|
||||
*/
|
||||
void SV_Physics_Noclip (edict_t *ent)
|
||||
static void SV_Physics_Noclip (edict_t *ent)
|
||||
{
|
||||
// regular thinking
|
||||
if (!SV_RunThink (ent))
|
||||
|
@ -1013,7 +1013,7 @@ SV_CheckWaterTransition
|
|||
|
||||
=============
|
||||
*/
|
||||
void SV_CheckWaterTransition (edict_t *ent)
|
||||
static void SV_CheckWaterTransition (edict_t *ent)
|
||||
{
|
||||
int cont;
|
||||
|
||||
|
@ -1063,7 +1063,7 @@ SV_Physics_Toss
|
|||
Toss, bounce, and fly movement. When onground, do nothing.
|
||||
=============
|
||||
*/
|
||||
void SV_Physics_Toss (edict_t *ent)
|
||||
static void SV_Physics_Toss (edict_t *ent)
|
||||
{
|
||||
trace_t trace;
|
||||
vec3_t move;
|
||||
|
@ -1168,7 +1168,7 @@ will fall if the floor is pulled out from under them.
|
|||
FIXME: is this true?
|
||||
=============
|
||||
*/
|
||||
void SV_Physics_Step (edict_t *ent)
|
||||
static void SV_Physics_Step (edict_t *ent)
|
||||
{
|
||||
qboolean hitsound;
|
||||
|
||||
|
@ -1240,7 +1240,7 @@ This is a big hack to try and fix the rare case of getting stuck in the world
|
|||
clipping hull.
|
||||
=============
|
||||
*/
|
||||
void SV_CheckStuck (edict_t *ent)
|
||||
static void SV_CheckStuck (edict_t *ent)
|
||||
{
|
||||
int i, j;
|
||||
int z;
|
||||
|
@ -1285,7 +1285,7 @@ void SV_CheckStuck (edict_t *ent)
|
|||
SV_CheckWater
|
||||
=============
|
||||
*/
|
||||
qboolean SV_CheckWater (edict_t *ent)
|
||||
static qboolean SV_CheckWater (edict_t *ent)
|
||||
{
|
||||
vec3_t point;
|
||||
int cont;
|
||||
|
@ -1330,7 +1330,7 @@ SV_WallFriction
|
|||
|
||||
============
|
||||
*/
|
||||
void SV_WallFriction (edict_t *ent, trace_t *trace)
|
||||
static void SV_WallFriction (edict_t *ent, trace_t *trace)
|
||||
{
|
||||
vec3_t forward, right, up;
|
||||
float d, i;
|
||||
|
@ -1364,7 +1364,7 @@ Try fixing by pushing one pixel in each direction.
|
|||
This is a hack, but in the interest of good gameplay...
|
||||
======================
|
||||
*/
|
||||
int SV_TryUnstick (edict_t *ent, vec3_t oldvel)
|
||||
static int SV_TryUnstick (edict_t *ent, vec3_t oldvel)
|
||||
{
|
||||
int i;
|
||||
vec3_t oldorg;
|
||||
|
@ -1422,7 +1422,7 @@ Only used by players
|
|||
*/
|
||||
#if 0
|
||||
#define SMSTEPSIZE 4
|
||||
void SV_WalkMove (edict_t *ent)
|
||||
static void SV_WalkMove (edict_t *ent)
|
||||
{
|
||||
vec3_t upmove, downmove;
|
||||
vec3_t oldorg, oldvel;
|
||||
|
@ -1581,7 +1581,7 @@ void SV_WalkMove (edict_t *ent)
|
|||
|
||||
// 1/32 epsilon to keep floating point happy
|
||||
#define DIST_EPSILON (0.03125)
|
||||
int SV_SetOnGround (edict_t *ent)
|
||||
static int SV_SetOnGround (edict_t *ent)
|
||||
{
|
||||
vec3_t end;
|
||||
trace_t trace;
|
||||
|
@ -1599,7 +1599,7 @@ int SV_SetOnGround (edict_t *ent)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
void SV_WalkMove (edict_t *ent)
|
||||
static void SV_WalkMove (edict_t *ent)
|
||||
{
|
||||
int clip, oldonground, originalmove_clip, originalmove_flags, originalmove_groundentity;
|
||||
vec3_t upmove, downmove, start_origin, start_velocity, originalmove_origin, originalmove_velocity;
|
||||
|
@ -1732,7 +1732,7 @@ void SV_WalkMove (edict_t *ent)
|
|||
}
|
||||
#endif
|
||||
|
||||
void SV_MoveChain(edict_t *ent, edict_t *movechain, float *initial_origin, float *initial_angle)
|
||||
static void SV_MoveChain(edict_t *ent, edict_t *movechain, float *initial_origin, float *initial_angle)
|
||||
{
|
||||
qboolean callfunc;
|
||||
if ((callfunc=DotProduct(ent->v->origin, initial_origin)) || DotProduct(ent->v->angles, initial_angle))
|
||||
|
|
|
@ -189,7 +189,7 @@ qboolean SV_CheckRealIP(client_t *client, qboolean force)
|
|||
}
|
||||
|
||||
ClientReliableWrite_Begin(client, svc_stufftext, 256);
|
||||
ClientReliableWrite_String(client, va("packet %s \"realip %i %i\"\n", serverip, client-svs.clients, client->realip_num));
|
||||
ClientReliableWrite_String(client, va("packet %s \"realip %i %i\"\n", serverip, (int)(client-svs.clients), client->realip_num));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue