-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core - Fix load/save of deleted entities such as bushes and trees (#153)
* Fix ACE_HexTools.HexStrToInt to support any length hex strings EntityIDs are constructed from Low and high 32-bit IDs, the original code here didn't account for entities that have a high ID of zero, and values that were less then 8 characters long. This new implementation removes the float math and uses bitwise operations to correctly convert to the expected array format in the correct byte order with no length limitations for the input. * Update ACE_EntityIdHelper to support low IDs entity IDs Map entities such as trees and bushes do not have a high ID. This results in the game engine returning `0x0x` prefixes when ToString is called. ToInt and FromString have also been updated to use a high ID of 0 when the array only contains a single element. * Added myself to AUTHORS * Gracefully handle invalid/nil EntityID values * Put nibbles directly at the correct position --------- Co-authored-by: Kex <[email protected]>
- Loading branch information
Showing
4 changed files
with
67 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ veteran29 | |
AkiKay | ||
Badger 2-3 | ||
Glowbal | ||
gnif <[email protected]> | ||
Jonpas <[email protected]> | ||
LorenLuke | ||
OverlordZorn | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters