Monster spawning now adds to a queue to prevent memory adjustment corruption while inside of monster update functions.

Monster spawning on phase transition now occurs.
This commit is contained in:
2023-09-19 03:30:18 -05:00
parent c816a0eac7
commit 74a31dda2e
7 changed files with 62 additions and 5 deletions
+2
View File
@@ -10,6 +10,7 @@ INCLUDE_STRATEGY_DATA
INCLUDE_ANIMATION_DATA
std::map<int,MonsterData>MONSTER_DATA;
safemap<std::string,MonsterData*>MONSTER_NAME_DATA;
MonsterData::MonsterData()
:atk(0),collisionDmg(0),hp(0),id(0),moveSpd(0),size(0),strategy(0){}
@@ -98,6 +99,7 @@ void MonsterData::InitializeMonsterData(){
);
MONSTER_DATA[id]=monster;
MONSTER_NAME_DATA[MonsterName]=&MONSTER_DATA[id];
id++;
}