Merge branch 'master' into pet-robo

This commit is contained in:
Sally Coolatta 2020-05-24 17:18:02 -04:00
commit 9933687c6e
17 changed files with 147 additions and 88 deletions

View file

@ -514,6 +514,7 @@ extern tic_t mapreset;
extern boolean thwompsactive; extern boolean thwompsactive;
extern SINT8 spbplace; extern SINT8 spbplace;
extern tic_t bombflashtimer; // Used to avoid causing seizures if multiple mines explode close to you :)
extern boolean legitimateexit; extern boolean legitimateexit;
extern boolean comebackshowninfo; extern boolean comebackshowninfo;
extern tic_t curlap, bestlap; extern tic_t curlap, bestlap;

View file

@ -285,6 +285,7 @@ boolean thwompsactive; // Thwomps activate on lap 2
SINT8 spbplace; // SPB exists, give the person behind better items SINT8 spbplace; // SPB exists, give the person behind better items
// Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players) // Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players)
tic_t bombflashtimer = 0; // Cooldown before another FlashPal can be intialized by a bomb exploding near a displayplayer. Avoids seizures.
boolean legitimateexit; // Did this client actually finish the match? boolean legitimateexit; // Did this client actually finish the match?
boolean comebackshowninfo; // Have you already seen the "ATTACK OR PROTECT" message? boolean comebackshowninfo; // Have you already seen the "ATTACK OR PROTECT" message?
tic_t curlap; // Current lap time tic_t curlap; // Current lap time

View file

@ -223,40 +223,27 @@ UINT8 HWR_FogBlockAlpha(INT32 light, extracolormap_t *colormap) // Let's see if
return surfcolor.s.alpha; return surfcolor.s.alpha;
} }
static FUINT HWR_CalcWallLight(FUINT lightnum, fixed_t v1x, fixed_t v1y, fixed_t v2x, fixed_t v2y) // Lightnum = current light
// line = the seg to get the light offset from
static FUINT HWR_CalcWallLight(seg_t *line, FUINT lightnum)
{ {
INT16 finallight = lightnum; INT16 finallight = lightnum;
if (cv_grfakecontrast.value != 0) fixed_t extralight = 0;
if (cv_grfakecontrast.value == 1) // Smooth setting
extralight += line->hwLightOffset;
else
extralight += line->lightOffset * 8;
if (extralight != 0)
{ {
const UINT8 contrast = 8; finallight += extralight;
fixed_t extralight = 0;
if (cv_grfakecontrast.value == 2) // Smooth setting if (finallight < 0)
{ finallight = 0;
extralight = (-(contrast<<FRACBITS) + if (finallight > 255)
FixedDiv(AngleFixed(R_PointToAngle2(0, 0, finallight = 255;
abs(v1x - v2x),
abs(v1y - v2y))), 90<<FRACBITS)
* (contrast * 2)) >> FRACBITS;
}
else
{
if (v1y == v2y)
extralight = -contrast;
else if (v1x == v2x)
extralight = contrast;
}
if (extralight != 0)
{
finallight += extralight;
if (finallight < 0)
finallight = 0;
if (finallight > 255)
finallight = 255;
}
} }
return (FUINT)finallight; return (FUINT)finallight;
@ -618,7 +605,7 @@ void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, FSurfa
INT32 solid, i; INT32 solid, i;
lightlist_t * list = sector->lightlist; lightlist_t * list = sector->lightlist;
const UINT8 alpha = Surf->PolyColor.s.alpha; const UINT8 alpha = Surf->PolyColor.s.alpha;
FUINT lightnum = HWR_CalcWallLight(sector->lightlevel, v1x, v1y, v2x, v2y); FUINT lightnum = HWR_CalcWallLight(gr_curline, sector->lightlevel);
extracolormap_t *colormap = NULL; extracolormap_t *colormap = NULL;
realtop = top = wallVerts[3].y; realtop = top = wallVerts[3].y;
@ -647,12 +634,12 @@ void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, FSurfa
{ {
if (pfloor && (pfloor->flags & FF_FOG)) if (pfloor && (pfloor->flags & FF_FOG))
{ {
lightnum = HWR_CalcWallLight(pfloor->master->frontsector->lightlevel, v1x, v1y, v2x, v2y); lightnum = HWR_CalcWallLight(gr_curline, pfloor->master->frontsector->lightlevel);
colormap = pfloor->master->frontsector->extra_colormap; colormap = pfloor->master->frontsector->extra_colormap;
} }
else else
{ {
lightnum = HWR_CalcWallLight(*list[i].lightlevel, v1x, v1y, v2x, v2y); lightnum = HWR_CalcWallLight(gr_curline, *list[i].lightlevel);
colormap = list[i].extra_colormap; colormap = list[i].extra_colormap;
} }
} }
@ -933,7 +920,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
cliphigh = (float)(texturehpeg + (gr_curline->flength*FRACUNIT)); cliphigh = (float)(texturehpeg + (gr_curline->flength*FRACUNIT));
} }
lightnum = HWR_CalcWallLight(gr_frontsector->lightlevel, vs.x, vs.y, ve.x, ve.y); lightnum = HWR_CalcWallLight(gr_curline, gr_frontsector->lightlevel);
colormap = gr_frontsector->extra_colormap; colormap = gr_frontsector->extra_colormap;
if (gr_frontsector) if (gr_frontsector)
@ -1759,7 +1746,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
blendmode = PF_Fog|PF_NoTexture; blendmode = PF_Fog|PF_NoTexture;
lightnum = HWR_CalcWallLight(rover->master->frontsector->lightlevel, vs.x, vs.y, ve.x, ve.y); lightnum = HWR_CalcWallLight(gr_curline, rover->master->frontsector->lightlevel);
colormap = rover->master->frontsector->extra_colormap; colormap = rover->master->frontsector->extra_colormap;
Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(rover->master->frontsector->lightlevel, rover->master->frontsector->extra_colormap); Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(rover->master->frontsector->lightlevel, rover->master->frontsector->extra_colormap);
@ -1871,7 +1858,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
blendmode = PF_Fog|PF_NoTexture; blendmode = PF_Fog|PF_NoTexture;
lightnum = HWR_CalcWallLight(rover->master->frontsector->lightlevel, vs.x, vs.y, ve.x, ve.y); lightnum = HWR_CalcWallLight(gr_curline, rover->master->frontsector->lightlevel);
colormap = rover->master->frontsector->extra_colormap; colormap = rover->master->frontsector->extra_colormap;
Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(rover->master->frontsector->lightlevel, rover->master->frontsector->extra_colormap); Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(rover->master->frontsector->lightlevel, rover->master->frontsector->extra_colormap);

View file

@ -2244,6 +2244,12 @@ boolean K_ApplyOffroad(player_t *player)
return true; return true;
} }
static fixed_t K_FlameShieldDashVar(INT32 val)
{
// 1 second = 75% + 50% top speed
return (3*FRACUNIT/4) + (((val * FRACUNIT) / TICRATE) / 2);
}
// sets k_boostpower, k_speedboost, and k_accelboost to whatever we need it to be // sets k_boostpower, k_speedboost, and k_accelboost to whatever we need it to be
static void K_GetKartBoostPower(player_t *player) static void K_GetKartBoostPower(player_t *player)
{ {
@ -2280,10 +2286,7 @@ static void K_GetKartBoostPower(player_t *player)
ADDBOOST((3*FRACUNIT)/8, 3*FRACUNIT); // + 37.5% top speed, + 300% acceleration ADDBOOST((3*FRACUNIT)/8, 3*FRACUNIT); // + 37.5% top speed, + 300% acceleration
if (player->kartstuff[k_flamedash]) // Flame Shield dash if (player->kartstuff[k_flamedash]) // Flame Shield dash
{ ADDBOOST(K_FlameShieldDashVar(player->kartstuff[k_flamedash]), 3*FRACUNIT); // + infinite top speed, + 300% acceleration
fixed_t dashval = ((player->kartstuff[k_flamedash]<<FRACBITS) / TICRATE) / 2; // 1 second = +50% top speed
ADDBOOST((3*FRACUNIT)/4 + dashval, 3*FRACUNIT); // + infinite top speed, + 300% acceleration
}
if (player->kartstuff[k_startboost]) // Startup Boost if (player->kartstuff[k_startboost]) // Startup Boost
ADDBOOST(FRACUNIT/4, 6*FRACUNIT); // + 25% top speed, + 600% acceleration ADDBOOST(FRACUNIT/4, 6*FRACUNIT); // + 25% top speed, + 600% acceleration
@ -2903,10 +2906,7 @@ void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor) // A b
K_PlayPainSound(player->mo); K_PlayPainSound(player->mo);
if (P_IsDisplayPlayer(player)) if (P_IsDisplayPlayer(player))
{ P_StartQuake(64<<FRACBITS, 5);
quake.intensity = 64*FRACUNIT;
quake.time = 5;
}
player->kartstuff[k_instashield] = 15; player->kartstuff[k_instashield] = 15;
K_DropItems(player); K_DropItems(player);
@ -3070,6 +3070,8 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32
} }
} }
#define MINEQUAKEDIST 4096
// Spawns the purely visual explosion // Spawns the purely visual explosion
void K_SpawnMineExplosion(mobj_t *source, UINT8 color) void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
{ {
@ -3078,6 +3080,28 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
mobj_t *dust; mobj_t *dust;
mobj_t *truc; mobj_t *truc;
INT32 speed, speed2; INT32 speed, speed2;
INT32 pnum;
player_t *p;
// check for potential display players near the source so we can have a sick earthquake / flashpal.
for (pnum = 0; pnum < MAXPLAYERS; pnum++)
{
p = &players[pnum];
if (!playeringame[pnum] || !P_IsDisplayPlayer(p))
continue;
if (R_PointToDist2(p->mo->x, p->mo->y, source->x, source->y) < mapobjectscale*MINEQUAKEDIST)
{
P_StartQuake(55<<FRACBITS, 12);
if (!bombflashtimer && P_CheckSight(p->mo, source))
{
bombflashtimer = TICRATE*2;
P_FlashPal(p, 1, 1);
}
break; // we can break right now because quakes are global to all split players somehow.
}
}
K_MatchGenericExtraFlags(smoldering, source); K_MatchGenericExtraFlags(smoldering, source);
smoldering->tics = TICRATE*3; smoldering->tics = TICRATE*3;
@ -3148,6 +3172,8 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
} }
} }
#undef MINEQUAKEDIST
static mobj_t *K_SpawnKartMissile(mobj_t *source, mobjtype_t type, angle_t an, INT32 flags2, fixed_t speed) static mobj_t *K_SpawnKartMissile(mobj_t *source, mobjtype_t type, angle_t an, INT32 flags2, fixed_t speed)
{ {
mobj_t *th; mobj_t *th;
@ -6565,12 +6591,20 @@ INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue)
turnvalue = 5*turnvalue/4; turnvalue = 5*turnvalue/4;
} }
if (player->kartstuff[k_flamedash] > 0)
{
fixed_t multiplier = K_FlameShieldDashVar(player->kartstuff[k_flamedash]);
multiplier = FRACUNIT + (FixedDiv(multiplier, FRACUNIT/2) / 4);
turnvalue = FixedMul(turnvalue * FRACUNIT, multiplier) / FRACUNIT;
}
if (player->mo->eflags & (MFE_UNDERWATER|MFE_TOUCHWATER)) if (player->mo->eflags & (MFE_UNDERWATER|MFE_TOUCHWATER))
{ {
turnvalue = 3*turnvalue/2; turnvalue = 3*turnvalue/2;
} }
turnvalue = FixedMul(turnvalue * FRACUNIT, weightadjust) / FRACUNIT; // Weight has a small effect on turning // Weight has a small effect on turning
turnvalue = FixedMul(turnvalue * FRACUNIT, weightadjust) / FRACUNIT;
return turnvalue; return turnvalue;
} }
@ -6933,6 +6967,7 @@ void K_StripOther(player_t *player)
static INT32 K_FlameShieldMax(player_t *player) static INT32 K_FlameShieldMax(player_t *player)
{ {
UINT32 disttofinish = 0; UINT32 disttofinish = 0;
UINT32 distv = DISTVAR;
UINT8 numplayers = 0; UINT8 numplayers = 0;
UINT8 i; UINT8 i;
@ -6954,8 +6989,8 @@ static INT32 K_FlameShieldMax(player_t *player)
} }
disttofinish = player->distancetofinish - disttofinish; disttofinish = player->distancetofinish - disttofinish;
distv = FixedDiv(distv * FRACUNIT, mapobjectscale) / FRACUNIT;
return min(16, 1 + (disttofinish / DISTVAR)); return min(16, 1 + (disttofinish / distv));
} }
// //

