Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity model not updated when spawnflags change #1452

Closed
kduske opened this issue Sep 30, 2016 · 2 comments
Closed

Entity model not updated when spawnflags change #1452

kduske opened this issue Sep 30, 2016 · 2 comments
Labels
Prio:1 Highest priority: Crash or crippling bugs, features that enable new ways of working Type:Bug Errors and problems

Comments

@kduske
Copy link
Collaborator

kduske commented Sep 30, 2016

Create an item_health, change the spawnflags to 2. The model should change, but it doesn't update immediately - only after deselecting the entity.

The same goes for dynamic entity models and the bounding box (solid / nonsolid). Create a dynamic model entity definition like so:

@PointClass size(0 0 0, 32 32 56) base(Appearflags)
model(
    {
        "path": mdl,
        "skin": skin,
        "frame": frame
    }
) = item_any : "Any model" [
    spawnflags(flags) =
    [
        1 : "Rotten" : 0
        2 : "Megahealth" : 0
    ]
]

and create an entity with that definition. Then set the mdl property.

  • The model is not immediately shown in the editor - the entity must be deselected.
  • The bounding box was previously solid as the entity didn't have a model. After setting the mdl property, it is still solid, even after deselecting and reselecting the entity.
@kduske kduske added Type:Bug Errors and problems Platform:All labels Sep 30, 2016
@kduske kduske added this to the TrenchBroom 2.0.0 milestone Sep 30, 2016
@kduske kduske added the Prio:1 Highest priority: Crash or crippling bugs, features that enable new ways of working label Oct 2, 2016
@kduske
Copy link
Collaborator Author

kduske commented Oct 4, 2016

Currently, the entity model is cached in the entities. This should be removed, as it is no longer correct with dynamic models.

kduske added a commit that referenced this issue Oct 5, 2016
kduske added a commit that referenced this issue Oct 5, 2016
…s convertible to a given type instead of catching a conversion error.
@kduske
Copy link
Collaborator Author

kduske commented Oct 5, 2016

Fixed in 4932d63.

@kduske kduske closed this as completed Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prio:1 Highest priority: Crash or crippling bugs, features that enable new ways of working Type:Bug Errors and problems
Projects
None yet
Development

No branches or pull requests

1 participant