1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-08 23:22:25 +02:00

code review

This commit is contained in:
Laserlicht
2025-09-15 01:02:59 +02:00
parent a303c01ea2
commit 87d0c9a3cf

View File

@@ -679,5 +679,6 @@ bool AdventureMapShortcuts::optionHeroBoat(EPathfindingLayer layer)
bool AdventureMapShortcuts::optionHeroDig()
{
return optionInMapView() && GAME->interface()->localState->getCurrentHero() != nullptr && GAME->interface()->localState->getCurrentHero()->diggingStatus() == EDiggingStatus::CAN_DIG;
auto hero = GAME->interface()->localState->getCurrentHero();
return optionInMapView() && hero && hero->diggingStatus() == EDiggingStatus::CAN_DIG;
}