View file

@ -1519,8 +1519,7 @@ static int lib_pStartQuake(lua_State *L)
quake.radius = luaL_optinteger(L, 4, 512*FRACUNIT); quake.radius = luaL_optinteger(L, 4, 512*FRACUNIT);
// These things are actually used in 2.1. // These things are actually used in 2.1.
quake.intensity = q_intensity; P_StartQuake(q_intensity, q_time);
quake.time = q_time;
return 0; return 0;
} }

View file

@ -3162,10 +3162,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
K_KartPainEnergyFling(player); K_KartPainEnergyFling(player);
if (P_IsDisplayPlayer(player)) if (P_IsDisplayPlayer(player))
{ P_StartQuake(32<<FRACBITS, 5);
quake.intensity = 32*FRACUNIT;
quake.time = 5;
}
} }
else else
K_SpinPlayer(player, source, 0, inflictor, false); K_SpinPlayer(player, source, 0, inflictor, false);

View file

@ -1856,7 +1856,7 @@ static boolean PIT_CheckLine(line_t *ld)
{ {
if (ld->flags & ML_IMPASSABLE) // block objects from moving through this linedef. if (ld->flags & ML_IMPASSABLE) // block objects from moving through this linedef.
return false; return false;
if (tmthing->player && ld->flags & ML_BLOCKPLAYERS) if (tmthing->player && !tmthing->player->spectator && ld->flags & ML_BLOCKPLAYERS)
return false; // SRB2Kart: Only block players, not items return false; // SRB2Kart: Only block players, not items
} }
@ -3222,7 +3222,7 @@ static boolean PTR_SlideTraverse(intercept_t *in)
if (li->flags & ML_IMPASSABLE) if (li->flags & ML_IMPASSABLE)
goto isblocking; goto isblocking;
if (slidemo->player && li->flags & ML_BLOCKPLAYERS) if (slidemo->player && !slidemo->player->spectator && li->flags & ML_BLOCKPLAYERS)
goto isblocking; goto isblocking;
} }

