project-navigation
Personal tools

Author Topic: setting up a target, green or red  (Read 5416 times)

Offline pe9298

  • Rookie
  • ***
  • Posts: 34
    • View Profile
setting up a target, green or red
« on: May 13, 2017, 10:35:15 pm »
When you are setting up a target, you get a green or red direction line.

If it is green, can you be 100% certain you will not hit your own men? (Of course this could happen with grenades etc, but what about normal shots?)

If it is red but you have a non-zero success score (implying that you are punching a hole in something before reaching the target), do you ever go ahead and fire?


Offline Norby

  • Rookie
  • ***
  • Posts: 43
    • View Profile
Re: setting up a target, green or red
« Reply #1 on: May 14, 2017, 12:17:08 am »
If it is green, can you be 100% certain you will not hit your own men?
It depends on the aiming ability of the solider. An experienced colonel never make a mistake but riflemen's shots show high dispersion so you should leave more room between the line and friends.

Punching is possible regardless of the red line but need Sniper Rifle, Coilgun or EM Rifle. Other bullets can not go through walls/floors but these can. Thick walls block these also: if the targeted alien doesn't grunt after a high probability sniper shot through a wall then the wall is too wide to penetrate.
« Last Edit: May 14, 2017, 12:19:19 am by Norby »

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: setting up a target, green or red
« Reply #2 on: May 14, 2017, 12:49:12 pm »
Red targeting line only means that there is an obstacle in the ideal line of fire. It does not tell you anything about hit success.

-geever

Offline anonymissimus

  • Sergeant
  • *****
  • Posts: 347
    • View Profile
Re: setting up a target, green or red
« Reply #3 on: May 22, 2017, 10:51:30 am »
The thickness of an obstacle tells nothing about being able to shoot through. I can shoot through hills or meters of solid rock. Other seemingly thin walls with a target right behind can be hit by coilgun or antimatter ammunition to no avail.
Red lines can still cause a hit. Especially with weapons with several or many shots such as the needler some of the shots will go through if there is not a solid obstacle but bars or something with holes like a fence.
So, to summarize, both the chance for friendly fire as well as the chance to hit can only really be told by the mind and experience of the player.

Offline Sandro

  • Squad Leader
  • ****
  • Posts: 240
  • Maintenance guy for UFO:AI 3D engine
    • View Profile
Re: setting up a target, green or red
« Reply #4 on: June 02, 2017, 03:53:09 pm »
Game does not care for the thickness of obstacle, only the count of them along the projectile's path. Could be considered a bug.

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: setting up a target, green or red
« Reply #5 on: June 03, 2017, 04:08:49 am »
But we do have:
Code: [Select]
g_combat.cpp:38:#define MAX_WALL_THICKNESS_FOR_SHOOTING_THROUGH 8Which is used at g_combat.cpp:1061 when a shot goes through an obstacle, so the game does care about thickness, just in a buggy way apparently.

Offline Sandro

  • Squad Leader
  • ****
  • Posts: 240
  • Maintenance guy for UFO:AI 3D engine
    • View Profile
Re: setting up a target, green or red
« Reply #6 on: June 04, 2017, 02:13:10 pm »
But we do have:
Code: [Select]
g_combat.cpp:38:#define MAX_WALL_THICKNESS_FOR_SHOOTING_THROUGH 8Which is used at g_combat.cpp:1061 when a shot goes through an obstacle, so the game does care about thickness, just in a buggy way apparently.

It doesn't, since G_Trace() does not work as expected by the author of this code.
At the end, it indirectly calls SV_Trace(), which got a hack to avoid player and other moving objects being caught in solids -- and also disables solidity check for firing from INSIDE the solids.
That effectively disables the wall thickness checking code.