Bug 5508 - "CanDamage" sometimes doesn't damage player
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: PC All
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2012-05-03 06:02 EDT by Kuehnhammer Tobias
Modified: 2013-02-11 17:11:08 EST
1 user (show)

See Also:


Attachments
bugfix for "CanDamage" function (4.36 KB, patch)
2012-05-03 06:02 EDT, Kuehnhammer Tobias

Description Kuehnhammer Tobias 2012-05-03 06:02:54 EDT
Created attachment 3142 [details]
bugfix for "CanDamage" function

Hi, 

Here is another patch for a bug in (io)quake3:

-------------------------------------------------------------------------------

BUG: Sometimes inflictor causes no damage to a target!
     In other words, sometimes rockets, grenades etc. doesn't damage players.

-------------------------------------------------------------------------------

TEST: You will notice this bug not often, but if it happens, you will notice it
      because a victim will even survive a quad/bfg shot.
      Search for walls with a height of ~ 40 units (q3dm1 windows, mpteam5)
      or create a test map:
           ________
           |      |
           |      |
           |      |
           | BBOX |    
           |      | __x__ <--- Impact point on top of wall = No damage  
           |      | |   |
           |      | |   | <--- Wall with a height of 32 - 48 units 
     ______|______|_|   |_______

     Stay near to this wall, fire a rocket on the top plane of that wall!
     Try to hit the center of that plane, you won't get damaged!

-------------------------------------------------------------------------------

(POSSIBLE) SOLUTION: see attached patch!

-------------------------------------------------------------------------------

NOTE: The id comment: // this should probably check in the plane of projection,
                         rather than in world coordinate, and also include Z

      represents what I am talking about. I didn't delete it because maybe 
      there is a better solution for that bug. On planes with a hight of 48
      units the bug still occurs, maybe alter the offset vectors.

-------------------------------------------------------------------------------

I'm not sure if this solution is the best, so please check it out before you use
it. And as always if I did something wrong, forget about the patch!

with best regards, 

Tobias Kuehnhammer
Comment 1 Zack Middleton 2013-02-11 17:11:08 EST
Applied patch (which mirror whitespace changes): https://github.com/ioquake/ioq3/commit/2147f2b7c23ffbd52191c0ab5b6e9a16c1d63ffe