Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#1411 closed enhancement (fixed)

[PATCH] Allow actors that are only visible in Atlas

Reported by: historic_bruno Owned by: leper
Priority: Nice to Have Milestone: Alpha 14
Component: Core engine Keywords: simple, patch
Cc: Patch:

Description (last modified by Kareem Ergawy)

Some entities should only be visible in Atlas for the aid of map designers, in game they should be invisible. For example, territory pull and block entities, or some types of ambient emitters (proposed in #1962). Probably this could be done with a flag in the visual actor component, which would check the flag and g_AtlasGameLoop->running or something before submitting the model for rendering.

Not sure if they should be hidden in the Atlas simulation test, but for simplicity all Atlas cases could be treated the same.

Attachments (1)

CCmpVisualActor.cpp.patch (1.6 KB ) - added by Kareem Ergawy 11 years ago.
Applying modifications suggested by leper

Download all attachments as: .zip

Change History (7)

comment:1 by historic_bruno, 11 years ago

Description: modified (diff)

comment:2 by Kareem Ergawy, 11 years ago

I started by adding a new optional element to the Schema of CCmpVisualActor:

"<optional>"

"<element name='VisibleInAtlasOnly'>"

"<data type='boolean'/>"

"</element>"

"</optional>"

In the CCmpVisualActor::InitModel (which I think intializes an entity with its VisualActor relevant properties to be used later in the engine, please correct me if I am wrong), I added the following block: const CParamNode& visibleInAtlasNode = paramNode.GetChild("VisibleInAtlasOnly");

if(visibleInAtlasNode.IsOk()) {

if(visibleInAtlasNode.ToBool()) {

modelFlags |= MODELFLAG_VISIBLE_IN_ATLAS_ONLY;

}

}

I just wanted to make sure I am on the right track, I also wanted to ask about the class that does the actual rendering of the model so that I can check for the new flag

comment:3 by Kareem Ergawy, 11 years ago

Description: modified (diff)
Keywords: review patch added
Milestone: BacklogAlpha 14

comment:4 by Kareem Ergawy, 11 years ago

Description: modified (diff)
Summary: Allow actors that are only visible in Atlas[PATCH] Allow actors that are only visible in Atlas

by Kareem Ergawy, 11 years ago

Attachment: CCmpVisualActor.cpp.patch added

Applying modifications suggested by leper

comment:5 by leper, 11 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 13465:

Add flag to VisualActor for entities that should only be visible in Atlas. Patch by KareemErgawy. Fixes #1411.

comment:6 by leper, 11 years ago

Keywords: review removed

Thanks for the patch. (Also for future patches, please make sure that the tests still pass)

Note: See TracTickets for help on using tickets.