mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Bot Controller uses args
This commit is contained in:
parent
983304f361
commit
1ab2b4a897
3 changed files with 24 additions and 6 deletions
12
src/k_bot.c
12
src/k_bot.c
|
|
@ -510,8 +510,8 @@ fixed_t K_BotRubberband(player_t *player)
|
||||||
|
|
||||||
if (botController != NULL)
|
if (botController != NULL)
|
||||||
{
|
{
|
||||||
// No Climb Flag: Disable rubberbanding
|
// Disable rubberbanding
|
||||||
if (botController->flags & ML_NOCLIMB)
|
if (botController->args[1] & TMBOT_NORUBBERBAND)
|
||||||
{
|
{
|
||||||
return FRACUNIT;
|
return FRACUNIT;
|
||||||
}
|
}
|
||||||
|
|
@ -931,7 +931,7 @@ static void K_BotTrick(player_t *player, ticcmd_t *cmd, line_t *botController)
|
||||||
|
|
||||||
if (player->trickpanel == 1)
|
if (player->trickpanel == 1)
|
||||||
{
|
{
|
||||||
INT32 type = (sides[botController->sidenum[0]].rowoffset / FRACUNIT);
|
INT32 type = botController->args[0];
|
||||||
|
|
||||||
// Y Offset: Trick type
|
// Y Offset: Trick type
|
||||||
switch (type)
|
switch (type)
|
||||||
|
|
@ -1318,7 +1318,7 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (botController != NULL && (botController->flags & ML_NOSKEW)) // FIXME: UDMF-ify
|
if (botController != NULL && (botController->args[1] & TMBOT_NOCONTROL)) // FIXME: UDMF-ify
|
||||||
{
|
{
|
||||||
// Disable bot controls entirely.
|
// Disable bot controls entirely.
|
||||||
return;
|
return;
|
||||||
|
|
@ -1326,12 +1326,12 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
destangle = player->mo->angle;
|
destangle = player->mo->angle;
|
||||||
|
|
||||||
if (botController != NULL && (botController->flags & ML_SKEWTD)) // FIXME: UDMF-ify
|
if (botController != NULL && (botController->args[1] & TMBOT_FORCEDIR)) // FIXME: UDMF-ify
|
||||||
{
|
{
|
||||||
const fixed_t dist = DEFAULT_WAYPOINT_RADIUS * player->mo->scale;
|
const fixed_t dist = DEFAULT_WAYPOINT_RADIUS * player->mo->scale;
|
||||||
|
|
||||||
// X Offset: Movement direction
|
// X Offset: Movement direction
|
||||||
destangle = FixedAngle(sides[botController->sidenum[0]].textureoffset);
|
destangle = FixedAngle(botController->args[2] * FRACUNIT);
|
||||||
|
|
||||||
// Overwritten prediction
|
// Overwritten prediction
|
||||||
predict = Z_Calloc(sizeof(botprediction_t), PU_STATIC, NULL);
|
predict = Z_Calloc(sizeof(botprediction_t), PU_STATIC, NULL);
|
||||||
|
|
|
||||||
|
|
@ -5785,6 +5785,17 @@ static void P_ConvertBinaryLinedefTypes(void)
|
||||||
if (lines[i].flags & ML_NOCLIMB)
|
if (lines[i].flags & ML_NOCLIMB)
|
||||||
lines[i].args[0] |= TMCRF_FRONTONLY;
|
lines[i].args[0] |= TMCRF_FRONTONLY;
|
||||||
break;
|
break;
|
||||||
|
case 2004: //Bot controller
|
||||||
|
botController->args[0] = sides[botController->sidenum[0]].rowoffset / FRACUNIT;
|
||||||
|
|
||||||
|
if (lines[i].flags & ML_NOCLIMB)
|
||||||
|
lines[i].args[1] |= TMBOT_NORUBBERBAND;
|
||||||
|
if (lines[i].flags & ML_NOSKEW)
|
||||||
|
lines[i].args[1] |= TMBOT_NOCONTROL;
|
||||||
|
if (lines[i].flags & ML_SKEWTD)
|
||||||
|
lines[i].args[1] |= TMBOT_FORCEDIR;
|
||||||
|
|
||||||
|
botController->args[2] = sides[botController->sidenum[0]].textureoffset / FRACUNIT;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -494,6 +494,13 @@ typedef enum
|
||||||
TMCRF_FRONTONLY = 1,
|
TMCRF_FRONTONLY = 1,
|
||||||
} textmapcrossrespawnflags_t;
|
} textmapcrossrespawnflags_t;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
TMBOT_NORUBBERBAND = 1,
|
||||||
|
TMBOT_NOCONTROL = 1<<1,
|
||||||
|
TMBOT_FORCEDIR = 1<<2,
|
||||||
|
} textmapbotcontroller_t;
|
||||||
|
|
||||||
// GETSECSPECIAL (specialval, section)
|
// GETSECSPECIAL (specialval, section)
|
||||||
//
|
//
|
||||||
// Pulls out the special # from a particular section.
|
// Pulls out the special # from a particular section.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue