Hey guys, I've been running tests on my 1.0.5 Fougerite server, and all my Magma functions seem to be working swimmingly, except for one.
It's the Portal Gun feature I grabbed from Sleepy's TPMaster Plugin. I didn't really need all the other Teleport functions he had in his plugin, and he had a lot of trouble with timers in Magma that eventually made him throw in the towel, so I just grabbed the relevant code to use privately on my server. Anyhow, it worked fine for me in my Magma 1.1.5 server, but it's crashing my game client when I use it on Fougerite 1.0.5. The relevant snippet of code is below.
If any of you would be kind enough to try it out on your server to see if you're getting a similar problem, please let me know what you find. For me, console doesn't throw errors, but my game client stalls indefinitely, and I have to force quit and restart the game. When I join back in, the server is still running properly.
It's the Portal Gun feature I grabbed from Sleepy's TPMaster Plugin. I didn't really need all the other Teleport functions he had in his plugin, and he had a lot of trouble with timers in Magma that eventually made him throw in the towel, so I just grabbed the relevant code to use privately on my server. Anyhow, it worked fine for me in my Magma 1.1.5 server, but it's crashing my game client when I use it on Fougerite 1.0.5. The relevant snippet of code is below.
If any of you would be kind enough to try it out on your server to see if you're getting a similar problem, please let me know what you find. For me, console doesn't throw errors, but my game client stalls indefinitely, and I have to force quit and restart the game. When I join back in, the server is still running properly.
JavaScript:
case "zip":
if(Player.Admin || mod == "1" || trial == "1"){
var location;
var distArray = [];
var hits = UnityEngine.Physics.RaycastAll(Player.PlayerClient.controllable.character.eyesRay);
if(hits.Length > 0){
for(var i=0; i < hits.Length; i++){
distArray.push(Math.ceil(hits[i].distance));
}
var mindist = Math.min.apply(Math, distArray);
var targetloc = Util.Infront(Player, mindist);
var terrainhg = World.GetGround(targetloc.x, targetloc.z);
Player.TeleportTo(targetloc.x, terrainhg + 3, targetloc.z);
}
}
break;