Skip to content

Commit

Permalink
unit_csv.cpp: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengtuggy committed Feb 22, 2025
1 parent 05363aa commit 39f3e6b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions engine/src/cmd/unit_csv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,16 +636,16 @@ void YawPitchRollParser(std::string unit_key,
void Unit::LoadRow(std::string unit_identifier, string modification, bool saved_game) {
Unit::XML xml;
xml.unitModifications = modification.c_str();
xml.randomstartframe = ((float) rand()) / RAND_MAX;
xml.randomstartframe = static_cast<float>(rand()) / RAND_MAX;
xml.randomstartseconds = 0;
xml.calculated_role = false;
xml.damageiterator = 0;
xml.shieldmesh = NULL;
xml.rapidmesh = NULL;
xml.shieldmesh = nullptr;
xml.rapidmesh = nullptr;
xml.hasColTree = true;
xml.unitlevel = 0;
xml.unitscale = 1;
xml.data = xml.shieldmesh = xml.rapidmesh = NULL; //was uninitialized memory
xml.data = xml.shieldmesh = xml.rapidmesh = nullptr; //was uninitialized memory
string tmpstr;
csvRow = unit_identifier;

Expand Down

0 comments on commit 39f3e6b

Please sign in to comment.