caxanga334 / tf-bewithrobots-redux

A TF2 plugin that allows players to play in the robot team in MvM.
GNU General Public License v3.0
16 stars 7 forks source link

Blue Players Forcibly Pick Up Flag At Wrong Times #14

Closed OfficerSpy closed 1 year ago

OfficerSpy commented 1 year ago

Help us help you

Environment

Description

For the majority of the time Blue players spawn, they are being forced to pick up the flag even when another player already has it. This causes a weird issue where the bomb will drop and teleport to where one of the players that previously had it died. This issue seem to be tied to the SDKCall on CCaptureFlag::IsHome used in TF2_IsFlagHome, possibly being outdated and returning wrong values.

I was able to fix this by instead replacing the SDKCall with a check on the flag's netprop m_nFlagStatus, as it seems to serve the exact same purpose.

This issue was noticed on Windows.

Steps to reproduce

  1. Join Blue.
  2. Have another Blue player pick up the bomb.
  3. Respawn. Nearly every time the bomb will always be forcibly picked up, regardless who currently has it.