View file

@ -8724,7 +8724,7 @@ void P_MobjThinker(mobj_t *mobj)
fixed_t destx, desty; fixed_t destx, desty;
statenum_t curstate; statenum_t curstate;
statenum_t underlayst = S_NULL; statenum_t underlayst = S_NULL;
INT32 flamemax = mobj->target->player->kartstuff[k_flamelength] * flameseg; INT32 flamemax = 0;
if (!mobj->target || !mobj->target->health || !mobj->target->player if (!mobj->target || !mobj->target->health || !mobj->target->player
|| mobj->target->player->kartstuff[k_curshield] != KSHIELD_FLAME) || mobj->target->player->kartstuff[k_curshield] != KSHIELD_FLAME)
@ -8732,6 +8732,9 @@ void P_MobjThinker(mobj_t *mobj)
P_RemoveMobj(mobj); P_RemoveMobj(mobj);
return; return;
} }
flamemax = mobj->target->player->kartstuff[k_flamelength] * flameseg;
P_SetScale(mobj, (mobj->destscale = (5*mobj->target->scale)>>2)); P_SetScale(mobj, (mobj->destscale = (5*mobj->target->scale)>>2));
curstate = ((mobj->tics == 1) ? (mobj->state->nextstate) : ((statenum_t)(mobj->state-states))); curstate = ((mobj->tics == 1) ? (mobj->state->nextstate) : ((statenum_t)(mobj->state-states)));

View file

