mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-08 10:50:42 +00:00
Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart-Public
This commit is contained in:
commit
3b3a63cd90
2 changed files with 4 additions and 31 deletions
|
@ -1451,33 +1451,13 @@ static void SV_SendPlayerInfo(INT32 node)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
netbuffer->u.playerinfo[i].node = (UINT8)playernode[i];
|
netbuffer->u.playerinfo[i].node = i;
|
||||||
strncpy(netbuffer->u.playerinfo[i].name, (const char *)&player_names[i], MAXPLAYERNAME+1);
|
strncpy(netbuffer->u.playerinfo[i].name, (const char *)&player_names[i], MAXPLAYERNAME+1);
|
||||||
netbuffer->u.playerinfo[i].name[MAXPLAYERNAME] = '\0';
|
netbuffer->u.playerinfo[i].name[MAXPLAYERNAME] = '\0';
|
||||||
|
|
||||||
//fetch IP address
|
//fetch IP address
|
||||||
{
|
//No, don't do that, you fuckface.
|
||||||
const char *claddress;
|
|
||||||
UINT32 numericaddress[4];
|
|
||||||
|
|
||||||
memset(netbuffer->u.playerinfo[i].address, 0, 4);
|
memset(netbuffer->u.playerinfo[i].address, 0, 4);
|
||||||
if (playernode[i] == 0)
|
|
||||||
{
|
|
||||||
//127.0.0.1
|
|
||||||
netbuffer->u.playerinfo[i].address[0] = 127;
|
|
||||||
netbuffer->u.playerinfo[i].address[3] = 1;
|
|
||||||
}
|
|
||||||
else if (playernode[i] > 0 && I_GetNodeAddress && (claddress = I_GetNodeAddress(playernode[i])) != NULL)
|
|
||||||
{
|
|
||||||
if (sscanf(claddress, "%d.%d.%d.%d", &numericaddress[0], &numericaddress[1], &numericaddress[2], &numericaddress[3]) < 4)
|
|
||||||
goto badaddress;
|
|
||||||
netbuffer->u.playerinfo[i].address[0] = (UINT8)numericaddress[0];
|
|
||||||
netbuffer->u.playerinfo[i].address[1] = (UINT8)numericaddress[1];
|
|
||||||
netbuffer->u.playerinfo[i].address[2] = (UINT8)numericaddress[2];
|
|
||||||
netbuffer->u.playerinfo[i].address[3] = (UINT8)numericaddress[3];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
badaddress:
|
|
||||||
|
|
||||||
if (G_GametypeHasTeams())
|
if (G_GametypeHasTeams())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1796,7 +1796,7 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 viewnumber)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Someone seriously wants infinite draw distance for precipitation?
|
// no, no infinite draw distance for precipitation. this option at zero is supposed to turn it off
|
||||||
if ((limit_dist = (fixed_t)cv_drawdist_precip.value << FRACBITS))
|
if ((limit_dist = (fixed_t)cv_drawdist_precip.value << FRACBITS))
|
||||||
{
|
{
|
||||||
for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext)
|
for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext)
|
||||||
|
@ -1812,13 +1812,6 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 viewnumber)
|
||||||
R_ProjectPrecipitationSprite(precipthing);
|
R_ProjectPrecipitationSprite(precipthing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// Draw everything in sector, no checks
|
|
||||||
for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext)
|
|
||||||
if (!(precipthing->precipflags & PCF_INVISIBLE))
|
|
||||||
R_ProjectPrecipitationSprite(precipthing);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue