From a46fee4d4e8c2f06560bb6d955f5694a1800ce88 Mon Sep 17 00:00:00 2001 From: melex750 Date: Wed, 15 Nov 2017 16:23:21 -0500 Subject: [PATCH] Don't reset timer in CBotStack::AllocateStack The timer is already reset in CBotProgram::Run. This prevents many cases where the game will hang or rendering is interrupted. This fixes behavior of the script example in #874. The script example in #971 doesn't hang the game anymore. --- src/CBot/CBotStack.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp index 5101bbf2..6e149e6b 100644 --- a/src/CBot/CBotStack.cpp +++ b/src/CBot/CBotStack.cpp @@ -63,7 +63,6 @@ CBotStack* CBotStack::AllocateStack() memset(p, 0, size); p->m_block = BlockVisibilityType::BLOCK; - m_timer = m_initimer; // sets the timer at the beginning CBotStack* pp = p; pp += MAXSTACK;