fp: Invert the move-ability flag on entity type check
This commit is contained in:
parent
7a2bebf3c3
commit
589d56dd82
@ -641,7 +641,7 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input
|
|||||||
Dqn_V2 acceleration_meters_per_s = {};
|
Dqn_V2 acceleration_meters_per_s = {};
|
||||||
if (game->clicked_entity == entity->handle) {
|
if (game->clicked_entity == entity->handle) {
|
||||||
if (entity->flags & (FP_GameEntityFlag_MoveByKeyboard | FP_GameEntityFlag_MoveByGamepad)) {
|
if (entity->flags & (FP_GameEntityFlag_MoveByKeyboard | FP_GameEntityFlag_MoveByGamepad)) {
|
||||||
bool move_entity = false;
|
bool move_entity = true;
|
||||||
switch (entity->type) {
|
switch (entity->type) {
|
||||||
case FP_EntityType_Terry: {
|
case FP_EntityType_Terry: {
|
||||||
auto *state = DQN_CAST(FP_EntityTerryState *)&entity->action.state;
|
auto *state = DQN_CAST(FP_EntityTerryState *)&entity->action.state;
|
||||||
@ -653,8 +653,8 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input
|
|||||||
move_entity = *state == FP_EntitySmoochieState_Run || *state == FP_EntitySmoochieState_Idle;
|
move_entity = *state == FP_EntitySmoochieState_Run || *state == FP_EntitySmoochieState_Idle;
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case FP_EntityType_Merchant: move_entity = true; break;
|
case FP_EntityType_Merchant: break;
|
||||||
case FP_EntityType_Nil: move_entity = true; break;
|
case FP_EntityType_Nil: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (move_entity) {
|
if (move_entity) {
|
||||||
|
Loading…
Reference in New Issue
Block a user