fp: Fix strafe billboard showing key bind for strafe, fix strafe regression

This commit is contained in:
doyle 2023-10-22 22:43:36 +11:00
parent b78338bafc
commit 396aea5eb4

View File

@ -1962,7 +1962,7 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input
acceleration_meters_per_s *= 1.f; // TODO(doyle): Penalise the player acceleration_meters_per_s *= 1.f; // TODO(doyle): Penalise the player
} }
if (!FP_Game_KeyBindIsPressed(input, controls, controls->strafe)) { if (!FP_Game_KeyBindIsDown(input, controls, controls->strafe)) {
if (acceleration_meters_per_s.x) if (acceleration_meters_per_s.x)
entity->direction = acceleration_meters_per_s.x > 0.f ? FP_GameDirection_Right : FP_GameDirection_Left; entity->direction = acceleration_meters_per_s.x > 0.f ? FP_GameDirection_Right : FP_GameDirection_Left;
else if (acceleration_meters_per_s.y) else if (acceleration_meters_per_s.y)
@ -2780,7 +2780,7 @@ void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *renderer,
} break; } break;
case FP_EntityBillboardState_Strafe: { case FP_EntityBillboardState_Strafe: {
key_bind = &controls->dash; key_bind = &controls->strafe;
draw_p = Dqn_Rect_InterpolatedPoint(world_hit_box, Dqn_V2_InitNx2(0.36f, -0.15f)); draw_p = Dqn_Rect_InterpolatedPoint(world_hit_box, Dqn_V2_InitNx2(0.36f, -0.15f));
colour = TELY_Colour_V4InitRGBU32(0xFF68A8); colour = TELY_Colour_V4InitRGBU32(0xFF68A8);
} break; } break;