mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-08-06 10:55:36 +00:00
Get close to matching CScriptAreaAttributes
Former-commit-id: b818531567ba766899772d703d42f1b9eee2e834
This commit is contained in:
parent
713e75c4f1
commit
f0261ab3c5
@ -25,18 +25,14 @@ void CScriptAreaAttributes::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId
|
||||
|
||||
switch (msg) {
|
||||
case kSM_InitializedInArea: {
|
||||
TAreaId areaId = x4_areaId;
|
||||
stateMgr.World()->Area(areaId)->SetAreaAttributes(this);
|
||||
stateMgr.World()->Area(GetAreaIdAlways())->SetAreaAttributes(this);
|
||||
stateMgr.EnvFxManager()->SetFxDensity(500, x3c_envFxDensity);
|
||||
break;
|
||||
}
|
||||
|
||||
case kSM_Deleted: {
|
||||
TAreaId areaId = x4_areaId;
|
||||
CGameArea* area = stateMgr.World()->Area(areaId);
|
||||
|
||||
if (area->IsLoaded()) {
|
||||
area->SetAreaAttributes(nullptr);
|
||||
if (stateMgr.World()->Area(GetAreaIdAlways())->IsLoaded()) {
|
||||
stateMgr.World()->Area(GetAreaIdAlways())->SetAreaAttributes(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user