File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -95,8 +95,7 @@ func (p *Parser) bindBomb() {
9595 scPlayerC4 := p .stParser .ServerClasses ().FindByName ("CC4" )
9696 scPlayerC4 .OnEntityCreated (func (bombEntity * st.Entity ) {
9797 bombEntity .FindProperty ("m_hOwner" ).OnUpdate (func (val st.PropertyValue ) {
98- ownerEntityID := val .IntVal & entityHandleIndexMask
99- bomb .Carrier = p .gameState .playersByEntityID [ownerEntityID ]
98+ bomb .Carrier = p .gameState .Participants ().FindByHandle (val .IntVal )
10099 })
101100 })
102101}
@@ -328,16 +327,11 @@ func (p *Parser) bindGrenadeProjectiles(entity *st.Entity) {
328327
329328 // @micvbang: not quite sure what the difference between Thrower and Owner is.
330329 entity .FindProperty ("m_hThrower" ).OnUpdate (func (val st.PropertyValue ) {
331- throwerID := val .IntVal & entityHandleIndexMask
332-
333- thrower := p .gameState .playersByEntityID [throwerID ]
334- proj .Thrower = thrower
330+ proj .Thrower = p .gameState .Participants ().FindByHandle (val .IntVal )
335331 })
336332
337333 entity .FindProperty ("m_hOwnerEntity" ).OnUpdate (func (val st.PropertyValue ) {
338- ownerID := val .IntVal & entityHandleIndexMask
339- player := p .gameState .playersByEntityID [ownerID ]
340- proj .Owner = player
334+ proj .Owner = p .gameState .Participants ().FindByHandle (val .IntVal )
341335 })
342336
343337 entity .OnPositionUpdate (func (newPos r3.Vector ) {
You can’t perform that action at this time.
0 commit comments