View Issue Details

IDProjectCategoryView StatusLast Update
0006175The Dark ModPhysicspublic25.11.2022 07:11
Reporterangua Assigned Tonbohr1more  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.11Fixed in VersionTDM 2.11 
Summary0006175: Models hidden at map start are nonsolid and can't be frobbed after show()
DescriptionWhen I have a model with "hide" "1" and show() it later with a script, I can walk through it and it doesn't highlight even though it should be frobable.

It looks like idEntity::Show( void ) doesn't create a solid clipmodel.

A workaround is to hide() the model with a script run at map start.
Steps To ReproduceCreate a model, set "hide" "1" and "frobable" "1"
Create a trigger targetting a scriptfunction to show() the model.

The model is nonsolid and doesn't highlight.

TagsNo tags attached.

Relationships

related to 0004116 resolvedSteveL LOD objects blocking player after map start 

Activities

nbohr1more

nbohr1more

22.11.2022 05:33

developer   ~0015461

Last edited: 22.11.2022 05:34

angua, can you try the attached Entity.cpp

I think all that's required is a "SetSolid(true)" action in the function:

if ( fl.hidden )
    {
        fl.hidden = false;
        if ( m_FrobBox && m_bFrobable )
        {
            m_FrobBox->SetContents( CONTENTS_FROBABLE );
        }
                SetSolid(true); // 0006175
        UpdateVisuals();
        RestoreDecals(); // 0003817
Entity.cpp (369,709 bytes)
nbohr1more

nbohr1more

24.11.2022 02:42

developer   ~0015465

Rev 10169
stgatilov

stgatilov

24.11.2022 20:47

administrator   ~0015466

Last edited: 24.11.2022 20:48

Is it a correct fix?

If I do the same steps as angua described, but add "nonsolid 1" spawnarg on the entity initially, will the entity become solid after showing it?
If it will, then it's wrong =(
nbohr1more

nbohr1more

25.11.2022 06:54

developer   ~0015468

Last edited: 25.11.2022 06:55

Rev 10175

        // 0006175 make make sure hidden items regain physics on show events
        if ( spawnArgs.GetBool("nonsolid", "0") | spawnArgs.GetBool("solid", "1" )) {
        SetSolid( true );
        }

I misread the SetSolid function. It looked like it was checking flags before executing.
This update should ensure that no unintended solidity changes happen
stgatilov

stgatilov

25.11.2022 07:09

administrator   ~0015469

Last edited: 25.11.2022 07:11

This is also wrong.

Take a default func_static, then hide + setsolid(false) + show.
You'll get a visible solid entity as the result, while I'd expect a visible nonsolid one.

At least it is not as broken.
This hide+solid logic is so bad: it needs a full rewrite to get working properly.

P.S. Could you find some editor which respects .editorconfig ?

Issue History

Date Modified Username Field Change
21.11.2022 16:39 angua New Issue
21.11.2022 19:48 nbohr1more Relationship added related to 0004116
22.11.2022 05:33 nbohr1more Note Added: 0015461
22.11.2022 05:33 nbohr1more File Added: Entity.cpp
22.11.2022 05:34 nbohr1more Note Edited: 0015461
22.11.2022 05:34 nbohr1more Assigned To => nbohr1more
22.11.2022 05:34 nbohr1more Status new => assigned
22.11.2022 05:34 nbohr1more Product Version => SVN
24.11.2022 02:42 nbohr1more Note Added: 0015465
24.11.2022 02:42 nbohr1more Status assigned => resolved
24.11.2022 02:42 nbohr1more Resolution open => fixed
24.11.2022 02:42 nbohr1more Fixed in Version => TDM 2.11
24.11.2022 02:42 nbohr1more Target Version => TDM 2.11
24.11.2022 20:47 stgatilov Note Added: 0015466
24.11.2022 20:47 stgatilov Note Edited: 0015466
24.11.2022 20:48 stgatilov Note Edited: 0015466
25.11.2022 06:54 nbohr1more Note Added: 0015468
25.11.2022 06:55 nbohr1more Note Edited: 0015468
25.11.2022 07:09 stgatilov Note Added: 0015469
25.11.2022 07:11 stgatilov Note Edited: 0015469