mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-10 12:01:43 +00:00
minor error messages / whitespace tidy-up & small stuff.
This commit is contained in:
parent
ddd1caebf5
commit
f86f1595f3
21 changed files with 98 additions and 108 deletions
|
@ -164,7 +164,7 @@ void CL_EstablishConnection (const char *host)
|
|||
|
||||
cls.netcon = NET_Connect (host);
|
||||
if (!cls.netcon)
|
||||
Host_Error ("CL_Connect: connect failed\n");
|
||||
Host_Error ("CL_Connect: connect failed");
|
||||
Con_DPrintf ("CL_EstablishConnection: connected to %s\n", host);
|
||||
|
||||
cls.demonum = -1; // not in the demo loop now
|
||||
|
|
|
@ -808,7 +808,6 @@ void Cmd_ExecuteString (const char *text, cmd_source_t src)
|
|||
// check cvars
|
||||
if (!Cvar_Command ())
|
||||
Con_Printf ("Unknown command \"%s\"\n", Cmd_Argv(0));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -857,10 +856,10 @@ int Cmd_CheckParm (const char *parm)
|
|||
int i;
|
||||
|
||||
if (!parm)
|
||||
Sys_Error ("Cmd_CheckParm: NULL");
|
||||
Sys_Error ("Cmd_CheckParm: null input\n");
|
||||
|
||||
for (i = 1; i < Cmd_Argc (); i++)
|
||||
if (! q_strcasecmp (parm, Cmd_Argv (i)))
|
||||
if ( !q_strcasecmp (parm, Cmd_Argv (i)) )
|
||||
return i;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -969,7 +969,7 @@ void *SZ_GetSpace (sizebuf_t *buf, int length)
|
|||
Sys_Error ("SZ_GetSpace: %i is > full buffer size", length);
|
||||
|
||||
buf->overflowed = true;
|
||||
Con_Printf ("SZ_GetSpace: overflow");
|
||||
Con_Printf ("SZ_GetSpace: overflow\n");
|
||||
SZ_Clear (buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -1538,7 +1538,7 @@ void Mod_ProcessLeafs_S (dsleaf_t *in, int filelen)
|
|||
|
||||
//johnfitz
|
||||
if (count > 32767)
|
||||
Host_Error ("Mod_LoadLeafs: %i leafs exceeds limit of 32767.\n", count);
|
||||
Host_Error ("Mod_LoadLeafs: %i leafs exceeds limit of 32767.", count);
|
||||
//johnfitz
|
||||
|
||||
loadmodel->leafs = out;
|
||||
|
@ -2385,7 +2385,6 @@ void *Mod_LoadAliasGroup (void * pin, maliasframedesc_t *frame)
|
|||
frame->bboxmax.v[i] = pingroup->bboxmax.v[i];
|
||||
}
|
||||
|
||||
|
||||
pin_intervals = (daliasinterval_t *)(pingroup + 1);
|
||||
|
||||
frame->interval = LittleFloat (pin_intervals->interval);
|
||||
|
@ -2503,7 +2502,7 @@ void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype)
|
|||
skin = (byte *)(pskintype + 1);
|
||||
|
||||
if (numskins < 1 || numskins > MAX_SKINS)
|
||||
Sys_Error ("Mod_LoadAliasModel: Invalid # of skins: %d\n", numskins);
|
||||
Sys_Error ("Mod_LoadAliasModel: Invalid # of skins: %d", numskins);
|
||||
|
||||
size = pheader->skinwidth * pheader->skinheight;
|
||||
|
||||
|
@ -2777,7 +2776,7 @@ void Mod_LoadAliasModel (qmodel_t *mod, void *buffer)
|
|||
pheader->numframes = LittleLong (pinmodel->numframes);
|
||||
numframes = pheader->numframes;
|
||||
if (numframes < 1)
|
||||
Sys_Error ("Mod_LoadAliasModel: Invalid # of frames: %d\n", numframes);
|
||||
Sys_Error ("Mod_LoadAliasModel: Invalid # of frames: %d", numframes);
|
||||
|
||||
pheader->size = LittleFloat (pinmodel->size) * ALIAS_BASE_SIZE_RATIO;
|
||||
mod->synctype = (synctype_t) LittleLong (pinmodel->synctype);
|
||||
|
@ -2790,7 +2789,6 @@ void Mod_LoadAliasModel (qmodel_t *mod, void *buffer)
|
|||
pheader->eyeposition[i] = LittleFloat (pinmodel->eyeposition[i]);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// load the skins
|
||||
//
|
||||
|
@ -3017,7 +3015,7 @@ void Mod_LoadSpriteModel (qmodel_t *mod, void *buffer)
|
|||
// load the frames
|
||||
//
|
||||
if (numframes < 1)
|
||||
Sys_Error ("Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
|
||||
Sys_Error ("Mod_LoadSpriteModel: Invalid # of frames: %d", numframes);
|
||||
|
||||
mod->numframes = numframes;
|
||||
|
||||
|
|
|
@ -449,7 +449,7 @@ static qboolean GL_CheckShader (GLuint shader)
|
|||
|
||||
memset(infolog, 0, sizeof(infolog));
|
||||
GL_GetShaderInfoLogFunc (shader, sizeof(infolog), NULL, infolog);
|
||||
|
||||
|
||||
Con_Warning ("GLSL program failed to compile: %s", infolog);
|
||||
|
||||
return false;
|
||||
|
@ -536,12 +536,12 @@ GLuint GL_CreateProgram (const GLchar *vertSource, const GLchar *fragSource, int
|
|||
GL_DeleteShaderFunc (vertShader);
|
||||
GL_AttachShaderFunc (program, fragShader);
|
||||
GL_DeleteShaderFunc (fragShader);
|
||||
|
||||
|
||||
for (i = 0; i < numbindings; i++)
|
||||
{
|
||||
GL_BindAttribLocationFunc (program, bindings[i].attrib, bindings[i].name);
|
||||
}
|
||||
|
||||
|
||||
GL_LinkProgramFunc (program);
|
||||
|
||||
if (!GL_CheckProgram (program))
|
||||
|
|
|
@ -359,7 +359,7 @@ void TexMgr_FreeTexture (gltexture_t *kill)
|
|||
|
||||
if (in_reload_images)
|
||||
return;
|
||||
|
||||
|
||||
if (kill == NULL)
|
||||
{
|
||||
Con_Printf ("TexMgr_FreeTexture: NULL texture\n");
|
||||
|
@ -1412,7 +1412,7 @@ void TexMgr_ReloadImages (void)
|
|||
glGenTextures(1, &glt->texnum);
|
||||
TexMgr_ReloadImage (glt, -1, -1);
|
||||
}
|
||||
|
||||
|
||||
in_reload_images = false;
|
||||
}
|
||||
|
||||
|
@ -1451,7 +1451,7 @@ void GL_SelectTexture (GLenum target)
|
|||
{
|
||||
if (target == currenttarget)
|
||||
return;
|
||||
|
||||
|
||||
GL_SelectTextureFunc(target);
|
||||
currenttarget = target;
|
||||
}
|
||||
|
@ -1526,7 +1526,7 @@ static void GL_DeleteTexture (gltexture_t *texture)
|
|||
/*
|
||||
================
|
||||
GL_ClearBindings -- ericw
|
||||
|
||||
|
||||
Invalidates cached bindings, so the next GL_Bind calls for each TMU will
|
||||
make real glBindTexture calls.
|
||||
Call this after changing the binding outside of GL_Bind.
|
||||
|
|
|
@ -365,12 +365,12 @@ static int VID_GetCurrentRefreshRate (void)
|
|||
#if defined(USE_SDL2)
|
||||
SDL_DisplayMode mode;
|
||||
int current_display;
|
||||
|
||||
|
||||
current_display = SDL_GetWindowDisplayIndex(draw_context);
|
||||
|
||||
|
||||
if (0 != SDL_GetCurrentDisplayMode(current_display, &mode))
|
||||
return DEFAULT_REFRESHRATE;
|
||||
|
||||
|
||||
return mode.refresh_rate;
|
||||
#else
|
||||
// SDL1.2 doesn't support refresh rates
|
||||
|
@ -511,7 +511,7 @@ static SDL_DisplayMode *VID_SDL2_GetDisplayMode(int width, int height, int refre
|
|||
{
|
||||
if (SDL_GetDisplayMode(0, i, &mode) != 0)
|
||||
continue;
|
||||
|
||||
|
||||
if (mode.w == width && mode.h == height
|
||||
&& SDL_BITSPERPIXEL(mode.format) == bpp
|
||||
&& mode.refresh_rate == refreshrate)
|
||||
|
@ -617,7 +617,7 @@ static qboolean VID_SetMode (int width, int height, int refreshrate, int bpp, qb
|
|||
|
||||
if (vid_borderless.value)
|
||||
flags |= SDL_WINDOW_BORDERLESS;
|
||||
|
||||
|
||||
draw_context = SDL_CreateWindow (caption, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, flags);
|
||||
if (!draw_context) { // scale back fsaa
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 0);
|
||||
|
@ -688,7 +688,7 @@ static qboolean VID_SetMode (int width, int height, int refreshrate, int bpp, qb
|
|||
flags |= SDL_FULLSCREEN;
|
||||
if (vid_borderless.value)
|
||||
flags |= SDL_NOFRAME;
|
||||
|
||||
|
||||
gl_swap_control = true;
|
||||
if (SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, (vid_vsync.value) ? 1 : 0) == -1)
|
||||
gl_swap_control = false;
|
||||
|
@ -796,7 +796,7 @@ static void VID_Restart (void)
|
|||
width, height, bpp, refreshrate, fullscreen? "fullscreen" : "windowed");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// ericw -- OS X, SDL1: textures, VBO's invalid after mode change
|
||||
// OS X, SDL2: still valid after mode change
|
||||
// To handle both cases, delete all GL objects (textures, VBO, GLSL) now.
|
||||
|
@ -1346,7 +1346,7 @@ static void GL_Init (void)
|
|||
|
||||
GLAlias_CreateShaders ();
|
||||
GLWorld_CreateShaders ();
|
||||
GL_ClearBufferBindings ();
|
||||
GL_ClearBufferBindings ();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1605,7 +1605,7 @@ void VID_Init (void)
|
|||
Cvar_SetCallback (&vid_fsaa, VID_FSAA_f);
|
||||
Cvar_SetCallback (&vid_desktopfullscreen, VID_Changed_f);
|
||||
Cvar_SetCallback (&vid_borderless, VID_Changed_f);
|
||||
|
||||
|
||||
Cmd_AddCommand ("vid_unlock", VID_Unlock); //johnfitz
|
||||
Cmd_AddCommand ("vid_restart", VID_Restart); //johnfitz
|
||||
Cmd_AddCommand ("vid_test", VID_Test); //johnfitz
|
||||
|
@ -1687,7 +1687,7 @@ void VID_Init (void)
|
|||
p = COM_CheckParm("-refreshrate");
|
||||
if (p && p < com_argc-1)
|
||||
refreshrate = Q_atoi(com_argv[p+1]);
|
||||
|
||||
|
||||
p = COM_CheckParm("-bpp");
|
||||
if (p && p < com_argc-1)
|
||||
bpp = Q_atoi(com_argv[p+1]);
|
||||
|
@ -1976,46 +1976,46 @@ regenerates rate list based on current vid_width, vid_height and vid_bpp
|
|||
*/
|
||||
static void VID_Menu_RebuildRateList (void)
|
||||
{
|
||||
int i,j,r;
|
||||
|
||||
vid_menu_numrates=0;
|
||||
|
||||
for (i=0;i<nummodes;i++)
|
||||
int i, j, r;
|
||||
|
||||
vid_menu_numrates = 0;
|
||||
|
||||
for (i = 0; i < nummodes; i++)
|
||||
{
|
||||
//rate list is limited to rates available with current width/height/bpp
|
||||
if (modelist[i].width != vid_width.value ||
|
||||
modelist[i].height != vid_height.value ||
|
||||
modelist[i].bpp != vid_bpp.value)
|
||||
continue;
|
||||
|
||||
|
||||
r = modelist[i].refreshrate;
|
||||
|
||||
for (j=0;j<vid_menu_numrates;j++)
|
||||
|
||||
for (j = 0; j < vid_menu_numrates; j++)
|
||||
{
|
||||
if (vid_menu_rates[j] == r)
|
||||
break;
|
||||
}
|
||||
|
||||
if (j==vid_menu_numrates)
|
||||
|
||||
if (j == vid_menu_numrates)
|
||||
{
|
||||
vid_menu_rates[j] = r;
|
||||
vid_menu_numrates++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//if there are no valid fullscreen refreshrates for this width/height, just pick one
|
||||
if (vid_menu_numrates == 0)
|
||||
{
|
||||
Cvar_SetValue ("vid_refreshrate",(float)modelist[0].refreshrate);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//if vid_refreshrate is not in the new list, change vid_refreshrate
|
||||
for (i=0;i<vid_menu_numrates;i++)
|
||||
for (i = 0; i < vid_menu_numrates; i++)
|
||||
if (vid_menu_rates[i] == (int)(vid_refreshrate.value))
|
||||
break;
|
||||
|
||||
if (i==vid_menu_numrates)
|
||||
|
||||
if (i == vid_menu_numrates)
|
||||
Cvar_SetValue ("vid_refreshrate",(float)vid_menu_rates[0]);
|
||||
}
|
||||
|
||||
|
@ -2106,26 +2106,26 @@ chooses next refresh rate in order, then updates vid_refreshrate cvar
|
|||
static void VID_Menu_ChooseNextRate (int dir)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0;i<vid_menu_numrates;i++)
|
||||
|
||||
for (i = 0; i < vid_menu_numrates; i++)
|
||||
{
|
||||
if (vid_menu_rates[i] == vid_refreshrate.value)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i==vid_menu_numrates) //can't find it in list
|
||||
|
||||
if (i == vid_menu_numrates) //can't find it in list
|
||||
{
|
||||
i = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
i+=dir;
|
||||
if (i>=vid_menu_numrates)
|
||||
i += dir;
|
||||
if (i >= vid_menu_numrates)
|
||||
i = 0;
|
||||
else if (i<0)
|
||||
else if (i < 0)
|
||||
i = vid_menu_numrates-1;
|
||||
}
|
||||
|
||||
|
||||
Cvar_SetValue ("vid_refreshrate",(float)vid_menu_rates[i]);
|
||||
}
|
||||
|
||||
|
|
|
@ -213,10 +213,10 @@ byte *Image_LoadTGA (FILE *fin, int *width, int *height)
|
|||
targa_header.attributes = fgetc(fin);
|
||||
|
||||
if (targa_header.image_type!=2 && targa_header.image_type!=10)
|
||||
Sys_Error ("Image_LoadTGA: %s is not a type 2 or type 10 targa\n", loadfilename);
|
||||
Sys_Error ("Image_LoadTGA: %s is not a type 2 or type 10 targa", loadfilename);
|
||||
|
||||
if (targa_header.colormap_type !=0 || (targa_header.pixel_size!=32 && targa_header.pixel_size!=24))
|
||||
Sys_Error ("Image_LoadTGA: %s is not a 24bit or 32bit targa\n", loadfilename);
|
||||
Sys_Error ("Image_LoadTGA: %s is not a 24bit or 32bit targa", loadfilename);
|
||||
|
||||
columns = targa_header.width;
|
||||
rows = targa_header.height;
|
||||
|
|
|
@ -137,13 +137,13 @@ int Datagram_SendMessage (qsocket_t *sock, sizebuf_t *data)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (data->cursize == 0)
|
||||
Sys_Error("Datagram_SendMessage: zero length message\n");
|
||||
Sys_Error("Datagram_SendMessage: zero length message");
|
||||
|
||||
if (data->cursize > NET_MAXMESSAGE)
|
||||
Sys_Error("Datagram_SendMessage: message too big %u\n", data->cursize);
|
||||
Sys_Error("Datagram_SendMessage: message too big: %u", data->cursize);
|
||||
|
||||
if (sock->canSend == false)
|
||||
Sys_Error("SendMessage: called with canSend == false\n");
|
||||
Sys_Error("SendMessage: called with canSend == false");
|
||||
#endif
|
||||
|
||||
Q_memcpy(sock->sendMessage, data->data, data->cursize);
|
||||
|
@ -263,10 +263,10 @@ int Datagram_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (data->cursize == 0)
|
||||
Sys_Error("Datagram_SendUnreliableMessage: zero length message\n");
|
||||
Sys_Error("Datagram_SendUnreliableMessage: zero length message");
|
||||
|
||||
if (data->cursize > MAX_DATAGRAM)
|
||||
Sys_Error("Datagram_SendUnreliableMessage: message too big %u\n", data->cursize);
|
||||
Sys_Error("Datagram_SendUnreliableMessage: message too big: %u", data->cursize);
|
||||
#endif
|
||||
|
||||
packetLen = NET_HEADERSIZE + data->cursize;
|
||||
|
@ -604,6 +604,7 @@ static void Test_f (void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (n < hostCacheCount)
|
||||
goto JustDoIt;
|
||||
}
|
||||
|
@ -1049,9 +1050,8 @@ static qsocket_t *_Datagram_CheckNewConnections (void)
|
|||
|
||||
// allocate a QSocket
|
||||
sock = NET_NewQSocket ();
|
||||
if (sock == NULL)
|
||||
if (sock == NULL) // no room; try to let him know
|
||||
{
|
||||
// no room; try to let him know
|
||||
SZ_Clear(&net_message);
|
||||
// save space for the header, filled in later
|
||||
MSG_WriteLong(&net_message, 0);
|
||||
|
|
|
@ -53,8 +53,8 @@ sys_socket_t UDP_Init (void)
|
|||
if (gethostname(buff, MAXHOSTNAMELEN) != 0)
|
||||
{
|
||||
err = SOCKETERRNO;
|
||||
Con_SafePrintf("UDP_Init: gethostname failed (%s)\n",
|
||||
socketerror(err));
|
||||
Con_SafePrintf("UDP_Init: WARNING: gethostname failed (%s)\n",
|
||||
socketerror(err));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -72,8 +72,8 @@ sys_socket_t UDP_Init (void)
|
|||
#endif
|
||||
if (!(local = gethostbyname(buff)))
|
||||
{
|
||||
Con_SafePrintf("UDP_Init: gethostbyname failed (%s)\n",
|
||||
hstrerror(h_errno));
|
||||
Con_SafePrintf("UDP_Init: WARNING: gethostbyname failed (%s)\n",
|
||||
hstrerror(h_errno));
|
||||
}
|
||||
else if (local->h_addrtype != AF_INET)
|
||||
{
|
||||
|
@ -349,8 +349,8 @@ const char *UDP_AddrToString (struct qsockaddr *addr)
|
|||
|
||||
haddr = ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr);
|
||||
q_snprintf (buffer, sizeof(buffer), "%d.%d.%d.%d:%d", (haddr >> 24) & 0xff,
|
||||
(haddr >> 16) & 0xff, (haddr >> 8) & 0xff, haddr & 0xff,
|
||||
ntohs(((struct sockaddr_in *)addr)->sin_port));
|
||||
(haddr >> 16) & 0xff, (haddr >> 8) & 0xff, haddr & 0xff,
|
||||
ntohs(((struct sockaddr_in *)addr)->sin_port));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,8 +83,8 @@ static void WINS_GetLocalAddress (void)
|
|||
if (gethostname(buff, MAXHOSTNAMELEN) == SOCKET_ERROR)
|
||||
{
|
||||
err = SOCKETERRNO;
|
||||
Con_SafePrintf("WINS_GetLocalAddress: gethostname failed (%s)\n",
|
||||
socketerror(err));
|
||||
Con_SafePrintf("WINS_GetLocalAddress: WARNING: gethostname failed (%s)\n",
|
||||
socketerror(err));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -136,8 +136,8 @@ sys_socket_t WINS_Init (void)
|
|||
if (gethostname(buff, MAXHOSTNAMELEN) != 0)
|
||||
{
|
||||
err = SOCKETERRNO;
|
||||
Con_SafePrintf("WINS_Init: gethostname failed (%s)\n",
|
||||
socketerror(err));
|
||||
Con_SafePrintf("WINS_Init: WARNING: gethostname failed (%s)\n",
|
||||
socketerror(err));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -148,10 +148,10 @@ sys_socket_t WINS_Init (void)
|
|||
{
|
||||
if (i < com_argc-1)
|
||||
{
|
||||
myAddr = inet_addr(com_argv[i+1]);
|
||||
myAddr = inet_addr(com_argv[i + 1]);
|
||||
if (myAddr == INADDR_NONE)
|
||||
Sys_Error ("%s is not a valid IP address", com_argv[i+1]);
|
||||
strcpy(my_tcpip_address, com_argv[i+1]);
|
||||
Sys_Error ("%s is not a valid IP address", com_argv[i + 1]);
|
||||
strcpy(my_tcpip_address, com_argv[i + 1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -75,8 +75,8 @@ sys_socket_t WIPX_Init (void)
|
|||
if (gethostname(buff, MAXHOSTNAMELEN) != 0)
|
||||
{
|
||||
err = SOCKETERRNO;
|
||||
Con_SafePrintf("WIPX_Init: gethostname failed (%s)\n",
|
||||
socketerror(err));
|
||||
Con_SafePrintf("WIPX_Init: WARNING: gethostname failed (%s)\n",
|
||||
socketerror(err));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -91,7 +91,8 @@ static char *PF_VarString (int first)
|
|||
{
|
||||
if (!dev_overflows.varstring || dev_overflows.varstring + CONSOLE_RESPAM_TIME < realtime)
|
||||
{
|
||||
Con_DWarning("PF_VarString: %i characters exceeds standard limit of 255 (max = %d).\n", (int) s, (int)(sizeof(out) - 1));
|
||||
Con_DWarning("PF_VarString: %i characters exceeds standard limit of 255 (max = %d).\n",
|
||||
(int) s, (int)(sizeof(out) - 1));
|
||||
dev_overflows.varstring = realtime;
|
||||
}
|
||||
}
|
||||
|
@ -1689,7 +1690,7 @@ static void PF_changelevel (void)
|
|||
|
||||
/*
|
||||
==============
|
||||
for 2021 re-release:
|
||||
2021 re-release
|
||||
==============
|
||||
*/
|
||||
static void PF_finalefinished (void)
|
||||
|
|
|
@ -293,7 +293,7 @@ static int PR_EnterFunction (dfunction_t *f)
|
|||
// save off any locals that the new function steps on
|
||||
c = f->locals;
|
||||
if (localstack_used + c > LOCALSTACK_SIZE)
|
||||
PR_RunError("PR_ExecuteProgram: locals stack overflow\n");
|
||||
PR_RunError("PR_ExecuteProgram: locals stack overflow");
|
||||
|
||||
for (i = 0; i < c ; i++)
|
||||
localstack[localstack_used + i] = ((int *)pr_globals)[f->parm_start + i];
|
||||
|
|
|
@ -62,7 +62,7 @@ mspriteframe_t *R_GetSpriteFrame (entity_t *currentent)
|
|||
// are positive, so we don't have to worry about division by 0
|
||||
targettime = time - ((int)(time / fullinterval)) * fullinterval;
|
||||
|
||||
for (i=0 ; i<(numframes-1) ; i++)
|
||||
for (i = 0; i < (numframes-1); i++)
|
||||
{
|
||||
if (pintervals[i] > targettime)
|
||||
break;
|
||||
|
@ -87,8 +87,6 @@ void R_DrawSpriteModel (entity_t *e)
|
|||
float *s_up, *s_right;
|
||||
float angle, sr, cr;
|
||||
|
||||
//TODO: frustum cull it?
|
||||
|
||||
frame = R_GetSpriteFrame (e);
|
||||
psprite = (msprite_t *) currententity->model->cache.data;
|
||||
|
||||
|
|
|
@ -146,10 +146,8 @@ void S_Startup (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
Con_Printf("Audio: %d bit, %s, %d Hz\n",
|
||||
shm->samplebits,
|
||||
(shm->channels == 2) ? "stereo" : "mono",
|
||||
shm->speed);
|
||||
Con_Printf("Audio: %d bit, %s, %d Hz\n", shm->samplebits,
|
||||
(shm->channels == 2) ? "stereo" : "mono", shm->speed);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,13 +195,13 @@ void S_Init (void)
|
|||
i = COM_CheckParm("-sndspeed");
|
||||
if (i && i < com_argc-1)
|
||||
{
|
||||
Cvar_SetQuick (&sndspeed, com_argv[i+1]);
|
||||
Cvar_SetQuick (&sndspeed, com_argv[i + 1]);
|
||||
}
|
||||
|
||||
|
||||
i = COM_CheckParm("-mixspeed");
|
||||
if (i && i < com_argc-1)
|
||||
{
|
||||
Cvar_SetQuick (&snd_mixspeed, com_argv[i+1]);
|
||||
Cvar_SetQuick (&snd_mixspeed, com_argv[i + 1]);
|
||||
}
|
||||
|
||||
if (host_parms->memsize < 0x800000)
|
||||
|
@ -275,13 +273,13 @@ static sfx_t *S_FindName (const char *name)
|
|||
if (!name)
|
||||
Sys_Error ("S_FindName: NULL");
|
||||
|
||||
if (Q_strlen(name) >= MAX_QPATH)
|
||||
if (strlen(name) >= MAX_QPATH)
|
||||
Sys_Error ("Sound name too long: %s", name);
|
||||
|
||||
// see if already loaded
|
||||
for (i = 0; i < num_sfx; i++)
|
||||
{
|
||||
if (!Q_strcmp(known_sfx[i].name, name))
|
||||
if (!strcmp(known_sfx[i].name, name))
|
||||
{
|
||||
return &known_sfx[i];
|
||||
}
|
||||
|
@ -977,7 +975,7 @@ static void S_Play (void)
|
|||
while (i < Cmd_Argc())
|
||||
{
|
||||
q_strlcpy(name, Cmd_Argv(i), sizeof(name));
|
||||
if (!Q_strrchr(Cmd_Argv(i), '.'))
|
||||
if (!strrchr(Cmd_Argv(i), '.'))
|
||||
{
|
||||
q_strlcat(name, ".wav", sizeof(name));
|
||||
}
|
||||
|
@ -999,12 +997,12 @@ static void S_PlayVol (void)
|
|||
while (i < Cmd_Argc())
|
||||
{
|
||||
q_strlcpy(name, Cmd_Argv(i), sizeof(name));
|
||||
if (!Q_strrchr(Cmd_Argv(i), '.'))
|
||||
if (!strrchr(Cmd_Argv(i), '.'))
|
||||
{
|
||||
q_strlcat(name, ".wav", sizeof(name));
|
||||
}
|
||||
sfx = S_PrecacheSound(name);
|
||||
vol = Q_atof(Cmd_Argv(i + 1));
|
||||
vol = atof(Cmd_Argv(i + 1));
|
||||
S_StartSound(hash++, 0, sfx, listener_origin, vol, 1.0);
|
||||
i += 2;
|
||||
}
|
||||
|
|
|
@ -229,15 +229,13 @@ void SV_StartSound (edict_t *entity, int channel, const char *sample, int volume
|
|||
{
|
||||
if (sv.protocol == PROTOCOL_NETQUAKE)
|
||||
return; //don't send any info protocol can't support
|
||||
else
|
||||
field_mask |= SND_LARGEENTITY;
|
||||
field_mask |= SND_LARGEENTITY;
|
||||
}
|
||||
if (sound_num >= 256 || channel >= 8)
|
||||
{
|
||||
if (sv.protocol == PROTOCOL_NETQUAKE)
|
||||
return; //don't send any info protocol can't support
|
||||
else
|
||||
field_mask |= SND_LARGESOUND;
|
||||
field_mask |= SND_LARGESOUND;
|
||||
}
|
||||
//johnfitz
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
|||
if (relink)
|
||||
SV_LinkEdict (ent, true);
|
||||
ent->v.flags = (int)ent->v.flags & ~FL_ONGROUND;
|
||||
// Con_Printf ("fall down\n");
|
||||
// Con_Printf ("fall down\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
|||
|
||||
if ( (int)ent->v.flags & FL_PARTIALGROUND )
|
||||
{
|
||||
// Con_Printf ("back on ground\n");
|
||||
// Con_Printf ("back on ground\n");
|
||||
ent->v.flags = (int)ent->v.flags & ~FL_PARTIALGROUND;
|
||||
}
|
||||
ent->v.groundentity = EDICT_TO_PROG(trace.ent);
|
||||
|
@ -270,12 +270,10 @@ SV_FixCheckBottom
|
|||
void SV_FixCheckBottom (edict_t *ent)
|
||||
{
|
||||
// Con_Printf ("SV_FixCheckBottom\n");
|
||||
|
||||
ent->v.flags = (int)ent->v.flags | FL_PARTIALGROUND;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
SV_NewChaseDir
|
||||
|
|
|
@ -779,9 +779,9 @@ int SV_TryUnstick (edict_t *ent, vec3_t oldvel)
|
|||
clip = SV_FlyMove (ent, 0.1, &steptrace);
|
||||
|
||||
if ( fabs(oldorg[1] - ent->v.origin[1]) > 4
|
||||
|| fabs(oldorg[0] - ent->v.origin[0]) > 4 )
|
||||
|| fabs(oldorg[0] - ent->v.origin[0]) > 4 )
|
||||
{
|
||||
//Con_DPrintf ("unstuck!\n");
|
||||
// Con_DPrintf ("unstuck!\n");
|
||||
return clip;
|
||||
}
|
||||
|
||||
|
@ -1193,7 +1193,7 @@ void SV_Physics (void)
|
|||
if (sv_freezenonclients.value)
|
||||
entity_cap = svs.maxclients + 1; // Only run physics on clients and the world
|
||||
else
|
||||
entity_cap = sv.num_edicts;
|
||||
entity_cap = sv.num_edicts;
|
||||
|
||||
//for (i=0 ; i<sv.num_edicts ; i++, ent = NEXT_EDICT(ent))
|
||||
for (i=0 ; i<entity_cap ; i++, ent = NEXT_EDICT(ent))
|
||||
|
|
|
@ -576,7 +576,7 @@ nextmsg:
|
|||
break;
|
||||
|
||||
case clc_disconnect:
|
||||
// Sys_Printf ("SV_ReadClientMessage: client disconnected\n");
|
||||
// Sys_Printf ("SV_ReadClientMessage: client disconnected\n");
|
||||
return false;
|
||||
|
||||
case clc_move:
|
||||
|
|
|
@ -181,11 +181,11 @@ static void Z_CheckHeap (void)
|
|||
if (block->next == &mainzone->blocklist)
|
||||
break; // all blocks have been hit
|
||||
if ( (byte *)block + block->size != (byte *)block->next)
|
||||
Sys_Error ("Z_CheckHeap: block size does not touch the next block\n");
|
||||
Sys_Error ("Z_CheckHeap: block size does not touch the next block");
|
||||
if ( block->next->prev != block)
|
||||
Sys_Error ("Z_CheckHeap: next block doesn't have proper back link\n");
|
||||
Sys_Error ("Z_CheckHeap: next block doesn't have proper back link");
|
||||
if (!block->tag && !block->next->tag)
|
||||
Sys_Error ("Z_CheckHeap: two consecutive free blocks\n");
|
||||
Sys_Error ("Z_CheckHeap: two consecutive free blocks");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue