From 944655ff94cfdfc5c1abdb3aa4e5b013e04a0e67 Mon Sep 17 00:00:00 2001 From: qndel Date: Thu, 12 May 2022 08:25:55 +0200 Subject: [PATCH] fix typos (#4568) --- Source/msg.cpp | 14 +++++++------- Source/setmaps.cpp | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/msg.cpp b/Source/msg.cpp index d964bbbb8..51ea1672d 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -69,11 +69,11 @@ uint8_t sgbDeltaChunks; std::list MegaPktList; Item ItemLimbo; -/** @brief Last send player command for the local player. */ -TCmdLocParam4 lastSendPlayerCmd; +/** @brief Last sent player command for the local player. */ +TCmdLocParam4 lastSentPlayerCmd; /** - * @brief Throttles that a player command is only send once per game tick. + * @brief Throttles that a player command is only sent once per game tick. * This is a workaround for a desync that happens when a command is processed in different game ticks for different clients. See https://github.com/diasurgical/devilutionX/issues/2681 for details. * When a proper fix is implemented this workaround can be removed. */ @@ -109,13 +109,13 @@ bool WasPlayerCmdAlreadyRequested(_cmd_id bCmd, Point position = {}, uint16_t wP TCmdLocParam4 newSendParam = { bCmd, static_cast(position.x), static_cast(position.y), wParam1, wParam2, wParam3, wParam4 }; - if (lastSendPlayerCmd.bCmd == newSendParam.bCmd && lastSendPlayerCmd.x == newSendParam.x && lastSendPlayerCmd.y == newSendParam.y - && lastSendPlayerCmd.wParam1 == newSendParam.wParam1 && lastSendPlayerCmd.wParam2 == newSendParam.wParam2 && lastSendPlayerCmd.wParam3 == newSendParam.wParam3 && lastSendPlayerCmd.wParam4 == newSendParam.wParam4) { + if (lastSentPlayerCmd.bCmd == newSendParam.bCmd && lastSentPlayerCmd.x == newSendParam.x && lastSentPlayerCmd.y == newSendParam.y + && lastSentPlayerCmd.wParam1 == newSendParam.wParam1 && lastSentPlayerCmd.wParam2 == newSendParam.wParam2 && lastSentPlayerCmd.wParam3 == newSendParam.wParam3 && lastSentPlayerCmd.wParam4 == newSendParam.wParam4) { // Command already send in this game tick => don't send again / throttle return true; } - lastSendPlayerCmd = newSendParam; + lastSentPlayerCmd = newSendParam; return false; } @@ -2015,7 +2015,7 @@ DWORD OnOpenCrypt(const TCmd *pCmd) void ClearLastSendPlayerCmd() { - lastSendPlayerCmd = {}; + lastSentPlayerCmd = {}; } void msg_send_drop_pkt(int pnum, int reason) diff --git a/Source/setmaps.cpp b/Source/setmaps.cpp index ff5e1e0b5..2ed04b272 100644 --- a/Source/setmaps.cpp +++ b/Source/setmaps.cpp @@ -112,7 +112,7 @@ void AddVileObjs() ObjectAtPosition({ 35, 36 })->InitializeLoadedObject({ { 7, 11 }, { 6, 7 } }, 3); } -void SetmapTransparancy(const char *path) +void SetMapTransparency(const char *path) { auto dunData = LoadFileInMem(path); @@ -172,7 +172,7 @@ void LoadSetMap() LoadL1Dungeon("Levels\\L1Data\\Lv1MazeB.DUN", 20, 50); LoadPalette("Levels\\L1Data\\L1_5.pal"); AddL1Objs(0, 0, MAXDUNX, MAXDUNY); - SetmapTransparancy("Levels\\L1Data\\Lv1MazeA.DUN"); + SetMapTransparency("Levels\\L1Data\\Lv1MazeA.DUN"); break; case SL_POISONWATER: if (Quests[Q_PWATER]._qactive == QUEST_INIT) @@ -193,7 +193,7 @@ void LoadSetMap() LoadPalette("Levels\\L1Data\\L1_2.pal"); AddL1Objs(0, 0, MAXDUNX, MAXDUNY); AddVileObjs(); - SetmapTransparancy("Levels\\L1Data\\Vile1.DUN"); + SetMapTransparency("Levels\\L1Data\\Vile1.DUN"); InitNoTriggers(); break; case SL_NONE: