Page MenuHomeFeedback Tracker

Items cannot be placed under/around watchtowers
New, NormalPublic

Description

Items that are placeable such as medium tents, spotlights, generators, hesco boxes, etc. cannot be placed underneath or immediately surrounding watchtowers. This is because the IsBehindObstacle() check in hologram.c does not exclude watchtowers like it does for other objects (such as a car tent).

The following code is currently in place to provide exceptions to collisions within the vision cone.

if ( coneObjects.Count() > 1 && i > 0 )

			{
				if ( object == m_Player )
				{
					//Print( "Mame playera" );
					continue;
				}
				
				if ( object == GetParentEntity() )
				{
					//Print( "Mame GetParentEntity" );
					continue;
				}
				
				if ( object == GetProjectionEntity() )
				{
					//Print( "Mame GetProjectionEntity" );
					continue;
				}
				
				if ( object.IsTree() )
				{
					//Print( "Mame strom" );
					continue;
				}
				
				if ( Class.CastTo( building, object ) )
				{
					//Print( "Mame budovu" );
					continue;
				}
				
				if ( object.IsInherited( CarTent ) )
				{
					//Print( "Mame Cartent" );
					continue;
				}
		
				//Print( "Mame obstacle" );
				return true;
			}

I added the following line in under the car tent check to add watchtowers. This allows placeable objects such as a spotlight to be placed underneath and around the edges of watchtowers. This does not affect collision checks, if you try to place an object on/in a post, it will still not allow it.

if ( object.IsInherited( Watchtower ) )

				{
					//Print( "Mame Watchtower" );
					continue;
				}

Details

Severity
Tweak
Resolution
Open
Reproducibility
Always
Operating System
Windows 10
Category
General
Steps To Reproduce

Build watchtower

Take spotlight/hesco/generator/etc. To hands.

Attempt to place in center of watchtower on the ground.

[FAILS]

Add in new line as mentioned about to hologram.c

[Can place object]

Additional Information

Formatting of code in the tracker is all screwed up, but you get the idea.

Event Timeline

Tony_DUG created this task.Jun 25 2019, 6:44 PM
Tony_DUG updated the task description. (Show Details)
Tony_DUG updated the task description. (Show Details)
Tony_DUG updated the task description. (Show Details)
Tony_DUG updated the task description. (Show Details)Jun 25 2019, 6:46 PM
Tony_DUG edited Additional Information. (Show Details)