mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Merge branch 'gfz3_laser' into 'master'
GFZ3 Unfuckening Some tweaks to the GFZ3 Eggmobile's behaviour to make it less frustrating for old and new players alike. * GFZ3 Eggmobile's laser won't change its angle when you move left and right anymore. * Changed because its ability to move quickly was extremely punishing for new players (see ProJared's youtube video on the matter). * http://gfycat.com/PassionateUnknownAgama (the twitching on the third laser has been fixed since this was recorded) * GFZ3 Eggmobile will, when too far away from the ground and moving upwards, slow itself down vertically. * This was punishing and annoying for both old and new players alike. * http://gfycat.com/CornyLeftDungbeetle (old values - the typical settling height is slightly lower now) See merge request !42
This commit is contained in:
commit
acfbce21c9
2 changed files with 21 additions and 6 deletions
|
@ -2134,13 +2134,15 @@ void A_Boss1Laser(mobj_t *actor)
|
||||||
if (!(actor->spawnpoint && actor->spawnpoint->options & MTF_AMBUSH))
|
if (!(actor->spawnpoint && actor->spawnpoint->options & MTF_AMBUSH))
|
||||||
{
|
{
|
||||||
point = P_SpawnMobj(x + P_ReturnThrustX(actor, actor->angle, actor->radius), y + P_ReturnThrustY(actor, actor->angle, actor->radius), actor->z - actor->height / 2, MT_EGGMOBILE_TARGET);
|
point = P_SpawnMobj(x + P_ReturnThrustX(actor, actor->angle, actor->radius), y + P_ReturnThrustY(actor, actor->angle, actor->radius), actor->z - actor->height / 2, MT_EGGMOBILE_TARGET);
|
||||||
|
point->angle = actor->angle;
|
||||||
point->fuse = actor->tics+1;
|
point->fuse = actor->tics+1;
|
||||||
P_SetTarget(&point->target, actor->target);
|
P_SetTarget(&point->target, actor->target);
|
||||||
P_SetTarget(&actor->target, point);
|
P_SetTarget(&actor->target, point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* -- the following was relevant when the MT_EGGMOBILE_TARGET was allowed to move left and right from its path
|
||||||
else if (actor->target && !(actor->spawnpoint && actor->spawnpoint->options & MTF_AMBUSH))
|
else if (actor->target && !(actor->spawnpoint && actor->spawnpoint->options & MTF_AMBUSH))
|
||||||
actor->angle = R_PointToAngle2(x, y, actor->target->x, actor->target->y);
|
actor->angle = R_PointToAngle2(x, y, actor->target->x, actor->target->y);*/
|
||||||
|
|
||||||
if (actor->spawnpoint && actor->spawnpoint->options & MTF_AMBUSH)
|
if (actor->spawnpoint && actor->spawnpoint->options & MTF_AMBUSH)
|
||||||
angle = FixedAngle(FixedDiv(actor->tics*160*FRACUNIT, actor->state->tics*FRACUNIT) + 10*FRACUNIT);
|
angle = FixedAngle(FixedDiv(actor->tics*160*FRACUNIT, actor->state->tics*FRACUNIT) + 10*FRACUNIT);
|
||||||
|
@ -2190,11 +2192,16 @@ void A_Boss1Laser(mobj_t *actor)
|
||||||
// var1:
|
// var1:
|
||||||
// 0 - accelerative focus with friction
|
// 0 - accelerative focus with friction
|
||||||
// 1 - steady focus with fixed movement speed
|
// 1 - steady focus with fixed movement speed
|
||||||
// var2 = unused
|
// anything else - don't move
|
||||||
|
// var2:
|
||||||
|
// 0 - don't trace target, just move forwards
|
||||||
|
// & 1 - change horizontal angle
|
||||||
|
// & 2 - change vertical angle
|
||||||
//
|
//
|
||||||
void A_FocusTarget(mobj_t *actor)
|
void A_FocusTarget(mobj_t *actor)
|
||||||
{
|
{
|
||||||
INT32 locvar1 = var1;
|
INT32 locvar1 = var1;
|
||||||
|
INT32 locvar2 = var2;
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_CallAction("A_FocusTarget", actor))
|
if (LUA_CallAction("A_FocusTarget", actor))
|
||||||
return;
|
return;
|
||||||
|
@ -2203,9 +2210,9 @@ void A_FocusTarget(mobj_t *actor)
|
||||||
if (actor->target)
|
if (actor->target)
|
||||||
{
|
{
|
||||||
fixed_t speed = FixedMul(actor->info->speed, actor->scale);
|
fixed_t speed = FixedMul(actor->info->speed, actor->scale);
|
||||||
fixed_t dist = R_PointToDist2(actor->x, actor->y, actor->target->x, actor->target->y);
|
fixed_t dist = (locvar2 ? R_PointToDist2(actor->x, actor->y, actor->target->x, actor->target->y) : speed+1);
|
||||||
angle_t vangle = R_PointToAngle2(actor->z , 0, actor->target->z + (actor->target->height>>1), dist);
|
angle_t hangle = ((locvar2 & 1) ? R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y) : actor->angle);
|
||||||
angle_t hangle = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y);
|
angle_t vangle = ((locvar2 & 2) ? R_PointToAngle2(actor->z , 0, actor->target->z + (actor->target->height>>1), dist) : ANGLE_90);
|
||||||
switch(locvar1)
|
switch(locvar1)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|
10
src/p_mobj.c
10
src/p_mobj.c
|
@ -4551,7 +4551,15 @@ static void P_Boss1Thinker(mobj_t *mobj)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mobj->state != &states[mobj->info->spawnstate] && mobj->health > 0 && mobj->flags & MF_FLOAT && !(mobj->flags2 & MF2_SKULLFLY))
|
if (mobj->flags2 & MF2_SKULLFLY)
|
||||||
|
{
|
||||||
|
fixed_t dist = (mobj->eflags & MFE_VERTICALFLIP)
|
||||||
|
? ((mobj->ceilingz-(2*mobj->height)) - (mobj->z+mobj->height))
|
||||||
|
: (mobj->z - (mobj->floorz+(2*mobj->height)));
|
||||||
|
if (dist > 0 && P_MobjFlip(mobj)*mobj->momz > 0)
|
||||||
|
mobj->momz = FixedMul(mobj->momz, FRACUNIT - (dist>>12));
|
||||||
|
}
|
||||||
|
else if (mobj->state != &states[mobj->info->spawnstate] && mobj->health > 0 && mobj->flags & MF_FLOAT)
|
||||||
mobj->momz = FixedMul(mobj->momz,7*FRACUNIT/8);
|
mobj->momz = FixedMul(mobj->momz,7*FRACUNIT/8);
|
||||||
|
|
||||||
if (mobj->state == &states[mobj->info->meleestate]
|
if (mobj->state == &states[mobj->info->meleestate]
|
||||||
|
|
Loading…
Reference in a new issue