HomeWildfire Games

Store turret positions in map files.

Description

Store turret positions in map files.

Follow up on r23529/rP23529. Allows saving turret positions in the map file, instead of relying on the order in which the entities are added.

Differential Revision: D2614
Reviewed by: @wraitii
Comments by: @Angen, @bb, @vladislavbelov.

Event Timeline

vladislavbelov added inline comments.Nov 11 2020, 8:49 PM
/ps/trunk/source/graphics/MapReader.cpp
958

Useless space in > >.

1026

In case of automatic deduction for std::make_pair it'd be more clear to use emplace_back:

Turrets.emplace_back(attrs.GetNamedItem(at_turret), attrs.GetNamedItem(at_uid).ToInt());
1081

You don't need Turrets content anymore, you can move it instead of copying.

/ps/trunk/source/graphics/MapWriter.cpp
364

Useless space in > >.

Freagarach marked 3 inline comments as done.Nov 11 2020, 9:10 PM

Refs. #2984, #3008.