Page 1 of 1

Arrows block boats

Posted: Wed Jun 13, 2012 11:59 pm
by Trojancow
Hello admins,

Arrows shouldn't block boats. Today marked the second time I had to page a GM because I couldn't get line of sight on an arrow to pick it up and it blocked movement in all directions, even backward.

Anyone who suggests this is era accurate or not a bug shall be targeted by a drone strike. You have been warned.

Also, serpents who die on your boat and block it are devices of the devil.

Thank you for your time, I love you.

Re: Arrows block boats

Posted: Thu Jun 14, 2012 10:59 am
by the bazookas
I can't speak as to era accuracy (although I seem to remember boats "picking up" corpses as they go through, not being blocked by them) but IF TrojanCow is correct regarding the era accuracy, this can be fixed as follows:
add "|| item is Arrow || item is Bolt || item is Corpse" to the if statement, as I have done below.

Code: Select all

// In Scripts/Multis/BaseBoat.cs
		public bool CanFit( Point3D p, Map map, int itemID )
		{
			
			//...

			IPooledEnumerable eable = map.GetItemsInBounds( new Rectangle2D( p.X + newComponents.Min.X, p.Y + newComponents.Min.Y, newComponents.Width, newComponents.Height ) );

			foreach ( Item item in eable )
			{
				if ( item is BaseMulti || item.ItemID > TileData.MaxItemValue || item.Z < p.Z || !item.Visible || item is Arrow || item is Bolt || item is Corpse)
					continue;
			
			//...

Re: Arrows block boats

Posted: Thu Jun 14, 2012 11:08 am
by DarkWing
not to mention that we are also blocked by the Blood Splatter from Dolphins!, the bodies get scooped up .. but not until the blood decays

Re: Arrows block boats

Posted: Thu Jun 14, 2012 11:23 am
by the bazookas
I think "Blood" is an item that you could just add to that list.

I dunno... if it did indeed pick up arrows and bolts and corpses in era, I imagine ANY movable object would be picked up. Was that the case? Obviously it would be a lot easier to do something like "|| item.Movable == true" than it would be to handle all the specific corner cases.