Vgstation13: Firing a gun at someone on the same tile as you causes you to shoot yourself

Created on 15 Jan 2017  路  10Comments  路  Source: vgstation-coders/vgstation13

Description of issue

If you try to point blank shoot a person while standing on the same tile as them, you will shoot yourself, despite the combat text stating you shot at the other person.

Difference between expected and actual behavior

Expected to be able to shoot people while standing over them execution style.
Actually manage to shoot yourself in the face.

Steps to reproduce

Stand on the same tile as someone, shoot at them.

Specific information for locating

Length of time in which bug has been known to occur

Server revision

Issue bingo

Please check whatever applies. More checkboxes checked increase your chances of not being yelled at by every contributor.

  • [x] Issue could be reproduced at least once
  • [x] Issue could be reproduced by different players
  • [x] Issue could be reproduced in multiple rounds
  • [x] Issue happened in a recent (less than 7 days ago) round
  • [haventchecked] [Couldn't find an existing issue about this](https://github.com/d3athrow/vgstation13/issues)
Bug / Fix

Most helpful comment

user.bullet_act(in_chamber)

user

:thinking:

All 10 comments

T-thanks lummox

Odd that it still says you hit them
Let's just go with both for now

It's possible that you actually hit yourself _and_ the person you aim at, I've never been wearing a medHUD to test
Edit: Just tested, you only shoot yourself.
gunicide

What mystifies me is that there's explicit handling for point-blank shots but it's actually shooting the projectile like any other shot instead of just directly telling it what it hit.

Making it work that way would solve this specific problem, but not shooting a lying person on a tile where a person is also standing and hitting the standing one, shooting anyone on any tile that also contains any dense non-mob object and hitting the object, etc.

Someday maybe I'll get around to fixing Bump() "properly"

https://github.com/d3athrow/vgstation13/blob/Bleeding-Edge/code/modules/projectiles/gun.dm#L184

if(targloc == curloc)
    user.bullet_act(in_chamber)
    qdel(in_chamber)
    in_chamber = null
    update_icon()
    return

You can also point-blank yourself with the RPG without exploding because of this.

user.bullet_act(in_chamber)

user

:thinking:

Some sort of poorly considered suicide code, I'd guess.
Or a crippling logic error that was .100% tested. Could be either.

This isn't BYOND's fault then.

amazing.

Still a bug lol.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

D3athrow-Issues picture D3athrow-Issues  路  3Comments

Arthurdentist picture Arthurdentist  路  3Comments

D3athrow-Issues picture D3athrow-Issues  路  3Comments

Supermichael777 picture Supermichael777  路  3Comments

D3athrow-Issues picture D3athrow-Issues  路  3Comments