mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Resolve #208.
* Tailsbots can't get into Minecarts. * Tailsbots will stop trying to move around when the player gets pw_carry, which usually means some sort of big gimmick is happening and trying to move along with it would make the tailsbot look stupid.
This commit is contained in:
parent
edc65a1a22
commit
f0e9bdd0ec
2 changed files with 6 additions and 3 deletions
|
|
@ -140,6 +140,9 @@ void B_BuildTiccmd(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward, boolean left, boolean right, boolean strafeleft, boolean straferight, boolean jump, boolean spin)
|
void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward, boolean left, boolean right, boolean strafeleft, boolean straferight, boolean jump, boolean spin)
|
||||||
{
|
{
|
||||||
|
// don't try to do stuff if your sonic is in a minecart or something
|
||||||
|
if (players[consoleplayer].powers[pw_carry])
|
||||||
|
return;
|
||||||
// Turn the virtual keypresses into ticcmd_t.
|
// Turn the virtual keypresses into ticcmd_t.
|
||||||
if (twodlevel || mo->flags2 & MF2_TWOD) {
|
if (twodlevel || mo->flags2 & MF2_TWOD) {
|
||||||
if (players[consoleplayer].climbing
|
if (players[consoleplayer].climbing
|
||||||
|
|
@ -218,7 +221,7 @@ boolean B_CheckRespawn(player_t *player)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Low ceiling, do not want!
|
// Low ceiling, do not want!
|
||||||
if (sonic->ceilingz - sonic->z < 2*sonic->height)
|
if (sonic->ceilingz - sonic->z < (sonic->player->exiting ? 6 : 3)*sonic->height) // increased for new camera height
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If you're dead, wait a few seconds to respawn.
|
// If you're dead, wait a few seconds to respawn.
|
||||||
|
|
|
||||||
|
|
@ -1765,7 +1765,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case MT_MINECARTSPAWNER:
|
case MT_MINECARTSPAWNER:
|
||||||
if (!special->fuse || player->powers[pw_carry] != CR_MINECART)
|
if (!player->bot && (special->fuse < TICRATE || player->powers[pw_carry] != CR_MINECART))
|
||||||
{
|
{
|
||||||
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);
|
||||||
|
|
@ -1775,7 +1775,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
P_ResetPlayer(player);
|
P_ResetPlayer(player);
|
||||||
player->pflags |= PF_JUMPDOWN;
|
player->pflags |= PF_JUMPDOWN;
|
||||||
player->powers[pw_carry] = CR_MINECART;
|
player->powers[pw_carry] = CR_MINECART;
|
||||||
toucher->player->pflags &= ~PF_APPLYAUTOBRAKE;
|
player->pflags &= ~PF_APPLYAUTOBRAKE;
|
||||||
P_SetTarget(&toucher->tracer, mcart);
|
P_SetTarget(&toucher->tracer, mcart);
|
||||||
toucher->momx = toucher->momy = toucher->momz = 0;
|
toucher->momx = toucher->momy = toucher->momz = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue