Page 1 of 2

How to keep moles out of your lawn.

Posted: Sun Apr 24, 2016 4:29 pm
by perrinoia
One of the easiest ways for players to get under the terrain, or outside of arenas, is necromancer. This can be a minor annoyance, by itself, but gets to be a huge problem when they figure out how to bring inventory stations with them.

Here's 4 solutions which we should vote on.

1) Allow it.
This is the easiest solution, as it requires no effort from anyone.

2) Don't allow it.
Admins slap/kill/kick/ban people who break the rules.

3) Prevent the zappy turrets from spawning if an object exists between them.
This way, if you deploy an inventory station so one zappy turret is on this side of the wall, and the other zappy turret is on the other side of the same wall, neither zappy turret will spawn. Your inventory station will continue to work, but without zappy functionality.

4) Prevent the whole inventory station from spawning if an object exists between them.
This way, you get an error message when you attempt to deploy your inventory station in a cheatable position. The side effect is you won't be able to deploy your inventory stations in the corner of a room, so the whole thing is hidden inside a wall. Both zappy turret thingies must be exposed for it to deploy, at all.

Re: How to keep moles out of your lawn.

Posted: Sun Apr 24, 2016 5:39 pm
by Erowid
how does the zappy work with blastwalls over it?

Re: How to keep moles out of your lawn.

Posted: Sun Apr 24, 2016 6:52 pm
by perrinoia
No change there. You can't deploy the inventory stations too close to blastwalls, already.

If you deploy a blast walk and move it onto a station, the zappy turrets are already deployed and functional.

Re: How to keep moles out of your lawn.

Posted: Sun Apr 24, 2016 9:43 pm
by Lawlz
Call me crazy but I'm diggin the 4th option.

Re: How to keep moles out of your lawn.

Posted: Mon Apr 25, 2016 8:29 am
by perrinoia
I can draw a triangle between the potential position of the station itself and it's two zappy turrets, and if any solid object (terrain, interior shape, static shape, moveable, or player) intersects any of those 3 lines, the deploy check fails. This would prevent people from deploying a platform close to the ceiling, deploying an inventory station in the crack between the platform and the ceiling, making the zappy turrets spawn above the ceiling, too.

Re: How to keep moles out of your lawn.

Posted: Mon Apr 25, 2016 3:12 pm
by AnniDv6
Sounds good do it

Re: How to keep moles out of your lawn.

Posted: Mon Apr 25, 2016 7:45 pm
by perrinoia
Annihilation/deployables/MobileInventory.cs wrote:

Code: Select all

$InvList[MobileInventoryPack]	= 1;
$MobileInvList[MobileInventoryPack] = 0;
$RemoteInvList[MobileInventoryPack] = 0;
AddItem(MobileInventoryPack);

$CanAlwaysTeamDestroy[MobileInventory] = 1;

ItemImageData MobileInventoryPackImage 
{
	shapeFile = "MagCargo";
	mountPoint = 2;
	mountOffset = { 0, -0.65, -0.4 };
	mass = 5.0;
	firstPerson = false;
};

ItemData MobileInventoryPack
{
	description = "Mobile Inventory";
	shapeFile = "inventory_sta";
	classname = "Backpack";
	heading = $InvHead[ihPwr];
	imageType = MobileInventoryPackImage;
	shadowDetailMask = 4;
	elasticity = 0.2;
	price = 5000;
	hudIcon = "deployable";
	showWeaponBar = true;
	hiliteOnActive = true;
};

StaticShapeData MobileInventory
{
	description = "Mobile Inventory";
	shapeFile = "inventory_sta";

	classname = "DeployableStation";

	visibleToSensor = true;
	sequenceSound[0] = { "activate", SoundActivateInventoryStation };
	sequenceSound[1] = { "power", SoundInventoryStationPower };
	sequenceSound[2] = { "use", SoundUseInventoryStation };
	maxDamage = 1.5;
	debrisId = flashDebrisLarge;
	mapFilter = 4;
	mapIcon = "M_station";
	damageSkinData = "objectDamageSkins";
	shadowDetailMask = 16;
	triggerRadius = 1.5;
	explosionId = flashExpLarge;
	shieldShapeName = "shield";
};

