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
Makes sabotaged things respect friendly fire setting #363
Makes sabotaged things respect friendly fire setting #363
Conversation
this might cover #273 as well, I will check if that explosion code checks the same gamerules code |
oh great, this doesnt work for malicious sabotage of SG because no saboteur info is set in that case to distinguish them. I need to change that code to have a proper flag and still keep track of sab team first.. this is WIP |
I'm not really seeing how #327 was happening in the first place. It looks like the previous code was essentially, "if an SG is sabotaged, anyone can damage it," and |
It definitely exists (just sab a SG then shoot it), thats what i was trying to address. I assumed the sabotage properties would always be set on the buildable base class, which is not true, I think. I will re-test |
Where does FCanTakeDamage return false in that instance (when trying to damage your maliciously sabotaged SG)? Or is it something else that's affecting things? |
The previous code always returned true if it was sabotaged, is that what you are asking? |
Yeah, but if that's true, shouldn't it be impossible for there to be a bug where a (maliciously) sabotaged SG couldn't be damaged? Maybe I'm misunderstanding what #327 is saying? |
Indeed, it's saying it could be damaged by the sabotuer which arguably doesn't make sense when friendly fire is on. this really comes down to a gameplay decision: do sabotaged buildings 'belong' to the sabotaging team? I would not be surprised if the original devs intentionally made them 'building versus the world' when sabd |
Ohhh, ok I get it. The spy (and their team) can damage the gun they have maliciously sabotaged when FF is off. The title of #327 |
True that! I'm traveling and will finish this up after next week |
I debugged through this, didnt understand how sabotaging works - |
just tested it , works more gooder. also learned you can safely pass NULL to dynamic cast, so i'm just doing that to check it's a buildable |
This makes sentry gun and dispenser damage given/received check friendly fire is on in respect to the saboteur's team. fixes #327
I cannot spell saboteur correctly