mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 05:41:02 +00:00
Squash various warnings
Shadowed declarations Unsuffixed float constants There's an unsuffixed float constant I can't fix because the define is outside of SRB2. We could have our own copy of Pi if we really wanted.
This commit is contained in:
parent
ad79b4b83b
commit
b8477b4067
8 changed files with 20 additions and 28 deletions
|
@ -2477,7 +2477,7 @@ static void CL_RemovePlayer(INT32 playernum, INT32 reason)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
LUAh_PlayerQuit(&players[playernum], reason); // Lua hook for player quitting
|
LUAh_PlayerQuit(&players[playernum], reason); // Lua hook for player quitting
|
||||||
#endif
|
#endif
|
||||||
|
@ -2931,14 +2931,12 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
||||||
}
|
}
|
||||||
else if (server)
|
else if (server)
|
||||||
{
|
{
|
||||||
XBOXSTATIC UINT8 buf[2];
|
|
||||||
|
|
||||||
// Sal: Because kicks (and a lot of other commands) are player-based, we can't tell which player pnum is on the node from a glance.
|
// Sal: Because kicks (and a lot of other commands) are player-based, we can't tell which player pnum is on the node from a glance.
|
||||||
// When we want to remove everyone from a node, we have to get the kicked player's node, then remove everyone on that node manually so we don't miss any.
|
// When we want to remove everyone from a node, we have to get the kicked player's node, then remove everyone on that node manually so we don't miss any.
|
||||||
// This avoids the bugs with older SRB2 version's online splitscreen kicks, specifically ghosting.
|
// This avoids the bugs with older SRB2 version's online splitscreen kicks, specifically ghosting.
|
||||||
// On top of this, it can't just be a CL_RemovePlayer call; it has to be a server-sided.
|
// On top of this, it can't just be a CL_RemovePlayer call; it has to be a server-sided.
|
||||||
// Clients don't bother setting any nodes for anything but THE server player (even ignoring the server's extra players!), so it'll often remove everyone because they all have node -1/255, insta-desync!
|
// Clients don't bother setting any nodes for anything but THE server player (even ignoring the server's extra players!), so it'll often remove everyone because they all have node -1/255, insta-desync!
|
||||||
// And yes. This is a netxcmd wrap for just CL_RemovePlayer! :V
|
// And yes. This is a netxcmd wrap for just CL_RemovePlayer! :V
|
||||||
|
|
||||||
#define removethisplayer(otherp) \
|
#define removethisplayer(otherp) \
|
||||||
if (otherp >= 0) \
|
if (otherp >= 0) \
|
||||||
|
|
|
@ -492,8 +492,8 @@ static void GIF_framewrite(void)
|
||||||
|
|
||||||
// screen regions are handled in GIF_lzw
|
// screen regions are handled in GIF_lzw
|
||||||
{
|
{
|
||||||
int d1 = (int)((100.0/NEWTICRATE)*(gif_frames+1));
|
int d1 = (int)((100.0f/NEWTICRATE)*(gif_frames+1));
|
||||||
int d2 = (int)((100.0/NEWTICRATE)*(gif_frames));
|
int d2 = (int)((100.0f/NEWTICRATE)*(gif_frames));
|
||||||
UINT16 delay = d1-d2;
|
UINT16 delay = d1-d2;
|
||||||
INT32 startline;
|
INT32 startline;
|
||||||
|
|
||||||
|
|
|
@ -7755,7 +7755,7 @@ Update the maxplayers label...
|
||||||
|
|
||||||
if (itemOn == 2 && i == setupm_pselect)
|
if (itemOn == 2 && i == setupm_pselect)
|
||||||
{
|
{
|
||||||
static UINT8 cursorframe = 0;
|
static UINT8 cursorframe = 0;
|
||||||
if (skullAnimCounter % 4 == 0)
|
if (skullAnimCounter % 4 == 0)
|
||||||
cursorframe++;
|
cursorframe++;
|
||||||
if (cursorframe > 7)
|
if (cursorframe > 7)
|
||||||
|
@ -9447,7 +9447,6 @@ static void M_DrawMonitorToggles(void)
|
||||||
for (j = 0; j < height; j++)
|
for (j = 0; j < height; j++)
|
||||||
{
|
{
|
||||||
const INT32 thisitem = (i*height)+j;
|
const INT32 thisitem = (i*height)+j;
|
||||||
INT32 drawnum = 0;
|
|
||||||
|
|
||||||
if (thisitem >= currentMenu->numitems)
|
if (thisitem >= currentMenu->numitems)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -139,7 +139,7 @@ boolean P_CanPickupItem(player_t *player, UINT8 weapon)
|
||||||
// Item slot already taken up
|
// Item slot already taken up
|
||||||
if (player->kartstuff[k_itemroulette]
|
if (player->kartstuff[k_itemroulette]
|
||||||
|| (weapon != 3 && player->kartstuff[k_itemamount])
|
|| (weapon != 3 && player->kartstuff[k_itemamount])
|
||||||
|| player->kartstuff[k_itemheld])
|
|| player->kartstuff[k_itemheld])
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,7 +344,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
// Teleport player to the other teleporter (special->target). We'll assume there's always only ever 2.
|
// Teleport player to the other teleporter (special->target). We'll assume there's always only ever 2.
|
||||||
if (!special->target)
|
if (!special->target)
|
||||||
return; // foolproof crash prevention check!!!!!
|
return; // foolproof crash prevention check!!!!!
|
||||||
|
|
||||||
P_TeleportMove(player->mo, special->target->x, special->target->y, special->target->z + (48<<FRACBITS));
|
P_TeleportMove(player->mo, special->target->x, special->target->y, special->target->z + (48<<FRACBITS));
|
||||||
player->mo->angle = special->target->angle;
|
player->mo->angle = special->target->angle;
|
||||||
P_SetObjectMomZ(player->mo, 12<<FRACBITS, false);
|
P_SetObjectMomZ(player->mo, 12<<FRACBITS, false);
|
||||||
|
@ -470,7 +470,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1
|
if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1
|
||||||
{
|
{
|
||||||
INT32 numingame = 0;
|
INT32 numingame = 0;
|
||||||
INT32 i;
|
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
@ -521,7 +520,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1
|
if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1
|
||||||
{
|
{
|
||||||
INT32 numingame = 0;
|
INT32 numingame = 0;
|
||||||
INT32 i;
|
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
@ -2113,7 +2111,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
target->target->player->kartstuff[k_itemamount]--;
|
target->target->player->kartstuff[k_itemamount]--;
|
||||||
if (target->lastlook != 0)
|
if (target->lastlook != 0)
|
||||||
{
|
{
|
||||||
K_RepairOrbitChain(target);
|
K_RepairOrbitChain(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
14
src/p_mobj.c
14
src/p_mobj.c
|
@ -8868,7 +8868,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
if (mobj->health)
|
if (mobj->health)
|
||||||
{
|
{
|
||||||
boolean blue = (mobj->type == MT_BLUEROBRA_HEAD);
|
boolean blue = (mobj->type == MT_BLUEROBRA_HEAD);
|
||||||
UINT8 numsegs = abs(mobj->z - mobj->floorz) / (32 * mobj->scale);
|
UINT8 locnumsegs = abs(mobj->z - mobj->floorz) / (32 * mobj->scale);
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
mobj_t *cur = mobj->hnext, *prev = mobj;
|
mobj_t *cur = mobj->hnext, *prev = mobj;
|
||||||
|
|
||||||
|
@ -8876,13 +8876,13 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
mobj->angle = (angle_t)mobj->extravalue1;
|
mobj->angle = (angle_t)mobj->extravalue1;
|
||||||
mobj->extravalue1 += (FixedAngle(2*mobj->momz) * (blue ? -1 : 1));
|
mobj->extravalue1 += (FixedAngle(2*mobj->momz) * (blue ? -1 : 1));
|
||||||
|
|
||||||
for (i = 0; i < numsegs*2; i++) // *2 to check for any extra segs still present
|
for (i = 0; i < locnumsegs*2; i++) // *2 to check for any extra segs still present
|
||||||
{
|
{
|
||||||
fixed_t segz = mobj->z - ((i+1) * (32 * mobj->scale));
|
fixed_t segz = mobj->z - ((i+1) * (32 * mobj->scale));
|
||||||
|
|
||||||
if (cur && !P_MobjWasRemoved(cur))
|
if (cur && !P_MobjWasRemoved(cur))
|
||||||
{
|
{
|
||||||
if (i >= numsegs) // Remove extras
|
if (i >= locnumsegs) // Remove extras
|
||||||
{
|
{
|
||||||
mobj_t *next = cur->hnext;
|
mobj_t *next = cur->hnext;
|
||||||
P_RemoveMobj(cur);
|
P_RemoveMobj(cur);
|
||||||
|
@ -8894,7 +8894,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (i >= numsegs) // We're done with this list
|
if (i >= locnumsegs) // We're done with this list
|
||||||
continue; //break;
|
continue; //break;
|
||||||
else // Need another here!
|
else // Need another here!
|
||||||
cur = P_SpawnMobj(mobj->x, mobj->y, segz, (blue ? MT_BLUEROBRA_JOINT : MT_ROBRA_JOINT));
|
cur = P_SpawnMobj(mobj->x, mobj->y, segz, (blue ? MT_BLUEROBRA_JOINT : MT_ROBRA_JOINT));
|
||||||
|
@ -10959,7 +10959,6 @@ void P_SpawnPlayer(INT32 playernum)
|
||||||
|
|
||||||
if (p->kartstuff[k_bumper])
|
if (p->kartstuff[k_bumper])
|
||||||
{
|
{
|
||||||
INT32 i;
|
|
||||||
angle_t diff = FixedAngle(360*FRACUNIT/p->kartstuff[k_bumper]);
|
angle_t diff = FixedAngle(360*FRACUNIT/p->kartstuff[k_bumper]);
|
||||||
angle_t newangle = mobj->angle;
|
angle_t newangle = mobj->angle;
|
||||||
fixed_t newx = mobj->x + P_ReturnThrustX(mobj, newangle + ANGLE_180, 64*FRACUNIT);
|
fixed_t newx = mobj->x + P_ReturnThrustX(mobj, newangle + ANGLE_180, 64*FRACUNIT);
|
||||||
|
@ -11746,13 +11745,12 @@ ML_NOCLIMB : Direction not controllable
|
||||||
case MT_AAZTREE_HELPER:
|
case MT_AAZTREE_HELPER:
|
||||||
{
|
{
|
||||||
fixed_t top = mobj->z;
|
fixed_t top = mobj->z;
|
||||||
UINT8 numsegs = (mthing->extrainfo)+2;
|
UINT8 locnumsegs = (mthing->extrainfo)+2;
|
||||||
UINT8 numleaves = max(3, (abs(mthing->angle+1) % 6) + 3);
|
UINT8 numleaves = max(3, (abs(mthing->angle+1) % 6) + 3);
|
||||||
UINT8 i;
|
|
||||||
mobj_t *coconut;
|
mobj_t *coconut;
|
||||||
|
|
||||||
// Spawn tree segments
|
// Spawn tree segments
|
||||||
for (i = 0; i < numsegs; i++)
|
for (i = 0; i < locnumsegs; i++)
|
||||||
{
|
{
|
||||||
P_SpawnMobj(mobj->x, mobj->y, top, MT_AAZTREE_SEG);
|
P_SpawnMobj(mobj->x, mobj->y, top, MT_AAZTREE_SEG);
|
||||||
top += FixedMul(mobjinfo[MT_AAZTREE_SEG].height, mobj->scale);
|
top += FixedMul(mobjinfo[MT_AAZTREE_SEG].height, mobj->scale);
|
||||||
|
|
|
@ -2648,7 +2648,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
// This is handled BEFORE sounds are stopped.
|
// This is handled BEFORE sounds are stopped.
|
||||||
if (rendermode != render_none && encoremode && !prevencoremode)
|
if (rendermode != render_none && encoremode && !prevencoremode)
|
||||||
{
|
{
|
||||||
tic_t starttime, endtime, nowtime;
|
tic_t locstarttime, endtime, nowtime;
|
||||||
|
|
||||||
S_StopMusic(); // er, about that...
|
S_StopMusic(); // er, about that...
|
||||||
|
|
||||||
|
@ -2666,8 +2666,8 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
F_WipeEndScreen();
|
F_WipeEndScreen();
|
||||||
F_RunWipe(wipedefs[wipe_level_final], false);
|
F_RunWipe(wipedefs[wipe_level_final], false);
|
||||||
|
|
||||||
starttime = nowtime = lastwipetic;
|
locstarttime = nowtime = lastwipetic;
|
||||||
endtime = starttime + (3*TICRATE)/2;
|
endtime = locstarttime + (3*TICRATE)/2;
|
||||||
|
|
||||||
// Hold on white for extra effect.
|
// Hold on white for extra effect.
|
||||||
while (nowtime < endtime)
|
while (nowtime < endtime)
|
||||||
|
|
|
@ -3864,7 +3864,7 @@ DoneSection2:
|
||||||
if (!(player->pflags & PF_SPINNING))
|
if (!(player->pflags & PF_SPINNING))
|
||||||
player->pflags |= PF_SPINNING;
|
player->pflags |= PF_SPINNING;
|
||||||
|
|
||||||
//P_SetPlayerMobjState(player->mo, S_PLAY_ATK1);
|
//P_SetPlayerMobjState(player->mo, S_PLAY_ATK1);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
player->kartstuff[k_dashpadcooldown] = TICRATE/3;
|
player->kartstuff[k_dashpadcooldown] = TICRATE/3;
|
||||||
|
@ -4196,7 +4196,6 @@ DoneSection2:
|
||||||
{
|
{
|
||||||
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
|
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
|
||||||
{
|
{
|
||||||
UINT8 i;
|
|
||||||
UINT8 nump = 0;
|
UINT8 nump = 0;
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
|
|
@ -50,8 +50,8 @@
|
||||||
|
|
||||||
#ifdef HAVE_LIBGME
|
#ifdef HAVE_LIBGME
|
||||||
#include "gme/gme.h"
|
#include "gme/gme.h"
|
||||||
#define GME_TREBLE 5.0
|
#define GME_TREBLE 5.0f
|
||||||
#define GME_BASS 1.0
|
#define GME_BASS 1.0f
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
|
Loading…
Reference in a new issue