1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Basic code review, remove unused code from serializers

This commit is contained in:
Ivan Savenko
2025-04-01 17:21:17 +03:00
parent d1d2cf4189
commit 586620a290
15 changed files with 19 additions and 91 deletions

View File

@@ -802,7 +802,7 @@ bool CGameHandler::moveHero(ObjectInstanceID hid, int3 dst, EMovementMode moveme
// not turn of that hero or player can't simply teleport hero (at least not with this function)
if(!h || (asker != PlayerColor::NEUTRAL && movementMode != EMovementMode::STANDARD))
{
if(h && getStartInfo()->turnTimerInfo.isEnabled() && gameState()->players[h->getOwner()].turnTimer.turnTimer == 0)
if(h && getStartInfo()->turnTimerInfo.isEnabled() && gameState()->players.at(h->getOwner()).turnTimer.turnTimer == 0)
return true; //timer expired, no error
logGlobal->error("Illegal call to move hero!");