mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-13 07:21:31 +00:00
-Wshadow fixes:
sv_user.c (SV_WaterMove): use the global wishspeed. (SV_ReadClientMessage): rename cmd to ccmd. view.c (forward, right, up): make them local to V_CalcRoll() and not global. net.h (playername, playercolor): remove externs for the non-existant globals. r_sprite.c (R_GetSpriteFrame): rename the function's argument to currentent. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@182 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
5658a9e28d
commit
3d537f9ec2
4 changed files with 10 additions and 12 deletions
|
@ -213,8 +213,6 @@ extern int net_hostport;
|
||||||
|
|
||||||
extern int net_driverlevel;
|
extern int net_driverlevel;
|
||||||
extern cvar_t hostname;
|
extern cvar_t hostname;
|
||||||
extern char playername[];
|
|
||||||
extern int playercolor;
|
|
||||||
|
|
||||||
extern int messagesSent;
|
extern int messagesSent;
|
||||||
extern int messagesReceived;
|
extern int messagesReceived;
|
||||||
|
|
|
@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
R_GetSpriteFrame
|
R_GetSpriteFrame
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
mspriteframe_t *R_GetSpriteFrame (entity_t *currententity)
|
mspriteframe_t *R_GetSpriteFrame (entity_t *currentent)
|
||||||
{
|
{
|
||||||
msprite_t *psprite;
|
msprite_t *psprite;
|
||||||
mspritegroup_t *pspritegroup;
|
mspritegroup_t *pspritegroup;
|
||||||
|
@ -35,8 +35,8 @@ mspriteframe_t *R_GetSpriteFrame (entity_t *currententity)
|
||||||
int i, numframes, frame;
|
int i, numframes, frame;
|
||||||
float *pintervals, fullinterval, targettime, time;
|
float *pintervals, fullinterval, targettime, time;
|
||||||
|
|
||||||
psprite = (msprite_t *) currententity->model->cache.data;
|
psprite = (msprite_t *) currentent->model->cache.data;
|
||||||
frame = currententity->frame;
|
frame = currentent->frame;
|
||||||
|
|
||||||
if ((frame >= psprite->numframes) || (frame < 0))
|
if ((frame >= psprite->numframes) || (frame < 0))
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ mspriteframe_t *R_GetSpriteFrame (entity_t *currententity)
|
||||||
numframes = pspritegroup->numframes;
|
numframes = pspritegroup->numframes;
|
||||||
fullinterval = pintervals[numframes-1];
|
fullinterval = pintervals[numframes-1];
|
||||||
|
|
||||||
time = cl.time + currententity->syncbase;
|
time = cl.time + currentent->syncbase;
|
||||||
|
|
||||||
// when loading in Mod_LoadSpriteGroup, we guaranteed all interval values
|
// when loading in Mod_LoadSpriteGroup, we guaranteed all interval values
|
||||||
// are positive, so we don't have to worry about division by 0
|
// are positive, so we don't have to worry about division by 0
|
||||||
|
|
|
@ -228,7 +228,8 @@ void SV_WaterMove (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
vec3_t wishvel;
|
vec3_t wishvel;
|
||||||
float speed, newspeed, wishspeed, addspeed, accelspeed;
|
float speed, newspeed, addspeed, accelspeed;
|
||||||
|
//float wishspeed;
|
||||||
|
|
||||||
//
|
//
|
||||||
// user intentions
|
// user intentions
|
||||||
|
@ -483,7 +484,7 @@ Returns false if the client should be killed
|
||||||
qboolean SV_ReadClientMessage (void)
|
qboolean SV_ReadClientMessage (void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
int cmd;
|
int ccmd;
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -511,9 +512,9 @@ nextmsg:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = MSG_ReadChar ();
|
ccmd = MSG_ReadChar ();
|
||||||
|
|
||||||
switch (cmd)
|
switch (ccmd)
|
||||||
{
|
{
|
||||||
case -1:
|
case -1:
|
||||||
goto nextmsg; // end of message
|
goto nextmsg; // end of message
|
||||||
|
|
|
@ -73,10 +73,9 @@ V_CalcRoll
|
||||||
Used by view and sv_user
|
Used by view and sv_user
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
vec3_t forward, right, up;
|
|
||||||
|
|
||||||
float V_CalcRoll (vec3_t angles, vec3_t velocity)
|
float V_CalcRoll (vec3_t angles, vec3_t velocity)
|
||||||
{
|
{
|
||||||
|
vec3_t forward, right, up;
|
||||||
float sign;
|
float sign;
|
||||||
float side;
|
float side;
|
||||||
float value;
|
float value;
|
||||||
|
|
Loading…
Reference in a new issue