-
Notifications
You must be signed in to change notification settings - Fork 6
Description
From t-bone:
@FrostRaptor i have a LowVis compatibility problem that im not sure how best to handle.
issue: mounted/swarming BattleArmor always results in the unit its on getting "Obstructed" LOS. i.e, BA swarming a Catapult and you try to shoot the catapult... no matter what you have "obstructed" LOS.... but the way the raycasted misses work you're more likely to just miss everything entirely because your shot had generally low accuracy (BA taking damage while mounted is predicated on actually hitting the location theyre mounted to anyway).
technically mounted BA can be tab-targeted by player using indirect fire only, but i think im fine with that. i dont think you want players being able to directly shoot BA off of the mechs theyre mounted to.
simplest way to handle it is rewrite LineOfSight.GetLineOfFireUncached, and in this section:
List list = new List(this.Combat.AllActors);
list.Remove(source);
also have a line like list.Remove(mountedUnit). StratOps tracks all the units mounted/swarming in global state dictionaries (separate for mount vs swarm), where key is GUID of mounted/swarming unit, and value is GUID of carrier unit, so on my end its trivial to remove them from the calculation that way. But LowVis already overwrites GetLineOfFireUncached, so that won't work for RT. Dont know how best to do it. I assume you don't want to make LowVis depend on StratOps.
a hideously elegant solution would be, in your LowVis patch... just remove any actors from the calculation that have the exact same position as the "target" actor... since under normal circumstances two actors never occupy the same Vector3 position
FrostRaptor — 09/22/2021
Are they literally the same position, or is there the possibility for a small (< 4m) deviation in terms of their current position?
I'm happy to do whatever is easiest for you... when I can tear myself away from Pathfinder.
Ⓕ-bone — 09/22/2021
mmmmm they should be literally the same position since every call to GameRep.Update checks for a "rider" and teleports the rider to the parent
FrostRaptor — 09/22/2021
Okay. I can do that check then.
I wanted to verify since any deviation will return a magnitude of some value, instead of just 0
Easiest to check if offset is < 4 or 8 or something, which is probably what I'll do.
Ⓕ-bone — 09/22/2021
yeah thats probably a lot safer. wouldnt surprise me if theres some "snapping" that goes on
or even just regular floating point errors
no rush, RT will be a while implementing stratops since I'm not switching it over to new CB until the rest of the framework mods are fixed