From e57624799d1dc1b73bddf6208dd7d54735d2c552 Mon Sep 17 00:00:00 2001 From: Blake Dunlap Date: Wed, 27 May 2020 06:02:56 -0700 Subject: [PATCH] cherry pick: 0 = false, check for key exists. stop moving managers --- src/movement/Movement.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/movement/Movement.ts b/src/movement/Movement.ts index 1bd36306e..4d851d5d4 100644 --- a/src/movement/Movement.ts +++ b/src/movement/Movement.ts @@ -463,7 +463,7 @@ export class Movement { if (isPowerZerg(creep)) { return MovePriorities.powerCreep; } else { - return MovePriorities[creep.memory.role] || MovePriorities.default; + return (creep.memory.role in MovePriorities) ? MovePriorities[creep.memory.role] : MovePriorities.default; } } }