mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Checkpoint players at star post exact location with Ambush flag
This commit is contained in:
parent
52d9c08b71
commit
fa8efa97e4
1 changed files with 13 additions and 4 deletions
|
|
@ -1453,6 +1453,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
|
|
||||||
if (cv_coopstarposts.value && G_GametypeUsesCoopStarposts() && (netgame || multiplayer))
|
if (cv_coopstarposts.value && G_GametypeUsesCoopStarposts() && (netgame || multiplayer))
|
||||||
{
|
{
|
||||||
|
mobj_t *checkbase = (special->spawnpoint && (special->spawnpoint->options & MTF_AMBUSH)) ? special : toucher;
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (playeringame[i])
|
if (playeringame[i])
|
||||||
|
|
@ -1461,8 +1462,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
players[i].starposttime = leveltime;
|
players[i].starposttime = leveltime;
|
||||||
players[i].starpostx = player->mo->x>>FRACBITS;
|
players[i].starpostx = checkbase->x>>FRACBITS;
|
||||||
players[i].starposty = player->mo->y>>FRACBITS;
|
players[i].starposty = checkbase->y>>FRACBITS;
|
||||||
players[i].starpostz = special->z>>FRACBITS;
|
players[i].starpostz = special->z>>FRACBITS;
|
||||||
players[i].starpostangle = special->angle;
|
players[i].starpostangle = special->angle;
|
||||||
players[i].starpostscale = player->mo->destscale;
|
players[i].starpostscale = player->mo->destscale;
|
||||||
|
|
@ -1483,8 +1484,16 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
{
|
{
|
||||||
// Save the player's time and position.
|
// Save the player's time and position.
|
||||||
player->starposttime = leveltime;
|
player->starposttime = leveltime;
|
||||||
player->starpostx = toucher->x>>FRACBITS;
|
if (special->spawnpoint && (special->spawnpoint->options & MTF_AMBUSH))
|
||||||
player->starposty = toucher->y>>FRACBITS;
|
{
|
||||||
|
player->starpostx = special->x>>FRACBITS;
|
||||||
|
player->starposty = special->y>>FRACBITS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player->starpostx = toucher->x>>FRACBITS;
|
||||||
|
player->starposty = toucher->y>>FRACBITS;
|
||||||
|
}
|
||||||
player->starpostz = special->z>>FRACBITS;
|
player->starpostz = special->z>>FRACBITS;
|
||||||
player->starpostangle = special->angle;
|
player->starpostangle = special->angle;
|
||||||
player->starpostscale = player->mo->destscale;
|
player->starpostscale = player->mo->destscale;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue