//This isn't packaged because it's rewriting the function in a way that would break other packages to it
function FxDTSbrick::onPlayerTouch(%this, %obj) //Only editing this because with the way I made bots damage it considers them players too
{
//Basic passing on of arguments to datablock's ::onPlayerTouch
%this.getDatablock().onPlayerTouch(%this, %obj);
if(%this.numEvents <= 0)
{
return;
}
$InputTarget_["Self"] = %this;
if(%obj.getClassName() $= "Player")
{
%client = %obj.client;
$InputTarget_["Client"] = %client;
$InputTarget_["Minigame"] = %client;
$InputTarget_["Player"] = %obj;
%this.processInputEvent("onPlayerTouch", %client);
}
if(%obj.getClassName() $= "AIplayer")
{
$InputTarget_["Minigame"] = %obj.client.minigame; //Bot's minigame
if(isObject(%driver = %obj.getMountedObject(0)))
{
$InputTarget_["Driver"] = %driver;
if(isObject(%client = %driver.getControllingClient()))
{
$InputTarget_["Client"] = %client;
$InputTarget_["Minigame"] = %client.minigame;
}
}
$InputTarget_["Bot"] = %obj;
%this.processInputEvent("onBotTouch", %this.getGroup().client);
}
}
stuff.
hmm. I'ma try think of a way to make this work better.