Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data for BattleCruiser weapon's are empty #314

Open
mboedigh opened this issue Jul 3, 2019 · 1 comment
Open

Data for BattleCruiser weapon's are empty #314

mboedigh opened this issue Jul 3, 2019 · 1 comment

Comments

@mboedigh
Copy link

mboedigh commented Jul 3, 2019

Code something like this (not actual tested code), fails assertion because weapons is empty.

const UnitTypes& data = client->getObservation()->GetUnitTypeData();
assert(!data[UnitTypeID(UNIT_TYPEID::TERRAN_BATTLECRUISER)].weapons.empty());

This was called in OnGameStart(). Many other units have their weapons data set properly. Here I've used game version Base74741.

@mboedigh mboedigh changed the title BattleCruiser Weapons are empty Data for BattleCruiser weapon's are empty Aug 6, 2019
@mboedigh
Copy link
Author

mboedigh commented Sep 6, 2019

Can anyone please confirm whether they see the same problem. I'm suspecting something is wrong in the protocol. To test just add these lines to your client any time after OnGameStart() is called. The first assert works for me and the second fails.

const UnitTypes& data = Observation()->GetUnitTypeData();
auto& marine = data[UnitTypeID(UNIT_TYPEID::TERRAN_MARINE)];
assert(!marine.weapons.empty());
auto& battle_cruiser = data[UnitTypeID(UNIT_TYPEID::TERRAN_BATTLECRUISER)];
assert(!battle_cruiser.weapons.empty());

If it works (or not) please let me know your setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant