Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
update support for itemsdat v16
  • Loading branch information
Ritshu authored Dec 24, 2023
1 parent be6eb7a commit 4d07306
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ void decode_itemsDat(){
memcpy(&item.newInt2, data + memPos, 4);
memPos += 4;
}
if (itemsdatVer >= 15){
if (itemsdatVer >= 15) {
item.canPlayerSit = data[memPos];
memPos++;
item.sitPlayerOffsetX = *(int*)(data + memPos);
Expand All @@ -398,6 +398,10 @@ void decode_itemsDat(){
}
}
}
if (itemsdatVer >= 16) {
int16_t strLen = *(int16_t*)&data[memPos];
memPos += 2 + strLen;
}
if (i != item.itemID) {
cout << "Unordered item! Something gone wrong?" << endl;
exit(-1);
Expand Down

0 comments on commit 4d07306

Please sign in to comment.