-
Notifications
You must be signed in to change notification settings - Fork 206
Conversation
Reviewers, can you check the additional flags at the BWAPI documentation and comment if further flags should be included? |
Looking at the list:
|
f582443
to
140f385
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made some nits, feel free to merge without addressing.
include/frame.h
Outdated
@@ -42,10 +42,24 @@ struct Order { | |||
}; | |||
|
|||
struct Unit { | |||
enum Flags { | |||
LockedDown = 0x0001, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be more clear in binary 0b0000000000000000...1
, or just 1 << n
?
@@ -42,10 +42,51 @@ struct Order { | |||
}; | |||
|
|||
struct Unit { | |||
enum Flags : int64_t { | |||
BeingConstructed = 1ll << 4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess it really doesn't matter but why does it start at 4? :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, I actually had the whole list of is* flags in there and then deleted a couple of them after Gabriel provided the necessary context :)
@@ -42,10 +42,51 @@ struct Order { | |||
}; | |||
|
|||
struct Unit { | |||
enum Flags : int64_t { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be uint64_t?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't matter much but I'll change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh, messed up the merge. I pushed this separately in cfa46b7.
There's a lot of unit status information accessible via BWAPI as booleans, and so far we restricted the information in TorchCraft to idle, detected and visible. However, flags like constructing can also be helpful in certain situations such as tracking a worker's progress. Hence, this includes a single 64-bit integer that stores various status bits. Furthermore, the conditions for including a unit in the frame sent to the client have been relaxed -- it's now upon the client to ignore units that are not of interest. Flags are 64-bit and expected to change frequently so they are included as absolute values in frame diffs.
There's a lot of unit status information accessible via BWAPI as booleans, and
so far we restricted the information in TorchCraft to idle, detected and
visible. However, flags like constructing can also be helpful in certain
situations such as tracking a worker's progress.
Hence, this includes a single 64-bit integer that stores various status bits.
Furthermore, the conditions for including a unit in the frame sent to the client
have been relaxed -- it's now upon the client to ignore units that are not of
interest.