mirror of https://github.com/PrimeDecomp/prime.git
Get close to matching CScriptAreaAttributes
This commit is contained in:
parent
0bdf386768
commit
b818531567
|
@ -25,18 +25,14 @@ void CScriptAreaAttributes::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId
|
||||||
|
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case kSM_InitializedInArea: {
|
case kSM_InitializedInArea: {
|
||||||
TAreaId areaId = x4_areaId;
|
stateMgr.World()->Area(GetAreaIdAlways())->SetAreaAttributes(this);
|
||||||
stateMgr.World()->Area(areaId)->SetAreaAttributes(this);
|
|
||||||
stateMgr.EnvFxManager()->SetFxDensity(500, x3c_envFxDensity);
|
stateMgr.EnvFxManager()->SetFxDensity(500, x3c_envFxDensity);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case kSM_Deleted: {
|
case kSM_Deleted: {
|
||||||
TAreaId areaId = x4_areaId;
|
if (stateMgr.World()->Area(GetAreaIdAlways())->IsLoaded()) {
|
||||||
CGameArea* area = stateMgr.World()->Area(areaId);
|
stateMgr.World()->Area(GetAreaIdAlways())->SetAreaAttributes(nullptr);
|
||||||
|
|
||||||
if (area->IsLoaded()) {
|
|
||||||
area->SetAreaAttributes(nullptr);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue