Merge branch 'master' into opengl-new-patch-features-support

This commit is contained in:
Monster Iestyn 2019-02-13 18:08:17 +00:00
commit 55e3e99a94
2 changed files with 50 additions and 45 deletions

View file

@ -8085,7 +8085,6 @@ void P_MobjThinker(mobj_t *mobj)
// Invisible/bouncing mode. // Invisible/bouncing mode.
else else
{ {
fixed_t droneboxmandiff = max(mobj->height - droneman->height, 0);
INT32 i; INT32 i;
boolean bonustime = false; boolean bonustime = false;
fixed_t zcomp; fixed_t zcomp;
@ -10298,8 +10297,9 @@ You should think about modifying the deathmatch starts to take full advantage of
{ {
case MT_EMBLEM: case MT_EMBLEM:
{ {
INT32 i; INT32 j;
emblem_t *emblem = M_GetLevelEmblems(gamemap); emblem_t *emblem = M_GetLevelEmblems(gamemap);
skincolors_t emcolor;
while (emblem) while (emblem)
{ {
@ -10315,16 +10315,17 @@ You should think about modifying the deathmatch starts to take full advantage of
break; break;
} }
i = emblem - emblemlocations; j = emblem - emblemlocations;
I_Assert(emblemlocations[i].sprite >= 'A' && emblemlocations[i].sprite <= 'Z'); I_Assert(emblemlocations[j].sprite >= 'A' && emblemlocations[j].sprite <= 'Z');
P_SetMobjState(mobj, mobj->info->spawnstate + (emblemlocations[i].sprite - 'A')); P_SetMobjState(mobj, mobj->info->spawnstate + (emblemlocations[j].sprite - 'A'));
mobj->health = i + 1; mobj->health = j + 1;
mobj->color = (UINT8)M_GetEmblemColor(&emblemlocations[i]); emcolor = M_GetEmblemColor(&emblemlocations[j]); // workaround for compiler complaint about bad function casting
mobj->color = (UINT8)emcolor;
if (emblemlocations[i].collected if (emblemlocations[j].collected
|| (emblemlocations[i].type == ET_SKIN && emblemlocations[i].var != players[0].skin)) || (emblemlocations[j].type == ET_SKIN && emblemlocations[j].var != players[0].skin))
{ {
P_UnsetThingPosition(mobj); P_UnsetThingPosition(mobj);
mobj->flags |= MF_NOCLIP; mobj->flags |= MF_NOCLIP;
@ -10337,10 +10338,10 @@ You should think about modifying the deathmatch starts to take full advantage of
{ {
mobj->frame &= ~FF_TRANSMASK; mobj->frame &= ~FF_TRANSMASK;
if (emblemlocations[i].type == ET_GLOBAL) if (emblemlocations[j].type == ET_GLOBAL)
{ {
mobj->reactiontime = emblemlocations[i].var; mobj->reactiontime = emblemlocations[j].var;
if (emblemlocations[i].var & GE_NIGHTSITEM) if (emblemlocations[j].var & GE_NIGHTSITEM)
{ {
mobj->flags |= MF_NIGHTSITEM; mobj->flags |= MF_NIGHTSITEM;
mobj->flags &= ~MF_SPECIAL; mobj->flags &= ~MF_SPECIAL;
@ -10942,35 +10943,37 @@ ML_EFFECT4 : Don't clip inside the ground
} }
// spawn visual elements // spawn visual elements
mobj_t *goalpost = P_SpawnMobjFromMobj(mobj, 0, 0, goaloffset, MT_NIGHTSDRONE_GOAL);
mobj_t *sparkle = P_SpawnMobjFromMobj(mobj, 0, 0, sparkleoffset, MT_NIGHTSDRONE_SPARKLING);
mobj_t *droneman = P_SpawnMobjFromMobj(mobj, 0, 0, dronemanoffset, MT_NIGHTSDRONE_MAN);
P_SetTarget(&mobj->target, goalpost);
P_SetTarget(&goalpost->target, sparkle);
P_SetTarget(&goalpost->tracer, droneman);
// correct Z position
if (flip)
{ {
P_TeleportMove(goalpost, goalpost->x, goalpost->y, mobj->z + goaloffset); mobj_t *goalpost = P_SpawnMobjFromMobj(mobj, 0, 0, goaloffset, MT_NIGHTSDRONE_GOAL);
P_TeleportMove(sparkle, sparkle->x, sparkle->y, mobj->z + sparkleoffset); mobj_t *sparkle = P_SpawnMobjFromMobj(mobj, 0, 0, sparkleoffset, MT_NIGHTSDRONE_SPARKLING);
P_TeleportMove(droneman, droneman->x, droneman->y, mobj->z + dronemanoffset); mobj_t *droneman = P_SpawnMobjFromMobj(mobj, 0, 0, dronemanoffset, MT_NIGHTSDRONE_MAN);
P_SetTarget(&mobj->target, goalpost);
P_SetTarget(&goalpost->target, sparkle);
P_SetTarget(&goalpost->tracer, droneman);
// correct Z position
if (flip)
{
P_TeleportMove(goalpost, goalpost->x, goalpost->y, mobj->z + goaloffset);
P_TeleportMove(sparkle, sparkle->x, sparkle->y, mobj->z + sparkleoffset);
P_TeleportMove(droneman, droneman->x, droneman->y, mobj->z + dronemanoffset);
}
// Remember position preference for later
mobj->flags &= ~(MF_SLIDEME | MF_GRENADEBOUNCE);
if (topaligned)
mobj->flags |= MF_SLIDEME;
else if (middlealigned)
mobj->flags |= MF_GRENADEBOUNCE;
else if (!bottomoffsetted)
mobj->flags |= MF_SLIDEME | MF_GRENADEBOUNCE;
// Remember old Z position and flags for correction detection
goalpost->movefactor = mobj->z;
goalpost->friction = mobj->height;
goalpost->threshold = mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE);
} }
// Remember position preference for later
mobj->flags &= ~(MF_SLIDEME | MF_GRENADEBOUNCE);
if (topaligned)
mobj->flags |= MF_SLIDEME;
else if (middlealigned)
mobj->flags |= MF_GRENADEBOUNCE;
else if (!bottomoffsetted)
mobj->flags |= MF_SLIDEME | MF_GRENADEBOUNCE;
// Remember old Z position and flags for correction detection
goalpost->movefactor = mobj->z;
goalpost->friction = mobj->height;
goalpost->threshold = mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE);
} }
break; break;
case MT_HIVEELEMENTAL: case MT_HIVEELEMENTAL:

View file

@ -6234,15 +6234,17 @@ static void P_DoNiGHTSCapsule(player_t *player)
// //
static void P_MoveNiGHTSToDrone(player_t *player) static void P_MoveNiGHTSToDrone(player_t *player)
{ {
boolean flip, topaligned, middlealigned, bottomoffsetted;
fixed_t droneboxmandiff, zofs;
if (!player->drone) if (!player->drone)
return; return;
boolean flip = player->drone->flags2 & MF2_OBJECTFLIP; flip = player->drone->flags2 & MF2_OBJECTFLIP;
boolean topaligned = (player->drone->flags & MF_SLIDEME) && !(player->drone->flags & MF_GRENADEBOUNCE); topaligned = (player->drone->flags & MF_SLIDEME) && !(player->drone->flags & MF_GRENADEBOUNCE);
boolean middlealigned = (player->drone->flags & MF_GRENADEBOUNCE) && !(player->drone->flags & MF_SLIDEME); middlealigned = (player->drone->flags & MF_GRENADEBOUNCE) && !(player->drone->flags & MF_SLIDEME);
boolean bottomoffsetted = !(player->drone->flags & MF_SLIDEME) && !(player->drone->flags & MF_GRENADEBOUNCE); bottomoffsetted = !(player->drone->flags & MF_SLIDEME) && !(player->drone->flags & MF_GRENADEBOUNCE);
fixed_t droneboxmandiff = max(player->drone->height - player->mo->height, 0); droneboxmandiff = max(player->drone->height - player->mo->height, 0);
fixed_t zofs;
if (!flip) if (!flip)
{ {