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

Vehicle turrets fired from controls aim from the wrong tile #22512

Open
jeremyshannon opened this Issue Nov 28, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@jeremyshannon
Contributor

jeremyshannon commented Nov 28, 2017

Game version: 0.c-25163-ga18e4b5f16-dirty (#6961)

Operating system: Linux

Tiles or curses: Curses

Mods active: Base game only

Expected behavior

Firing a turret should aim from the turret's tile

Actual behavior

Instead it starts aiming from the seat with the controls, causing problems with range calculations. Firing near maximum range will cause the turret to fail silently. This is most noticeable with short ranged weapons like flamethrowers.

Steps to reproduce the behavior

Spawn any vehicle in, and weld a flamethrower and a tank of napalm somewhere other than the driver's seat, farther away will make the problem more obvious. Press f, select a target somewhere far from the turret, and nothing happens.
If you get close to the turret it will work, but this bug dramatically reduces the working range for the turret. If you sit on the turret's own tile, you can fire at tiles that it would fail on were you sitting at the controls.

@ShadowDragon8685

This comment has been minimized.

Show comment
Hide comment
@ShadowDragon8685

ShadowDragon8685 Nov 29, 2017

This might be a case where good intentions are colliding with code;
After all, you are aiming the weapon from wherever your controls are. That's where you're sighting from, so the theory may be that aim penalties from distance, obstruction, etc, should be assessed from your location, not from that of the weapon itself.

On the other hand, and as you bring up with the example of hilariously short-ranged weapons, this leads to a problem with long vehicles, where the weapon itself has a hard and short range, which actually is within range of the target, but you would not be if you were firing that weapon from the tile you're sitting on.

I think the theory may be that aim penalties for range should be assessed from the player's tile, but dispersion, etc, should be assessed from the weapon's tile.

ShadowDragon8685 commented Nov 29, 2017

This might be a case where good intentions are colliding with code;
After all, you are aiming the weapon from wherever your controls are. That's where you're sighting from, so the theory may be that aim penalties from distance, obstruction, etc, should be assessed from your location, not from that of the weapon itself.

On the other hand, and as you bring up with the example of hilariously short-ranged weapons, this leads to a problem with long vehicles, where the weapon itself has a hard and short range, which actually is within range of the target, but you would not be if you were firing that weapon from the tile you're sitting on.

I think the theory may be that aim penalties for range should be assessed from the player's tile, but dispersion, etc, should be assessed from the weapon's tile.

@jeremyshannon

This comment has been minimized.

Show comment
Hide comment
@jeremyshannon

jeremyshannon Nov 29, 2017

Contributor

If you're going to go that route, then it seems to me it'll start to get complicated once you begin taking mirrors and cameras into account. I mean, I've got a camera display and a camera on the back of my vehicle. If I'm looking through the display, shouldn't I be aiming from that tile instead?

Contributor

jeremyshannon commented Nov 29, 2017

If you're going to go that route, then it seems to me it'll start to get complicated once you begin taking mirrors and cameras into account. I mean, I've got a camera display and a camera on the back of my vehicle. If I'm looking through the display, shouldn't I be aiming from that tile instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment