diff --git a/src/objects/spb.c b/src/objects/spb.c index 103d95726..89ac8f174 100644 --- a/src/objects/spb.c +++ b/src/objects/spb.c @@ -790,10 +790,20 @@ static void SPBChase(mobj_t *spb, mobj_t *bestMobj) desiredSpeed = 20 * chase->scale; } - if (chasePlayer != NULL && chasePlayer->carry == CR_SLIDING) + if (chasePlayer != NULL) { - // Hack for current sections to make them fair. - desiredSpeed = min(desiredSpeed, chasePlayer->speed / 2); + if (chasePlayer->carry == CR_SLIDING) + { + // Hack for current sections to make them fair. + desiredSpeed = min(desiredSpeed, chasePlayer->speed / 2); + } + + const mobj_t *waypoint = chasePlayer->currentwaypoint ? chasePlayer->currentwaypoint->mobj : NULL; + // thing_args[3]: SPB speed (0-100) + if (waypoint && waypoint->thing_args[3]) // 0 = default speed (unchanged) + { + desiredSpeed = desiredSpeed * waypoint->thing_args[3] / 100; + } } destAngle = R_PointToAngle2(spb->x, spb->y, chase->x, chase->y); diff --git a/src/p_mobj.c b/src/p_mobj.c index 058fa4df5..6e670a772 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -13378,6 +13378,8 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj) mobj->movefactor = 0; } + // thing_args[3]: SPB speed (objects/spb.c) + // Sryder 2018-12-7: Grabbed this from the old MT_BOSS3WAYPOINT section so they'll be in the waypointcap instead P_SetTarget(&mobj->tracer, waypointcap); P_SetTarget(&waypointcap, mobj);