Skip to content

Commit

Permalink
weapondef fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RektInator committed Nov 29, 2020
1 parent adf5c7b commit 365ea81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/IW4/Assets/WeaponDef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ namespace ZoneTool
{
void IWeaponDef::dump(WeaponCompleteDef* weapon)
{
return;

// experimental iw5 dump code
auto iw5_weapon = new IW5::WeaponCompleteDef;
memset(iw5_weapon, 0, sizeof IW5::WeaponCompleteDef);

Expand Down
5 changes: 1 addition & 4 deletions src/IW5/Assets/WeaponDef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1587,10 +1587,7 @@ namespace ZoneTool
#define WEAPON_DUMP_FIELD_ARR(__field__, __size__) \
for (auto idx##__field__ = 0; idx##__field__ < __size__; idx##__field__++) \
{ \
if (asset->__field__ && asset->__field__[idx##__field__]) \
data[#__field__][idx##__field__] = asset->__field__[idx##__field__]; \
else \
data[#__field__][idx##__field__] = ""; \
data[#__field__][idx##__field__] = asset->__field__[idx##__field__]; \
}

#define WEAPON_DUMP_ASSET(__field__) \
Expand Down

0 comments on commit 365ea81

Please sign in to comment.