Skip to content

Commit

Permalink
Fix LaunchPad Smoke
Browse files Browse the repository at this point in the history
  • Loading branch information
GER-Space committed May 31, 2019
1 parent 559ed1d commit cc89196
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Core/StaticObjects/InstanceUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ internal static class InstanceUtil
/// <returns></returns>
internal static StaticInstance GetStaticInstanceForGameObject(GameObject gameObject)
{
Log.UserWarning("Depricated call");
List<StaticInstance> objList = (from obj in StaticDatabase.allStaticInstances where obj.gameObject == gameObject select obj).ToList();

if (objList.Count >= 1)
Expand Down
2 changes: 1 addition & 1 deletion src/Core/StaticObjects/StaticInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private void Spawn()
staticModules.Add(moduleKey, moduleType);
}

StaticModule mod = gameObject.AddComponent(moduleType) as StaticModule;
StaticModule mod = mesh.AddComponent(moduleType) as StaticModule;

if (mod != null)
{
Expand Down
4 changes: 3 additions & 1 deletion src/Core/StaticObjects/StaticModules/PadSmoke/PadSmoke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class PadSmoke : StaticModule

public void Start()
{
//Log.Normal("PadSmoke Start");
baseObject = gameObject;
emitterTransforms = smokeEmittersNames.Split(seperators, StringSplitOptions.RemoveEmptyEntries).ToList();

Expand All @@ -32,8 +33,9 @@ public void Start()
if (receiverCollider != null)
{
receiverCollider.tag = "LaunchpadFX";
//Log.Normal("Collider Tag: " + receiverCollider.tag);
receiverCollider.gameObject.layer = 15;
KKPadFX padfx = receiverCollider.gameObject.AddComponent<KKPadFX>();
KKPadFX padfx = receiverCollider.gameObject.AddOrGetComponent<KKPadFX>();
padfx.Setup(emitterTransforms, gameObject);
}
else
Expand Down

0 comments on commit cc89196

Please sign in to comment.