Skip to content

Commit

Permalink
Allow bunting models to be blank, deliberately skipping a position.
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Apr 13, 2023
1 parent 5bef024 commit 037a771
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fgd/point/comp/comp_prop_rope_bunting.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
distance(float) : "Placement Distance" : 0 : "If greater than zero, override Placement Interval, and instead place every this many units."

model(studio) : "Model" : : "Specifies the model to place. This can either be an MDL which is placed as invidual prop_statics, " +
"or a SMD (relative to a game folder) which is merged into the rope model."
"or a SMD (relative to a game folder) which is merged into the rope model. Alternatively make it entirely blank to have a chance to randomly skip placing ropes."

angles(angle) : "Rotation" : "0 0 0" : "Rotate the model by this much, before applying the orientation of the rope. " +
"After this is applied, the X axis should be aligned with the rope direction."
Expand Down
3 changes: 3 additions & 0 deletions transforms/geocable.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,9 @@ def place_seg_props(nodes: Iterable[Node], fsys: FileSystem, mesh: Mesh) -> Iter
))

conf = rand.choice(weights)
if not conf.model:
# Deliberately skip placing a prop.
continue
if conf.orient is SegPropOrient.RAND_FULL:
# We cover all orientations, so pre-rotation value is irrelevant.
angles = Matrix.from_angle(
Expand Down

0 comments on commit 037a771

Please sign in to comment.