Skip to content

Commit

Permalink
Updated s_multiplayer_customized_model_character
Browse files Browse the repository at this point in the history
  • Loading branch information
twist84 committed Sep 9, 2024
1 parent 033f16a commit 773c76e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion game/source/game/multiplayer_definitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void s_multiplayer_universal_globals_definition::update_reference_names()

void s_multiplayer_customized_model_character::update_reference_names()
{
UPDATE_BLOCK_REFERENCE_NAMES(customized_areas);
UPDATE_BLOCK_REFERENCE_NAMES(customized_selection);
}

void s_multiplayer_customized_model_selection::update_reference_names()
Expand Down
2 changes: 1 addition & 1 deletion game/source/game/multiplayer_definitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct s_multiplayer_customized_model_character
{
c_string_id armor_region;
c_string_id biped_region;
c_typed_tag_block<s_multiplayer_customized_model_selection> customized_areas;
c_typed_tag_block<s_multiplayer_customized_model_selection> customized_selection;

void update_reference_names();
};
Expand Down
8 changes: 4 additions & 4 deletions game/source/game/players.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,19 +837,19 @@ long customized_spartan_character_from_name(s_multiplayer_customized_model_chara

if (armor_region && csstricmp(region_or_biped_name, armor_region) == 0)
{
for (long selection_absolute_index = 0; selection_absolute_index < character.customized_areas.count; selection_absolute_index++)
for (long selection_absolute_index = 0; selection_absolute_index < character.customized_selection.count; selection_absolute_index++)
{
s_multiplayer_customized_model_selection& customized_model_selection = character.customized_areas[selection_absolute_index];
s_multiplayer_customized_model_selection& customized_model_selection = character.customized_selection[selection_absolute_index];
if (customized_area_selection_from_name(customized_model_selection, selection_name))
return selection_absolute_index;
}
}

if (biped_region && csstricmp(region_or_biped_name, biped_region) == 0)
{
for (long selection_absolute_index = 0; selection_absolute_index < character.customized_areas.count; selection_absolute_index++)
for (long selection_absolute_index = 0; selection_absolute_index < character.customized_selection.count; selection_absolute_index++)
{
s_multiplayer_customized_model_selection& customized_model_selection = character.customized_areas[selection_absolute_index];
s_multiplayer_customized_model_selection& customized_model_selection = character.customized_selection[selection_absolute_index];
if (customized_area_selection_from_name(customized_model_selection, selection_name))
return selection_absolute_index;
}
Expand Down
8 changes: 4 additions & 4 deletions game/source/hf2p/hf2p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ c_static_array<c_static_array<c_static_string<64>, 100>, k_armor_type_count>& ge
continue;
}

for (long i = 0; i < customized_spartan_character.customized_areas.count; i++)
for (long i = 0; i < customized_spartan_character.customized_selection.count; i++)
{
s_multiplayer_customized_model_selection& customized_area = customized_spartan_character.customized_areas[i];
s_multiplayer_customized_model_selection& customized_area = customized_spartan_character.customized_selection[i];

// you can only see the arms in first person
if (ignore_requirements || customized_area.third_person_armor_object.index != NONE /*&& customized_area.first_person_armor_object.index != NONE*/)
Expand Down Expand Up @@ -390,9 +390,9 @@ c_static_array<c_static_array<c_static_string<64>, 100>, k_armor_type_count>& ge
continue;
}

for (long i = 0; i < customized_elite_character.customized_areas.count; i++)
for (long i = 0; i < customized_elite_character.customized_selection.count; i++)
{
s_multiplayer_customized_model_selection& customized_area = customized_elite_character.customized_areas[i];
s_multiplayer_customized_model_selection& customized_area = customized_elite_character.customized_selection[i];

// you can only see the arms in first person
if (customized_area.third_person_armor_object.index != NONE /*&& customized_area.first_person_armor_object.index != NONE*/)
Expand Down
6 changes: 3 additions & 3 deletions game/source/scenario/scenario.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,10 +1028,10 @@ if (universal_data->customized_##NAME##_characters.count)\
char const* biped_region = customized_character.biped_region.get_string();\
if (biped_region && *biped_region)\
c_console::write_line(" biped region: %s", biped_region);\
if (customized_character.customized_areas.count)\
if (customized_character.customized_selection.count)\
{\
c_console::write_line(" customized areas: %d", customized_character.customized_areas.count);\
for (auto customized_area : customized_character.customized_areas)\
c_console::write_line(" customized areas: %d", customized_character.customized_selection.count);\
for (auto customized_area : customized_character.customized_selection)\
{\
char const* selection_name = customized_area.selection_name.get_string();\
if (selection_name && *selection_name)\
Expand Down

0 comments on commit 773c76e

Please sign in to comment.