mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-02 14:12:47 +00:00
Merge branch 'spb-speed' into 'master'
Waypoints: thingarg3 is SPB speed (0-100) Closes #767 See merge request KartKrew/Kart!1963
This commit is contained in:
commit
1da25c45ca
2 changed files with 15 additions and 3 deletions
|
|
@ -790,12 +790,22 @@ static void SPBChase(mobj_t *spb, mobj_t *bestMobj)
|
|||
desiredSpeed = 20 * chase->scale;
|
||||
}
|
||||
|
||||
if (chasePlayer != NULL && chasePlayer->carry == CR_SLIDING)
|
||||
if (chasePlayer != NULL)
|
||||
{
|
||||
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);
|
||||
destPitch = R_PointToAngle2(0, spb->z, P_AproxDistance(spb->x - chase->x, spb->y - chase->y), chase->z);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue