mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Disable Minecart Spawners for players already riding a minecart
This commit is contained in:
parent
3d724f302d
commit
47b096a357
1 changed files with 19 additions and 15 deletions
|
@ -1807,8 +1807,13 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case MT_MINECARTSPAWNER:
|
case MT_MINECARTSPAWNER:
|
||||||
if (!player->bot && (special->fuse < TICRATE || player->powers[pw_carry] != CR_MINECART))
|
if (player->bot)
|
||||||
{
|
return;
|
||||||
|
if (special->fuse > TICRATE)
|
||||||
|
return;
|
||||||
|
if (player->powers[pw_carry] == CR_MINECART)
|
||||||
|
return;
|
||||||
|
|
||||||
mobj_t *mcart = P_SpawnMobj(special->x, special->y, special->z, MT_MINECART);
|
mobj_t *mcart = P_SpawnMobj(special->x, special->y, special->z, MT_MINECART);
|
||||||
P_SetTarget(&mcart->target, toucher);
|
P_SetTarget(&mcart->target, toucher);
|
||||||
mcart->angle = toucher->angle = player->drawangle = special->angle;
|
mcart->angle = toucher->angle = player->drawangle = special->angle;
|
||||||
|
@ -1823,7 +1828,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
|
|
||||||
special->fuse = 3*TICRATE;
|
special->fuse = 3*TICRATE;
|
||||||
special->flags2 |= MF2_DONTDRAW;
|
special->flags2 |= MF2_DONTDRAW;
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case MT_MINECARTEND:
|
case MT_MINECARTEND:
|
||||||
|
|
Loading…
Reference in a new issue