@ -1407,7 +1407,10 @@ static boolean Polyobj_rotate(polyobj_t *po, angle_t delta, UINT8 turnthings)
{ {
// update seg angles (used only by renderer) // update seg angles (used only by renderer)
for (i = 0; i < po->segCount; ++i) for (i = 0; i < po->segCount; ++i)
{
po->segs[i]->angle += delta; po->segs[i]->angle += delta;
P_UpdateSegLightOffset(po->segs[i]);
}
// update polyobject's angle // update polyobject's angle
po->angle += delta; po->angle += delta;

View file

@ -447,6 +447,27 @@ static inline float P_SegLengthFloat(seg_t *seg)
} }
#endif #endif
/** Updates the light offset
*
* \param li Seg to update the light offsets of
*/
void P_UpdateSegLightOffset(seg_t *li)
{
const UINT8 contrast = 16;
fixed_t extralight = 0;
extralight = -((fixed_t)contrast*FRACUNIT) +
FixedDiv(AngleFixed(R_PointToAngle2(0, 0,
abs(li->v1->x - li->v2->x),
abs(li->v1->y - li->v2->y))), 90*FRACUNIT) * ((fixed_t)contrast * 2);
// Between -2 and 2 for software, -16 and 16 for hardware
li->lightOffset = FixedFloor((extralight / 8) + (FRACUNIT / 2)) / FRACUNIT;
#ifdef HWRENDER
li->hwLightOffset = FixedFloor(extralight + (FRACUNIT / 2)) / FRACUNIT;
#endif
}
/** Loads the SEGS resource from a level. /** Loads the SEGS resource from a level.
* *
* \param lump Lump number of the SEGS resource. * \param lump Lump number of the SEGS resource.
@ -493,6 +514,8 @@ static void P_LoadRawSegs(UINT8 *data, size_t i)
li->numlights = 0; li->numlights = 0;
li->rlights = NULL; li->rlights = NULL;
P_UpdateSegLightOffset(li);
} }
} }

View file

@ -66,6 +66,7 @@ boolean P_DelWadFile(void);
#endif #endif
boolean P_RunSOC(const char *socfilename); boolean P_RunSOC(const char *socfilename);
void P_WriteThings(lumpnum_t lump); void P_WriteThings(lumpnum_t lump);
void P_UpdateSegLightOffset(seg_t *li);
size_t P_PrecacheLevelFlats(void); size_t P_PrecacheLevelFlats(void);
void P_AllocMapHeader(INT16 i); void P_AllocMapHeader(INT16 i);

View file

@ -8233,3 +8233,11 @@ static void P_SearchForDisableLinedefs(void)
} }
} }
} }
// Rudimentary function to start a earthquake.
// epicenter and radius are not yet used.
void P_StartQuake(fixed_t intensity, tic_t time)
{
quake.intensity = intensity;
quake.time = time;
}

View file

@ -19,6 +19,10 @@
extern mobj_t *skyboxmo[2]; extern mobj_t *skyboxmo[2];
// Something that should've been done long ago???
// We won't be using epicenter or radius anytime soon so I don't think it's worth it yet.
void P_StartQuake(fixed_t intensity, tic_t time);
// GETSECSPECIAL (specialval, section) // GETSECSPECIAL (specialval, section)
// //
// Pulls out the special # from a particular section. // Pulls out the special # from a particular section.

View file

@ -722,6 +722,9 @@ void P_Ticker(boolean run)
K_CalculateBattleWanted(); K_CalculateBattleWanted();
} }
if (bombflashtimer)
bombflashtimer--; // Bomb seizure prevention
if (quake.time) if (quake.time)
{ {
fixed_t ir = quake.intensity>>1; fixed_t ir = quake.intensity>>1;

View file

@ -565,6 +565,12 @@ typedef struct seg_s
polyobj_t *polyseg; polyobj_t *polyseg;
boolean dontrenderme; boolean dontrenderme;
#endif #endif
// Fake contrast calculated on level load
SINT8 lightOffset;
#ifdef HWRENDER
INT16 hwLightOffset;
#endif
} seg_t; } seg_t;
// //

View file

@ -412,10 +412,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
if (rlight->extra_colormap && rlight->extra_colormap->fog) if (rlight->extra_colormap && rlight->extra_colormap->fog)
; ;
else if (curline->v1->y == curline->v2->y) else
lightnum--; lightnum += curline->lightOffset;
else if (curline->v1->x == curline->v2->x)
lightnum++;
rlight->lightnum = lightnum; rlight->lightnum = lightnum;
} }
@ -435,10 +433,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
if (colfunc == R_DrawFogColumn_8 if (colfunc == R_DrawFogColumn_8
|| (frontsector->extra_colormap && frontsector->extra_colormap->fog)) || (frontsector->extra_colormap && frontsector->extra_colormap->fog))
; ;
else if (curline->v1->y == curline->v2->y) else
lightnum--; lightnum += curline->lightOffset;
else if (curline->v1->x == curline->v2->x)
lightnum++;
if (lightnum < 0) if (lightnum < 0)
walllights = scalelight[0]; walllights = scalelight[0];
@ -932,10 +928,8 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
if (pfloor->flags & FF_FOG || rlight->flags & FF_FOG || (rlight->extra_colormap && rlight->extra_colormap->fog)) if (pfloor->flags & FF_FOG || rlight->flags & FF_FOG || (rlight->extra_colormap && rlight->extra_colormap->fog))
; ;
else if (curline->v1->y == curline->v2->y) else
rlight->lightnum--; rlight->lightnum += curline->lightOffset;
else if (curline->v1->x == curline->v2->x)
rlight->lightnum++;
p++; p++;
} }
@ -955,11 +949,10 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
lightnum = R_FakeFlat(frontsector, &tempsec, &templight, &templight, false) lightnum = R_FakeFlat(frontsector, &tempsec, &templight, &templight, false)
->lightlevel >> LIGHTSEGSHIFT; ->lightlevel >> LIGHTSEGSHIFT;
if (pfloor->flags & FF_FOG || (frontsector->extra_colormap && frontsector->extra_colormap->fog)); if (pfloor->flags & FF_FOG || (frontsector->extra_colormap && frontsector->extra_colormap->fog))
else if (curline->v1->y == curline->v2->y) ;
lightnum--; else
else if (curline->v1->x == curline->v2->x) lightnum += curline->lightOffset;
lightnum++;
if (lightnum < 0) if (lightnum < 0)
walllights = scalelight[0]; walllights = scalelight[0];
@ -1492,10 +1485,8 @@ static void R_RenderSegLoop (void)
if (dc_lightlist[i].extra_colormap) if (dc_lightlist[i].extra_colormap)
; ;
else if (curline->v1->y == curline->v2->y) else
lightnum--; lightnum += curline->lightOffset;
else if (curline->v1->x == curline->v2->x)
lightnum++;
if (lightnum < 0) if (lightnum < 0)
xwalllights = scalelight[0]; xwalllights = scalelight[0];
@ -2639,10 +2630,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
// OPTIMIZE: get rid of LIGHTSEGSHIFT globally // OPTIMIZE: get rid of LIGHTSEGSHIFT globally
lightnum = (frontsector->lightlevel >> LIGHTSEGSHIFT); lightnum = (frontsector->lightlevel >> LIGHTSEGSHIFT);
if (curline->v1->y == curline->v2->y) lightnum += curline->lightOffset;
lightnum--;
else if (curline->v1->x == curline->v2->x)
lightnum++;
if (lightnum < 0) if (lightnum < 0)
walllights = scalelight[0]; walllights = scalelight[0];

View file

@ -84,7 +84,7 @@ static void CV_Gammaxxx_ONChange(void);
// - You can change them in software, // - You can change them in software,
// but they won't do anything. // but they won't do anything.
static CV_PossibleValue_t grgamma_cons_t[] = {{1, "MIN"}, {255, "MAX"}, {0, NULL}}; static CV_PossibleValue_t grgamma_cons_t[] = {{1, "MIN"}, {255, "MAX"}, {0, NULL}};
static CV_PossibleValue_t grfakecontrast_cons_t[] = {{0, "Off"}, {1, "Standard"}, {2, "Smooth"}, {0, NULL}}; static CV_PossibleValue_t grfakecontrast_cons_t[] = {{0, "Standard"}, {1, "Smooth"}, {0, NULL}};
consvar_t cv_grshaders = {"gr_shaders", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grshaders = {"gr_shaders", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_grfovchange = {"gr_fovchange", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grfovchange = {"gr_fovchange", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};