// How to keep moles out of your lawn. -perrinoia
function badZappyPos(%player)
{
	%pos = Vector::add($LOS::Position, "0 0 0.01");
	%obj = $LOS::Object;
	%odd = $LOS::Normal;
	deleteVariables("LOS::*");
	
	%rot = GameBase::getRotation(%player);
	%a = vector::add(%pos,rotateVector("0 -2.25 1.5", %rot);
	%b = vector::add(%pos,rotateVector("2.16 -0.5 1.4", %rot));	
	%r = getLOSInfo(%pos, %a, 1) || getLOSInfo(%pos, %b, 1) || getLOSInfo(%a, %b, 1);
	
	$LOS::Position = Vector::sub(%pos, "0 0 0.01");
	$LOS::Object = %obj;
	$LOS::Normal = %odd;
	return %r;
}

function MobileInventoryPack::deployShape(%player,%item)
{
	//Deploy ( Player, item, shape, placement, Max Dist, Categorys, Surfaces, Delete, PowerReq,PRange)
	//DeployStuff(%player,%item,MobileInv,1,5,0,0,true,1,250);
	
	%team = GameBase::getTeam(%player);
	%client = Player::getClient(%player);

	if($TeamItemCount[%team @ %item] >= $TeamItemMax[%item] && !$build)
	{
		Client::sendMessage(%client,0,"Deployable Item limit reached for " @ %descr);
		return false;
	}
	if(!GameBase::getLOSInfo(%player,5)) 
	{
		Client::sendMessage(%client,0,"Deploy position out of range");
		return false;
	}


// check if object is in motion, for dropships and jail cell -plasmatic
	%obj = $los::object;
	if(%obj.inmotion == true)	 
	{ 
		Client::sendMessage(%client,0,"Deploy area crappy, cannot deploy.");
		return false;
	}
		
	if(Vector::dot($los::normal,"0 0 1") <= 0.7)
	{
		Client::sendMessage(%client,0,"Can only deploy on flat surfaces");
		return false;
	}
	if(GameBase::getDataName($los::object) != "DeployablePlatform")
	{
		%obj = getObjectType($los::object);
		if(%obj != "SimTerrain" && %obj != "InteriorShape" && !$build) 
		{
			Client::sendMessage(%client,0,"Can only deploy on terrain or buildings");
			return false;
		}		
			
		if(!checkInvDeployArea(%client,$los::position)) 
		{
			Client::sendMessage(%client,0,"Cannot deploy here");
			return false;
		}
		if(badZappyPos(%player))	// perrinoia
		{
			Client::sendMessage(%client, 0, "Zappy turrets cannot function here.");
			return false;
		}
	}
	
	%obj = newObject("Mobile Inventory","StaticShape","MobileInventory",true);
	%obj.cloakable = true;	//for base cloaker

	if($debug) Echo($Ver,"|Created New Object :",%obj," ","Mobile Inventory");
	
	//GameBase::playSequence(%obj,1,"deploy");
	//GameBase::SetActive(%obj,false);
	
	GameBase::setTeam(%obj,%team);
	addToSet("MissionCleanup/deployed/station", %obj);
	GameBase::setPosition(%obj,$los::position);
	GameBase::setRotation(%obj,GameBase::getRotation(%player));
	Gamebase::setMapName(%obj,"Mobile Inventory");
	Client::sendMessage(%client,0,"Mobile Inventory deployed");
	playSound(SoundCreateItem,$los::position);
	$TeamItemCount[%team @ %item]++;
	%obj.deployer = %client; 	//for destroy points, bk messages -plasmatic
	
	AddInventoryTrigger(%obj);	// plas 3.0
//	Station::FindPower(%obj);

	schedule("Ann::PowerGlide("@%obj@");",3);			//plasmatic 2.3
//	schedule("Ann::AddtoPowerGrid("@%obj@");",5);		//Plasmatic 2.3 power grid
	return true;	
}

function MobileInventory::onDestroyed(%this)
{
	if($trace) 
		echo($ver,"| MobileInventory::onDestroyed");
	MobileInventory::onDisabled(%this);
	
	GameBase::setEnergy(%this.lTurret,0);	//Infinite Zappy fix Plasmatic 3/17/2007 6:49AM
	GameBase::setDamageLevel(%this.lTurret,1100);	//plasm 3.0
	GameBase::setEnergy(%this.rTurret,0);	//Infinite Zappy fix Plasmatic 3/17/2007 6:49AM
	GameBase::setDamageLevel(%this.rTurret,1100);	
	
	//Infinite Zappy fix Plasmatic 3/17/2007 7:03AM
	for(%cl = Client::getFirst(); %cl != -1; %cl = Client::getNext(%cl))
	{
		%player = Client::getOwnedObject(%cl);
		if(%player.InvObject == %this)
		{
			%cl.ConnectBeam = "";	//internal
			%cl.InvTargetable = "";	//internal
			%Cl.InvConnect = "";	//external	
			QuickInvOff(%cl);	
			%player.ZappyResupply = "";
			%cl.ListType = "";
		}
	}
			
	%this.cloakable = "";
	%this.nuetron = "";
	StaticShape::objectiveDestroyed(%this);
	if(!$NoCalcDamage)
		calcRadiusDamage(%this, $DebrisDamageType, 2.5, 0.05, 25, 13, 3, 0.55, 0.30, 250, 170);
	$TeamItemCount[GameBase::getTeam(%this) @ "MobileInventoryPack"]--;
}

function MobileInventory::onEnabled(%this)
{
	if(GameBase::isPowered(%this)) 
	{
		GameBase::playSequence(%this,0,"power");
		GameBase::playSequence(%this,1);
		
		// handling zappy here now -Plasmatic
		ZappyPowerSwitch(%this,true);			
	}
	else
		schedule("Ann::PowerGlide("@%this@");",1 + getRandom()*5);	//1/21/2008 4:31AM -Plasmatic
}

function MobileInventory::onDisabled(%this)
{
	if($trace) 
		echo($ver,"| MobileInventory::onDisabled ",%this);
	GameBase::stopSequence(%this,0);
// 	GameBase::generatePower(%this, false);
	// handling zappy here now -Plasmatic 3.0
	ZappyPowerSwitch(%this,false);
}

function MobileInventory::onEndSequence(%this,%thread)
{
	if($debuginv)
		echo("End Seq ",%thread);
	if(Station::onEndSequence(%this,%thread)) 
		InventoryStation::onResupply(%this,"MobileInvList");
}

// Simplified power grid -plasmatic 2.3
function MobileInventory::onPower(%this,%power,%generator)
{
	//echo(%generator);
	if(%power) 
	{
		GameBase::playSequence(%this,0,"power");
		GameBase::playSequence(%this,1);
		// handling zappy here now -Plasmatic 3.0
		ZappyPowerSwitch(%this,true);
		
	}
	else 
	{		
		GameBase::stopSequence(%this,0);
		GameBase::pauseSequence(%this,1);
		GameBase::pauseSequence(%this,2);
		Station::checkTarget(%this);
		
		%team = GameBase::getTeam(%this);
		if(!GameBase::isPowered(%this))
		{	
			if(!$build)
				DropshipTeamMessage(%team, 3, "Cycling Mobile Inventory power frequency....");			
			schedule("Ann::PowerGlide("@%this@");",1);	//plasmatic 2.3
			// handling zappy here now -Plasmatic 3.0
			ZappyPowerSwitch(%this,false);
		}
		
	}
}
function MobileInventory::onActivate(%this) 
{
	if($trace) 
		echo($ver,"| MobileStation::onActivate ",%this);
	//echo("Activate " @ %this);
	%obj = Station::getTarget(%this);
	if(%obj != -1) 
	{
		GameBase::playSequence(%this,1,"activate");
		GameBase::setSequenceDirection(%this,1,1);
		%this.lastPlayer = %obj;
		%obj.inStation = %this;

	}
	else 
		GameBase::setActive(%this,false);
}
function MobileInventory::onDeactivate(%this) 
{
	if($trace) 
		echo($ver,"| MobileStation::onDeactivate ",%this);
	//echo("Dectivate " @ %this);
	%obj = %this.lastPlayer;
	if(%this == %obj.inStation)
		%obj.inStation = false;
	GameBase::stopSequence(%this,2);
	GameBase::setSequenceDirection(%this,1,0);
}

Re: How to keep moles out of your lawn.

Posted: Mon Apr 25, 2016 7:54 pm
by Firelord
I'm pretty bummed that we won't be able to place an inv with one of the nodes inside the wall anymore. That's been a function in the game for so long now. I really don't feel like people going outside of boundaries has been that much of an issue. We can easily just make it an enforceable rule.

Re: How to keep moles out of your lawn.

Posted: Mon Apr 25, 2016 9:03 pm
by perrinoia
That's what I'm trying to avoid.

Typically, I go under the terrain when all else fails... When I creek like the enemy team is either so good, or so good at cheating, that I find it impossible to win.

That's when I go under the terrain, and typically speaking, it's too late to turn the tide of the mission, anyway.

I mostly do it to get the enemies to say, "WTF?"

However, recently, they aren't phased... They know exactly where I am, and find ways to kill me. For instance, using mine glitch to drop nukes through the terrain. Just the other day, someone rammed me through the terrain with a vehicle, picking me up as a passenger.

Re: How to keep moles out of your lawn.

Posted: Tue Apr 26, 2016 10:31 am
by vistalize
there will always be other ways to get under the terrain... its the fact that you let the mobile inventory stations have power with no generator backing them up so someone can place an invo anywhere on the map and rain down massive det packs either from the sky or like what was discussed in this thread under the map. this has always been an issue but you have made it easier for someone to use this cheap tactic whereas back in the day i would have commended them for carrying a portable generator (if it was available to buy) across the whole map and then come back for a mobile invo by the time i would have owned their ass. i dont know how many time i have to tell you this.... fix the portable generators. we might as well be running around in builder mode with the way yall got shit set up. niggas got 4 and 5 inventory stations with power around the enemy base like damn just enable builder fuck it

thats why i dont play anni invo anymore because all it is set an inventory station and spam det packs into the enemy base. thats the only way anyone knows how to take out d anymore n its cheap as fuck . inventory stations should never work near an enemy base just like turrets n if an inventory is going to be set way out behind enemy lines there should be a portable generator backing it up.

just my 2 cents

~tree out