Merge branch 'blankart-dev' into refactornetsave
This commit is contained in:
commit
ce70e05d30
9 changed files with 73 additions and 45 deletions
|
|
@ -12,7 +12,8 @@ git_current_branch(SRB2_COMP_BRANCH)
|
|||
git_working_tree_dirty(SRB2_COMP_UNCOMMITTED)
|
||||
|
||||
git_latest_commit(SRB2_COMP_REVISION)
|
||||
git_subject(SRB2_COMP_LASTCOMMIT)
|
||||
git_subject(subject)
|
||||
string(REGEX REPLACE "([\"\\])" "\\\\\\1" SRB2_COMP_LASTCOMMIT "${subject}")
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/config.h")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/build/src/config.h")
|
||||
|
|
|
|||
|
|
@ -410,10 +410,8 @@ void K_HandleFollower(player_t *player)
|
|||
|
||||
if (fl.mode == FOLLOWERMODE_GROUND)
|
||||
{
|
||||
sector_t *sec = R_PointInSubsector(sx, sy)->sector;
|
||||
|
||||
fh = min(fh, P_GetFloorZ(player->follower, sec, sx, sy, NULL));
|
||||
ch = max(ch, P_GetCeilingZ(player->follower, sec, sx, sy, NULL) - ourheight);
|
||||
fh = min(fh, P_FloorzAtPos(sx, sy, player->follower->z, ourheight));
|
||||
ch = max(ch, P_CeilingzAtPos(sx, sy, player->follower->z, ourheight) - ourheight);
|
||||
|
||||
if (P_IsObjectOnGround(player->mo) == false)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5282,7 +5282,7 @@ static void K_drawLapSplitTimestamp(void)
|
|||
ahead >= 0 ? "-" : "+"
|
||||
);
|
||||
|
||||
V_DrawMappedPatch(TIME_X - 8, TIME_Y + 3, splitflags, faceprefix[skin][FACE_MINIMAP], skincolor);
|
||||
V_DrawMappedPatch(TIME_X, TIME_Y + 10, splitflags, faceprefix[skin][FACE_MINIMAP], skincolor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5352,11 +5352,11 @@ static void K_drawLapSplitComparison(void)
|
|||
INT32 stwidth = V_StringWidth(buffer, splitflags) / 2;
|
||||
|
||||
// vibes offset
|
||||
V_DrawMappedPatch(row_position[0] - stwidth - 35, row_position[1], splitflags, faceprefix[skin][FACE_MINIMAP], skincolor);
|
||||
V_DrawMappedPatch(row_position[0] - stwidth, row_position[1] + 4, splitflags, faceprefix[skin][FACE_MINIMAP], skincolor);
|
||||
|
||||
if (pos > 1)
|
||||
{
|
||||
V_DrawPingNum(row_position[0] - stwidth - 35, row_position[1], splitflags, pos, NULL);
|
||||
V_DrawPingNum(row_position[0] - stwidth, row_position[1], splitflags, pos, NULL);
|
||||
}
|
||||
|
||||
// vibes offset TWO
|
||||
|
|
|
|||
|
|
@ -402,9 +402,16 @@ static int mobj_get(lua_State *L)
|
|||
}
|
||||
case mobj_eflags:
|
||||
{
|
||||
UINT32 eflags = mo->eflags; // yes, not UINT16
|
||||
UINT32 eflags = mo->eflags; // yes, not UINT16
|
||||
if (lua_compatmode)
|
||||
eflags |= (~mo->renderflags & RF_DONTDRAW);
|
||||
{
|
||||
// The old eflags compat system causes rendering issues for characters like
|
||||
// the MK64 cast. This system causes rendering issues in certain gameplay
|
||||
// mods. At least in this case, character mods take priority, so we set
|
||||
// up compatibility like so:
|
||||
eflags |=
|
||||
mo->renderflags & RF_DONTDRAW ? ~mo->renderflags & RF_DONTDRAW : 0;
|
||||
}
|
||||
lua_pushinteger(L, eflags);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
44
src/m_menu.c
44
src/m_menu.c
|
|
@ -7151,12 +7151,35 @@ void MD_DrawCssCharacter(void)
|
|||
// draw their follower if there is one
|
||||
if (cv_dummyfollower.value > -1)
|
||||
{
|
||||
// animate the follower
|
||||
follower_t fl = followers[cv_dummyfollower.value]; // shortcut for our sanity
|
||||
|
||||
tic_t bobspeed = fl.bobspeed;
|
||||
if (fl.mode == FOLLOWERMODE_GROUND)
|
||||
bobspeed = FixedDiv(bobspeed*FRACUNIT, fl.bobamp / 6); // rough approximation of bounce speed
|
||||
|
||||
// smooth floating, totally not stolen from rocket sneakers.
|
||||
fixed_t sine = FixedMul(fl.bobamp, FINESINE(((FixedMul(4 * M_TAU_FIXED, bobspeed) * followertimer)>>ANGLETOFINESHIFT) & FINEMASK));
|
||||
|
||||
follower_tics -= renderdeltatics;
|
||||
|
||||
// restart the ground follower's animation when it lands on the "ground"
|
||||
if (fl.mode == FOLLOWERMODE_GROUND)
|
||||
{
|
||||
// this sucks
|
||||
fixed_t sine_next = FixedMul(fl.bobamp, FINESINE(((FixedMul(4 * M_TAU_FIXED, bobspeed) * (followertimer + 1))>>ANGLETOFINESHIFT) & FINEMASK));
|
||||
if ((sine > 0) != (sine_next > 0))
|
||||
{
|
||||
st = fl.followstate;
|
||||
if (st != S_NULL)
|
||||
follower_state = &states[st];
|
||||
follower_tics = follower_state->tics*FRACUNIT;
|
||||
follower_frame = follower_state->frame & FF_FRAMEMASK; // get spritedef
|
||||
}
|
||||
}
|
||||
|
||||
// animate the follower
|
||||
if (follower_tics <= 0)
|
||||
{
|
||||
|
||||
// FF_ANIMATE; cycle through FRAMES and get back afterwards. This will be prominent amongst followers hence why it's being supported here.
|
||||
if (follower_state->frame & FF_ANIMATE)
|
||||
{
|
||||
|
|
@ -7171,14 +7194,12 @@ void MD_DrawCssCharacter(void)
|
|||
if (st != S_NULL)
|
||||
follower_state = &states[st];
|
||||
follower_tics = follower_state->tics*FRACUNIT;
|
||||
// get spritedef:
|
||||
follower_frame = follower_state->frame & FF_FRAMEMASK;
|
||||
follower_frame = follower_state->frame & FF_FRAMEMASK; // get spritedef
|
||||
}
|
||||
}
|
||||
sprdef = &sprites[follower_state->sprite];
|
||||
|
||||
// draw the follower
|
||||
|
||||
if (follower_frame >= sprdef->numframes)
|
||||
follower_frame = 0; // frame doesn't exist, we went beyond it... what?
|
||||
sprframe = &sprdef->spriteframes[follower_frame];
|
||||
|
|
@ -7189,22 +7210,13 @@ void MD_DrawCssCharacter(void)
|
|||
// draw follower sprite
|
||||
{
|
||||
// Fake the follower's in game appearance by now also applying some of its variables! coolio, eh?
|
||||
follower_t fl = followers[cv_dummyfollower.value]; // shortcut for our sanity
|
||||
|
||||
tic_t bobspeed = fl.bobspeed;
|
||||
if (fl.mode == FOLLOWERMODE_GROUND)
|
||||
bobspeed = FixedDiv(bobspeed, fl.bobamp / 6); // Rough approximation of bounce speed
|
||||
|
||||
// smooth floating, totally not stolen from rocket sneakers.
|
||||
fixed_t sine = FixedMul(fl.bobamp, FINESINE(((FixedMul(4 * M_TAU_FIXED, bobspeed) * followertimer)>>ANGLETOFINESHIFT) & FINEMASK));
|
||||
|
||||
UINT16 color = K_GetEffectiveFollowerColor(cv_followercolor[setupplayer].value, &fl, cv_dummycolor.value, &skins[skintodisplay]);
|
||||
colormap = R_GetTranslationColormap(TC_DEFAULT, color, 0); // why does GTC_MENUCACHE not work here...?
|
||||
|
||||
INT32 x = (mx+65)*FRACUNIT;
|
||||
INT32 y = ((my+100)*FRACUNIT);
|
||||
INT32 y = ((my+105)*FRACUNIT);
|
||||
if (fl.mode == FOLLOWERMODE_GROUND)
|
||||
y += 40*FRACUNIT - abs(sine) * 2; // Bounce animation
|
||||
y += 40*FRACUNIT - FixedMul(abs(sine), max(2*FRACUNIT, (fl.bobamp*2)/3)); // bounce animation
|
||||
else
|
||||
y += sine;
|
||||
|
||||
|
|
|
|||
|
|
@ -103,6 +103,21 @@ void P_ClosestPointOnLine3D(const vector3_t *p, const vector3_t *Line, vector3_t
|
|||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// P_PointOnLineSide
|
||||
// Returns 0 or 1
|
||||
//
|
||||
// killough 5/3/98: reformatted, cleaned up
|
||||
// ioanch 20151228: made line const
|
||||
//
|
||||
INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line)
|
||||
{
|
||||
return
|
||||
!line->dx ? x <= line->v1->x ? line->dy > 0 : line->dy < 0 :
|
||||
!line->dy ? y <= line->v1->y ? line->dx < 0 : line->dx > 0 :
|
||||
((INT64)y - line->v1->y) * line->dx >= line->dy * ((INT64)x - line->v1->x);
|
||||
}
|
||||
|
||||
//
|
||||
// P_BoxOnLineSide
|
||||
// Considers the line to be infinite
|
||||
|
|
@ -140,11 +155,15 @@ INT32 P_BoxOnLineSide(const fixed_t *tmbox, const line_t *ld)
|
|||
// P_PointOnDivlineSide
|
||||
// Returns 0 or 1.
|
||||
//
|
||||
FUNCMATH FUNCINLINE static ATTRINLINE INT32 P_PointOnDivlineSide(fixed_t x, fixed_t y, const divline_t *line)
|
||||
// killough 5/3/98: reformatted, cleaned up
|
||||
//
|
||||
static INT32 P_PointOnDivlineSide(fixed_t x, fixed_t y, const divline_t *line)
|
||||
{
|
||||
// use cross product to determine side quickly
|
||||
INT64 v = ((INT64)y - line->y) * line->dx - ((INT64)x - line->x) * line->dy;
|
||||
return v > 0;
|
||||
return
|
||||
line->dx == 0 ? x <= line->x ? line->dy > 0 : line->dy < 0 :
|
||||
line->dy == 0 ? y <= line->y ? line->dx < 0 : line->dx > 0 :
|
||||
(line->dy ^ line->dx ^ (x -= line->x) ^ (y -= line->y)) < 0 ? (line->dy ^ x) < 0 :
|
||||
(INT64)(y) * line->dx >= (INT64)(line->dy) * x;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -48,18 +48,7 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2,
|
|||
#define P_AproxDistance(dx, dy) FixedHypot(dx, dy)
|
||||
void P_ClosestPointOnLine(fixed_t x, fixed_t y, const line_t *line, vertex_t *result);
|
||||
void P_ClosestPointOnLine3D(const vector3_t *p, const vector3_t *line, vector3_t *result);
|
||||
|
||||
//
|
||||
// P_PointOnLineSide
|
||||
// Returns 0 or 1
|
||||
//
|
||||
FUNCMATH FUNCINLINE static ATTRINLINE INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line)
|
||||
{
|
||||
// use cross product to determine side quickly
|
||||
INT64 v = ((INT64)y - line->v1->y) * line->dx - ((INT64)x - line->v1->x) * line->dy;
|
||||
return v > 0;
|
||||
}
|
||||
|
||||
INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line);
|
||||
void P_MakeDivline(const line_t *li, divline_t *dl);
|
||||
|
||||
struct opening_t
|
||||
|
|
|
|||
|
|
@ -12600,11 +12600,13 @@ void P_MovePlayerToSpawn(INT32 playernum, mapthing_t *mthing)
|
|||
|
||||
if (mthing)
|
||||
{
|
||||
fixed_t offset = udmf ? mthing->z << FRACBITS : 0;
|
||||
|
||||
// Setting the spawnpoint's args[0] will make the player start on the ceiling
|
||||
// Objectflip inverts
|
||||
if (!!(mthing->args[0]) ^ !!(mthing->options & MTF_OBJECTFLIP))
|
||||
{
|
||||
z = ceiling - mobjinfo[MT_PLAYER].height;
|
||||
z = ceiling - mobjinfo[MT_PLAYER].height - offset;
|
||||
if (mthing->options >> ZSHIFT)
|
||||
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||
if (p->respawn)
|
||||
|
|
@ -12612,7 +12614,7 @@ void P_MovePlayerToSpawn(INT32 playernum, mapthing_t *mthing)
|
|||
}
|
||||
else
|
||||
{
|
||||
z = floor;
|
||||
z = floor + offset;
|
||||
if (mthing->options >> ZSHIFT)
|
||||
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||
if (p->respawn)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
#include "k_kart.h"
|
||||
#include "r_fps.h"
|
||||
|
||||
#define MINZ (FRACUNIT*4)
|
||||
#define MINZ (FRACUNIT*16)
|
||||
#define BASEYCENTER (BASEVIDHEIGHT/2)
|
||||
|
||||
typedef struct
|
||||
|
|
|
|||
Loading…
Reference in a new issue