project-navigation
Personal tools

Author Topic: Suggestion about chance to hit calculation  (Read 7272 times)

Rani

  • Guest
Suggestion about chance to hit calculation
« on: September 06, 2006, 08:51:48 am »
In CL_TargetingToHit [cl_actor.c , line 1671] ,
change all the call for CM_TestLine to CM_EntTestLine
to reflect that the firing arc can be blocked by
other actors [other team members, civilians, other aliens].

Also , before making the soldier shoot in reaction
fire, make sure the chance to hit is larger
then some given percentage [unless in panic] .

Offline Bandobras

  • Captain
  • *****
  • Posts: 586
    • View Profile
Re: Suggestion about chance to hit calculation
« Reply #1 on: September 06, 2006, 12:46:47 pm »
Quote from: "Rani"
In CL_TargetingToHit [cl_actor.c , line 1671] ,
change all the call for CM_TestLine to CM_EntTestLine
to reflect that the firing arc can be blocked by
other actors [other team members, civilians, other aliens].


Nice idea. Is it tested?

Quote
Also , before making the soldier shoot in reaction
fire, make sure the chance to hit is larger
then some given percentage [unless in panic] .


I think it's already done, but the chance to hit calculations are buggy. Could you verify (and fix:-)?

Rani

  • Guest
Suggestion about chance to hit calculation
« Reply #2 on: September 06, 2006, 02:00:46 pm »
No, there is no "hit chance" check in
reaction fire. It just shoots if visibility>0.4,
which doesnt say anything on range ect.

Also, sadly i cant "test&fix" anything , becouse ,
like i stated in my other post, i cant get into a mission
with the svn version.

Offline Bandobras

  • Captain
  • *****
  • Posts: 586
    • View Profile
Suggestion about chance to hit calculation
« Reply #3 on: September 06, 2006, 03:50:59 pm »
Quote from: "Rani"
No, there is no "hit chance" check in
reaction fire. It just shoots if visibility>0.4,
which doesnt say anything on range ect.


Yes, no range, but perhaps an incomplete (and buggy) probability to hit friendly units, after all?

Quote
Also, sadly i cant "test&fix" anything , becouse ,
like i stated in my other post, i cant get into a mission
with the svn version.


Wow, you contribute without being even able to run the game once! =*-O

P.S. Unfortunately there is no difference when using CM_TestLine and CM_EntTestLine. I don't know why...

Rani

  • Guest
Suggestion about chance to hit calculation
« Reply #4 on: September 06, 2006, 05:08:43 pm »
Probably the function is broken.
I suspect that "inline" list, what ever it is.

At any rate, I guess it can be replaced with a trace.

Offline Bandobras

  • Captain
  • *****
  • Posts: 586
    • View Profile
Suggestion about chance to hit calculation
« Reply #5 on: September 07, 2006, 12:41:35 am »
When you have any patch ready, please post...

Rani

  • Guest
Suggestion about chance to hit calculation
« Reply #6 on: September 07, 2006, 11:26:49 am »
Just as I suspected. Inline list is always empty.

I'v seached, and nothing is actually added to the
list anywhere in the code...

Any idea whats it for/where should it be updated,
and with what?

Edit: Did some sniffing. Looks like inline is only used
for models inside the map files.
If this is correct, then this function
ignores actors. What a shame.

Can someone verify that?

Offline Bandobras

  • Captain
  • *****
  • Posts: 586
    • View Profile
Suggestion about chance to hit calculation
« Reply #7 on: September 08, 2006, 07:27:32 am »
As far as I can tell, Inline list is updated with whatever a function wants to put there. And then it's usually emptied right before the function end. So, you can probably put there also the soldiers...