Blizzard / s2client-api

StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
1.66k stars 282 forks source link

A mistake in feature_layers example? #302

Closed monarchBacilluscoli closed 5 years ago

monarchBacilluscoli commented 5 years ago

In main() of feature_layer.cc, the first argument passed to function DrawFeatureLayerUnits8BPP() is m.unit_density(), but in DrawFeatureLayerUnits8BPP() funciton, it calls Matrix8BPPPlayers, which is a function displaying units in feature layer according to their alliance (I see it from the comments). So, is there anything wrong? Maybe m.unit_density() should be m.player_relative()?

Further more, if you have changed it, you will find the comments in Matrix8BPPPlayers()(in sc2_renderer.cc) are not right. Since the enemy will be colored in yellow not red as the comment says. So I guess the comments should be fixed, too.