55// Source Code: https://github.com/Interkarma/daggerfall-unity
66// Original Author: Gavin Clayton ([email protected] ) 77// Contributors: Nystul, Hazelnut, Numidium, Ferital
8- //
8+ //
99// Notes:
1010//
1111
@@ -1202,16 +1202,10 @@ private void AddPeople(PlayerGPS.DiscoveredBuilding buildingData)
12021202 StaticNPC npc = go . AddComponent < StaticNPC > ( ) ;
12031203 npc . SetLayoutData ( obj , entryDoor . buildingKey ) ;
12041204
1205- // Disable people if shop or building is closed
12061205 DFLocation . BuildingTypes buildingType = buildingData . buildingType ;
1207- if ( ( RMBLayout . IsShop ( buildingType ) && ! GameManager . Instance . PlayerEnterExit . IsPlayerInsideOpenShop ) ||
1208- ( buildingType <= DFLocation . BuildingTypes . Palace && ! RMBLayout . IsShop ( buildingType )
1209- && ! ( PlayerActivate . IsBuildingOpen ( buildingType ) || buildingType == DFLocation . BuildingTypes . GuildHall && guild . HallAccessAnytime ( ) ) ) )
1210- {
1211- go . SetActive ( false ) ;
1212- }
1206+
12131207 // Disable people if player owns this house
1214- else if ( DaggerfallBankManager . IsHouseOwned ( buildingData . buildingKey ) )
1208+ if ( DaggerfallBankManager . IsHouseOwned ( buildingData . buildingKey ) )
12151209 {
12161210 go . SetActive ( false ) ;
12171211 }
@@ -1220,6 +1214,13 @@ private void AddPeople(PlayerGPS.DiscoveredBuilding buildingData)
12201214 {
12211215 go . SetActive ( false ) ;
12221216 }
1217+ // Disable people if shop or building is closed
1218+ else if ( ( RMBLayout . IsShop ( buildingType ) && ! GameManager . Instance . PlayerEnterExit . IsPlayerInsideOpenShop ) ||
1219+ ( buildingType <= DFLocation . BuildingTypes . Town23 && ! RMBLayout . IsShop ( buildingType )
1220+ && ! ( PlayerActivate . IsBuildingOpen ( buildingType ) || buildingType == DFLocation . BuildingTypes . GuildHall && guild . HallAccessAnytime ( ) ) ) )
1221+ {
1222+ go . SetActive ( false ) ;
1223+ }
12231224 else
12241225 {
12251226 QuestMachine . Instance . SetupIndividualStaticNPC ( go , obj . FactionID ) ;
@@ -1264,7 +1265,7 @@ private void AddActionDoors()
12641265 {
12651266 boxCollider . center = meshRenderer . bounds . center ;
12661267 boxCollider . size = meshRenderer . bounds . size ;
1267- }
1268+ }
12681269
12691270 // Update climate
12701271 DaggerfallMesh dfMesh = go . GetComponent < DaggerfallMesh > ( ) ;
0 commit comments