View Issue Details

IDProjectCategoryView StatusLast Update
0006292The Dark ModPhysicspublic27.06.2023 03:58
Reporterjoebarnin Assigned Tonbohr1more  
PriorityurgentSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformPCOSWindowsOS Version11
Product VersionTDM 2.11 
Target VersionTDM 2.12Fixed in VersionTDM 2.12 
Summary0006292: Projectiles don't collide with player at certain angles
DescriptionIn DM 2.11, projectiles moving at angle=0 don't collide with the player, if the player is stationary. It seems to be dependent on the angle of the projectile, and whether the player is moving or not. I've created a simple test case (see below) using atdm:func_shooter, firing a broadhead arrow right at the player. It will pass right through them.

Note that this is a change from DM 2.10. Projectiles behaved correctly in 2.10.
Steps To Reproduceput the attached map files in any mission. From the console:
dmap projectile_0_angle
map projectile_0_angle
start the mission - stand still (do not move). The arrow, fired by a atdm:func_shooter, goes right through the player.

Now, do the same with the other map, projectile_90_angle. This time, the arrow hits the player.

Using these same maps in 2.10, the arrows always hit the player.
TagsNo tags attached.
Attached Files
projectile_0_angle.map (4,755 bytes)   
Version 2
// entity 0
{
"classname" "worldspawn"
"player_classname" "my_player_thief"
// primitive 0
{
brushDef3
{
( 0 0 1 -72 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -368 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -680 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -544 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -584 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -376 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -680 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -584 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 368 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 0 1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -368 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -688 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -544 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 680 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 3
{
brushDef3
{
( 0 1 0 -368 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -680 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 -72 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -544 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -584 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 1 64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -680 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -552 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -584 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 544 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( 0 0 1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -368 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -544 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -592 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 584 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
}
// entity 1
{
"classname" "info_player_start"
"name" "info_player_start_1"
"angle" "-180.000000"
"origin" "544 -328 -64"
}
// entity 2
{
"classname" "light"
"name" "light_1"
"light_center" "0 0 0"
"light_radius" "320 320 320"
"origin" "216 -464 48"
}
// entity 3
{
"classname" "atdm:func_shooter"
"name" "broadhead_shooter"
"angle" "0.000000"
"def_projectile" "atdm:projectile_broadhead"
"origin" "216 -328 -16"
"pitch" "0"
"start_off" "0"
}
projectile_0_angle.map (4,755 bytes)   
projectile_90_angle.map (4,754 bytes)   
Version 2
// entity 0
{
"classname" "worldspawn"
"player_classname" "my_player_thief"
// primitive 0
{
brushDef3
{
( 0 0 1 -72 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -368 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -680 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -544 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -584 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -376 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -680 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -584 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 368 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 0 1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -368 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -688 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -544 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 680 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 3
{
brushDef3
{
( 0 1 0 -368 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -680 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 -72 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -544 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -584 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 1 64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -680 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -552 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -584 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 544 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( 0 0 1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -368 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 -64 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -544 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -592 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 584 ) ( ( 0.001953125 0 0 ) ( 0 0.001953125 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
}
// entity 1
{
"classname" "info_player_start"
"name" "info_player_start_1"
"angle" "-90.000000"
"origin" "216 -32 -64"
}
// entity 2
{
"classname" "light"
"name" "light_1"
"light_center" "0 0 0"
"light_radius" "320 320 320"
"origin" "216 -464 48"
}
// entity 3
{
"classname" "atdm:func_shooter"
"name" "broadhead_shooter"
"angle" "90.000000"
"def_projectile" "atdm:projectile_broadhead"
"origin" "216 -328 -16"
"pitch" "0"
"start_off" "0"
}
projectile_90_angle.map (4,754 bytes)   

Activities

joebarnin

joebarnin

26.06.2023 16:12

reporter   ~0016031


I spent some time in the Visual Studio debugging this issue and I think I found the problem. Looks like the following line in Bounds.cpp (line 163) is incorrect:

if ( idMath::Fabs( cross.z ) > extents.x * ld.y + extents.y * ld.z ) {

it should read

if ( idMath::Fabs( cross.z ) > extents.x * ld.y + extents.y * ld.x ) {

The only change is the final variable, it should be ld.x, not ld.z.

This problem was introduced in SVN 9993 (July 14, 2022). The code was refactored to make it more readable and faster, but it looks like a simple error was introduced.

I made the fix on my machine and it resolves the problem. I don't want to check in the fix (and I suspect I don't have access to do so), so I'll leave it to others to verify this change. But I do think this is a serious bug fix that needs to go into the next release. In fact I think it should be put out as a patch to DM 2.11, since other others have reported this, and I've seen it playing other DMs. Basically, any projectile fired on the East/West axis will not hit an AI target (it will go right though them).

nbohr1more

nbohr1more

27.06.2023 03:57

developer   ~0016032

Added at Rev 10433

Thank you!

Issue History

Date Modified Username Field Change
18.05.2023 15:07 joebarnin New Issue
18.05.2023 15:07 joebarnin File Added: projectile_0_angle.map
18.05.2023 15:07 joebarnin File Added: projectile_90_angle.map
26.06.2023 16:12 joebarnin Note Added: 0016031
27.06.2023 03:57 nbohr1more Note Added: 0016032
27.06.2023 03:57 nbohr1more Status new => resolved
27.06.2023 03:57 nbohr1more Resolution open => fixed
27.06.2023 03:57 nbohr1more Fixed in Version => TDM 2.12
27.06.2023 03:57 nbohr1more Target Version => TDM 2.12
27.06.2023 03:58 nbohr1more Assigned To => nbohr1more