Skip to content

Commit ed6f83a

Browse files
authored
Merge branch 'master' into micvbang/grenade-trajectory-timing
2 parents cbc013e + 82827a9 commit ed6f83a

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

pkg/demoinfocs/common/inferno.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,22 @@ func (inf *Inferno) Fires() Fires {
7474
}
7575
for i := 0; i < nFires; i++ {
7676
iStr := fmt.Sprintf(iFormat, i)
77-
offset := r3.Vector{
78-
X: float64(entity.PropertyValueMust("m_fireXDelta." + iStr).Int()),
79-
Y: float64(entity.PropertyValueMust("m_fireYDelta." + iStr).Int()),
80-
Z: float64(entity.PropertyValueMust("m_fireZDelta." + iStr).Int()),
81-
}
8277

8378
fire := Fire{
84-
Vector: origin.Add(offset),
8579
IsBurning: entity.PropertyValueMust("m_bFireIsBurning." + iStr).BoolVal(),
8680
}
8781

82+
if prop := entity.Property("m_firePositions." + iStr); prop != nil {
83+
fire.Vector = prop.Value().R3Vec()
84+
} else {
85+
offset := r3.Vector{
86+
X: float64(entity.PropertyValueMust("m_fireXDelta." + iStr).Int()),
87+
Y: float64(entity.PropertyValueMust("m_fireYDelta." + iStr).Int()),
88+
Z: float64(entity.PropertyValueMust("m_fireZDelta." + iStr).Int()),
89+
}
90+
fire.Vector = origin.Add(offset)
91+
}
92+
8893
fires = append(fires, fire)
8994
}
9095

0 commit comments

Comments
 (0)