mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Merge branch 'public_next'
# Conflicts: # src/y_inter.c
This commit is contained in:
commit
023d91a02e
4 changed files with 64 additions and 29 deletions
|
@ -2527,12 +2527,18 @@ static void Command_Nodes(void)
|
|||
|
||||
static void Command_Ban(void)
|
||||
{
|
||||
if (COM_Argc() == 1)
|
||||
if (COM_Argc() < 2)
|
||||
{
|
||||
CONS_Printf(M_GetText("Ban <playername/playernum> <reason>: ban and kick a player\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!netgame) // Don't kick Tails in splitscreen!
|
||||
{
|
||||
CONS_Printf(M_GetText("This only works in a netgame.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (server || adminplayer == consoleplayer)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
|
||||
|
@ -2542,8 +2548,9 @@ static void Command_Ban(void)
|
|||
|
||||
if (pn == -1 || pn == 0)
|
||||
return;
|
||||
else
|
||||
WRITEUINT8(p, pn);
|
||||
|
||||
WRITEUINT8(p, pn);
|
||||
|
||||
if (server && I_Ban && !I_Ban(node)) // only the server is allowed to do this right now
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Too many bans! Geez, that's a lot of people you're excluding...\n"));
|
||||
|
@ -2586,21 +2593,27 @@ static void Command_Ban(void)
|
|||
|
||||
static void Command_Kick(void)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
|
||||
UINT8 *p = buf;
|
||||
|
||||
if (COM_Argc() == 1)
|
||||
if (COM_Argc() < 2)
|
||||
{
|
||||
CONS_Printf(M_GetText("kick <playername/playernum> <reason>: kick a player\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!netgame) // Don't kick Tails in splitscreen!
|
||||
{
|
||||
CONS_Printf(M_GetText("This only works in a netgame.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (server || adminplayer == consoleplayer)
|
||||
{
|
||||
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
|
||||
UINT8 *p = buf;
|
||||
const SINT8 pn = nametonum(COM_Argv(1));
|
||||
WRITESINT8(p, pn);
|
||||
|
||||
if (pn == -1 || pn == 0)
|
||||
return;
|
||||
|
||||
// Special case if we are trying to kick a player who is downloading the game state:
|
||||
// trigger a timeout instead of kicking them, because a kick would only
|
||||
// take effect after they have finished downloading
|
||||
|
@ -2609,6 +2622,9 @@ static void Command_Kick(void)
|
|||
Net_ConnectionTimeout(playernode[pn]);
|
||||
return;
|
||||
}
|
||||
|
||||
WRITESINT8(p, pn);
|
||||
|
||||
if (COM_Argc() == 2)
|
||||
{
|
||||
WRITEUINT8(p, KICK_MSG_GO_AWAY);
|
||||
|
|
|
@ -596,14 +596,14 @@ static UINT8 ArchiveValue(int TABLESINDEX, int myindex)
|
|||
{
|
||||
mobjinfo_t *info = *((mobjinfo_t **)lua_touserdata(gL, myindex));
|
||||
WRITEUINT8(save_p, ARCH_MOBJINFO);
|
||||
WRITEUINT8(save_p, info - mobjinfo);
|
||||
WRITEUINT16(save_p, info - mobjinfo);
|
||||
break;
|
||||
}
|
||||
case ARCH_STATE:
|
||||
{
|
||||
state_t *state = *((state_t **)lua_touserdata(gL, myindex));
|
||||
WRITEUINT8(save_p, ARCH_STATE);
|
||||
WRITEUINT8(save_p, state - states);
|
||||
WRITEUINT16(save_p, state - states);
|
||||
break;
|
||||
}
|
||||
case ARCH_MOBJ:
|
||||
|
|
14
src/p_map.c
14
src/p_map.c
|
@ -1117,6 +1117,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (iwassprung) // this spring caused you to gain MFE_SPRUNG just now...
|
||||
return false; // "cancel" P_TryMove via blocking so you keep your current position
|
||||
}
|
||||
else if (tmthing->flags & MF_SPRING && (thing->player || thing->flags & MF_PUSHABLE))
|
||||
; // Fix a few nasty spring-jumping bugs that happen sometimes.
|
||||
// Monitors are not treated as solid to players who are jumping, spinning or gliding,
|
||||
// unless it's a CTF team monitor and you're on the wrong team
|
||||
else if (thing->flags & MF_MONITOR && tmthing->player
|
||||
|
@ -1155,11 +1157,13 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
topz = thing->z - thing->scale; // FixedMul(FRACUNIT, thing->scale), but thing->scale == FRACUNIT in base scale anyways
|
||||
|
||||
if (thing->flags & MF_SPRING)
|
||||
;
|
||||
// block only when jumping not high enough,
|
||||
// (dont climb max. 24units while already in air)
|
||||
// since return false doesn't handle momentum properly,
|
||||
// we lie to P_TryMove() so it's always too high
|
||||
if (tmthing->player && tmthing->z + tmthing->height > topz
|
||||
else if (tmthing->player && tmthing->z + tmthing->height > topz
|
||||
&& tmthing->z + tmthing->height < tmthing->ceilingz)
|
||||
{
|
||||
if (thing->flags & MF_GRENADEBOUNCE && (thing->flags & MF_MONITOR || thing->flags2 & MF2_STANDONME)) // Gold monitor hack...
|
||||
|
@ -1171,8 +1175,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
#endif
|
||||
tmfloorthing = thing; // needed for side collision
|
||||
}
|
||||
else if (thing->flags & MF_SPRING)
|
||||
;
|
||||
else if (topz < tmceilingz && tmthing->z <= thing->z+thing->height)
|
||||
{
|
||||
tmceilingz = topz;
|
||||
|
@ -1201,11 +1203,13 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
topz = thing->z + thing->height + thing->scale; // FixedMul(FRACUNIT, thing->scale), but thing->scale == FRACUNIT in base scale anyways
|
||||
|
||||
if (thing->flags & MF_SPRING)
|
||||
;
|
||||
// block only when jumping not high enough,
|
||||
// (dont climb max. 24units while already in air)
|
||||
// since return false doesn't handle momentum properly,
|
||||
// we lie to P_TryMove() so it's always too high
|
||||
if (tmthing->player && tmthing->z < topz
|
||||
else if (tmthing->player && tmthing->z < topz
|
||||
&& tmthing->z > tmthing->floorz)
|
||||
{
|
||||
if (thing->flags & MF_GRENADEBOUNCE && (thing->flags & MF_MONITOR || thing->flags2 & MF2_STANDONME)) // Gold monitor hack...
|
||||
|
@ -1217,8 +1221,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
#endif
|
||||
tmfloorthing = thing; // needed for side collision
|
||||
}
|
||||
else if (thing->flags & MF_SPRING)
|
||||
;
|
||||
else if (topz > tmfloorz && tmthing->z+tmthing->height >= thing->z)
|
||||
{
|
||||
tmfloorz = topz;
|
||||
|
|
|
@ -160,6 +160,20 @@ static void Y_CalculateMatchWinners(void);
|
|||
static void Y_FollowIntermission(void);
|
||||
static void Y_UnloadData(void);
|
||||
|
||||
// Stuff copy+pasted from st_stuff.c
|
||||
static INT32 SCX(INT32 x)
|
||||
{
|
||||
return FixedInt(FixedMul(x<<FRACBITS, vid.fdupx));
|
||||
}
|
||||
static INT32 SCY(INT32 z)
|
||||
{
|
||||
return FixedInt(FixedMul(z<<FRACBITS, vid.fdupy));
|
||||
}
|
||||
|
||||
#define ST_DrawNumFromHud(h,n) V_DrawTallNum(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART, n)
|
||||
#define ST_DrawPadNumFromHud(h,n,q) V_DrawPaddedTallNum(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART, n, q)
|
||||
#define ST_DrawPatchFromHud(h,p) V_DrawScaledPatch(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART, p)
|
||||
|
||||
static void Y_IntermissionTokenDrawer(void)
|
||||
{
|
||||
INT32 y;
|
||||
|
@ -242,28 +256,31 @@ void Y_IntermissionDrawer(void)
|
|||
Y_IntermissionTokenDrawer();
|
||||
|
||||
// draw score
|
||||
V_DrawScaledPatch(hudinfo[HUD_SCORE].x, hudinfo[HUD_SCORE].y, V_SNAPTOLEFT, sboscore);
|
||||
V_DrawTallNum(hudinfo[HUD_SCORENUM].x, hudinfo[HUD_SCORENUM].y, V_SNAPTOLEFT, data.coop.score);
|
||||
ST_DrawPatchFromHud(HUD_SCORE, sboscore);
|
||||
ST_DrawNumFromHud(HUD_SCORENUM, data.coop.score);
|
||||
|
||||
// draw time
|
||||
V_DrawScaledPatch(hudinfo[HUD_TIME].x, hudinfo[HUD_TIME].y, V_SNAPTOLEFT, sbotime);
|
||||
ST_DrawPatchFromHud(HUD_TIME, sbotime);
|
||||
if (cv_timetic.value == 1)
|
||||
V_DrawTallNum(hudinfo[HUD_SECONDS].x, hudinfo[HUD_SECONDS].y, V_SNAPTOLEFT, data.coop.tics);
|
||||
ST_DrawNumFromHud(HUD_SECONDS, data.coop.tics);
|
||||
else
|
||||
{
|
||||
INT32 seconds, minutes, tictrn;
|
||||
|
||||
seconds = G_TicsToSeconds(data.coop.tics);
|
||||
minutes = G_TicsToMinutes(data.coop.tics, true);
|
||||
tictrn = G_TicsToCentiseconds(data.coop.tics);
|
||||
|
||||
ST_DrawNumFromHud(HUD_MINUTES, minutes); // Minutes
|
||||
ST_DrawPatchFromHud(HUD_TIMECOLON, sbocolon); // Colon
|
||||
ST_DrawPadNumFromHud(HUD_SECONDS, seconds, 2); // Seconds
|
||||
|
||||
// we should show centiseconds on the intermission screen too, if the conditions are right.
|
||||
if (modeattacking || cv_timetic.value == 2)
|
||||
{
|
||||
V_DrawPaddedTallNum(hudinfo[HUD_TICS].x, hudinfo[HUD_TICS].y, V_SNAPTOLEFT,
|
||||
G_TicsToCentiseconds(data.coop.tics), 2);
|
||||
V_DrawScaledPatch(hudinfo[HUD_TIMETICCOLON].x, hudinfo[HUD_TIMETICCOLON].y, V_SNAPTOLEFT, sboperiod);
|
||||
ST_DrawPatchFromHud(HUD_TIMETICCOLON, sboperiod); // Period
|
||||
ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics
|
||||
}
|
||||
|
||||
V_DrawPaddedTallNum(hudinfo[HUD_SECONDS].x, hudinfo[HUD_SECONDS].y, V_SNAPTOLEFT,
|
||||
G_TicsToSeconds(data.coop.tics), 2);
|
||||
V_DrawScaledPatch(hudinfo[HUD_TIMECOLON].x, hudinfo[HUD_TIMECOLON].y, V_SNAPTOLEFT, sbocolon);
|
||||
V_DrawTallNum(hudinfo[HUD_MINUTES].x, hudinfo[HUD_MINUTES].y, V_SNAPTOLEFT,
|
||||
G_TicsToMinutes(data.coop.tics, false));
|
||||
}
|
||||
|
||||
// draw the "got through act" lines and act number
|
||||
|
|
Loading…
Reference in a new issue