Refactor edentities to not use separate length-trackers

This turns the array 'edentity' into a proper vector, and removes the need to
use a separate length-tracking variable and manually keep track of the actual
amount of edentities in the level by using the long-winded
'EditorData::GetInstance().numedentities'. This manual tracking was more
error-prone and much less maintainable.

editorclass::naddedentity() has been removed due to now functionally being the
same as editorclass::addedentity() (there's no more
'EditorData::GetInstance().numedentities' to not increment) and for also being
unused in the first place.

editorclass::copyedentity() has been removed because it was only used to shift
the rest of the edentities up manually, but now that we let C++ do all the
hard work it's no longer necessary.
This commit is contained in:
Misa
2020-03-01 12:24:43 -08:00
committed by Ethan Lee
parent a4d7fc017c
commit 8d44d9387b
4 changed files with 52 additions and 96 deletions

View File

@@ -32,8 +32,8 @@
scriptclass script;
#if !defined(NO_CUSTOM_LEVELS)
edentities edentity[3000];
editorclass ed;
std::vector<edentities> edentity;
editorclass ed;
#endif
UtilityClass help;