Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9895187815 | |||
| f21a468863 | |||
| 53e32a0ba4 | |||
| 27ff34e689 | |||
| 8a9e8fa4b1 | |||
| c57456264d | |||
| 567b7671ad |
@@ -1123,6 +1123,10 @@ namespace Oxide.Plugins
|
||||
RunicNpcBrain brain = go.AddComponent<RunicNpcBrain>();
|
||||
CopyFields(_npcFields, stock, npc);
|
||||
CopyFields(_brainFields, stockBrain, brain);
|
||||
// prefabID is a property now (Rust 11/25): Unity's deserialisation fills its encrypted
|
||||
// value from serializedPrefabID, and an AddComponent never deserialises, so copying the
|
||||
// field list leaves ours without the prefab's id (#32).
|
||||
npc.prefabID = stock.prefabID;
|
||||
UnityEngine.Object.DestroyImmediate(stock, true);
|
||||
UnityEngine.Object.DestroyImmediate(stockBrain, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user