When I spawn these in after crafting them it spawns me inside and I can't get out without noclip. Where can I hook that the pumpjack and quarry are the items being deployed and offset their spawn location?
I think it's here but if I try and add a PUTS(); to help debug, it won't compile.
public void Spawn(BaseEntity other)
{
var entity = GameManager.server.CreateEntity(prefab, other.transform.position, other.transform.rotation);
if (entity == null)
{
return;
}
entity.skinID = item.skin;
entity.OwnerID = other.OwnerID;
entity.Spawn();
entity.gameObject.AddComponent<ExtendedController>();
other.transform.position = new Vector3(0f, -500f, 0f);
other.TransformChanged();
other.Invoke(other.KillMessage, 0.1f);
}
}