View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006751 | The Dark Mod | AI | public | 19.11.2026 00:48 | 19.11.2026 15:31 |
| Reporter | joebarnin | Assigned To | |||
| Priority | normal | Severity | normal | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | TDM 2.14 | ||||
| Summary | 0006751: When fleeing, AIs sometimes fail to open doors | ||||
| Description | This is related to this thread: https://forums.thedarkmod.com/index.php?/topic/22674-fleeing-ai-unable-to-open-doors. I think I've narrowed down the issue. If the flee point is on the "same side" of the door, the AI won't open the door even if he needs to get to the flee point. Instead he just runs in circles. By "same side", I mean if you divide the map in two, using the plane of the door as the dividing line, a flee point that's on the same half of the map as the AI will cause the problem. | ||||
| Steps To Reproduce | Use attached map (ft.map). Run two tests: 1). Start with the original ft.map. Edit in DR. Delete path_flee_point_2 and save the map. dmap ft, then map ft. Once the AI notices the thief, he will open the door and run to the flee point. 2). Start with the original ft.map. Edit in DR. Delete path_flee_point_1 and save the map. dmap ft, then map ft. Once the AI notices the thief, he will run in circles and not open the door. The difference is that path_flee_point_1 is "north" of the door, so it's on the "other side" from the AI. Whereas path_flee_point_2 is "south" of the door, so it's on the same side of the door as the AI. (Sorry, that's the best way I can describe it). | ||||
| Tags | No tags attached. | ||||
| Attached Files | ft.map (10,043 bytes)
Version 2
// entity 0
{
"classname" "worldspawn"
// primitive 0
{
brushDef3
{
( 0 0 1 -312 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0.375 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -384 ) ( ( 0.002441406213620212 0 9.18709552877317e-15 ) ( 0 0.002441406213620212 4.329869796038111e-15 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -624 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 1.554312234475219e-15 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -320 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620213 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -104 ) ( ( 0.002441406213620212 0 -0.3125 ) ( 0 0.002441406213620213 8.326672684688674e-17 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 304 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0.375 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 1 -304 ) ( ( 0.002441406213620212 0 -0.9374999860301527 ) ( 0 0.002441406213620212 0.3749999999999973 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -392 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620213 -1.110223024625157e-16 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -624 ) ( ( 0.002441406213620212 0 -0.9374999860301612 ) ( 0 0.002441406213620212 1.409983241273949e-14 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 136 ) ( ( 0.002441406213620212 0 -0.9374999860301567 ) ( 0 0.002441406213620212 -1.77635683940025e-15 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -104 ) ( ( 0.002441406213620212 0 0.6249999860301614 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 384 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620213 -1.110223024625157e-16 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 0 1 -304 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 -0.5624999860301614 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -384 ) ( ( 0.002441406213620212 0 0.937499986030133 ) ( 0 0.002441406213620213 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -632 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 1.998401444325282e-15 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 136 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0.9374999860301612 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -320 ) ( ( 0.002441406213620212 0 -0.937499986030129 ) ( 0 0.002441406213620213 -6.217248937900877e-15 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 624 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 1.77635683940025e-15 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 3
{
brushDef3
{
( 0 1 0 -384 ) ( ( 0.002441406213620212 0 2.775557561562891e-17 ) ( 0 0.002441406213620212 -4.163336342344337e-16 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -624 ) ( ( 0.002441406213620213 0 -4.996003610813204e-16 ) ( 0 0.002441406213620212 1.970645868709653e-15 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 128 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -320 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620213 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -104 ) ( ( 0.002441406213620212 0 -0.3125 ) ( 0 0.002441406213620213 8.326672684688674e-17 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 1 -136 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 1 -304 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0.375 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -624 ) ( ( 0.002441406213620212 0 3.996802888650564e-15 ) ( 0 0.002441406213620213 5.551115123125783e-16 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 136 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -328 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620213 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -104 ) ( ( 0.002441406213620212 0 -0.3125 ) ( 0 0.002441406213620213 8.326672684688674e-17 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 320 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620213 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( 0 0 1 -304 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0.375 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 -384 ) ( ( 0.002441406213620212 0 4.440892098500626e-16 ) ( 0 0.002441406213620213 -8.881784197001252e-16 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 136 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -320 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620213 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -112 ) ( ( 0.002441406213620212 0 -0.3125 ) ( 0 0.002441406213620213 8.326672684688674e-17 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 104 ) ( ( 0.002441406213620212 0 -1.249999986030161 ) ( 0 0.002441406213620212 2.775557561562891e-17 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 6
{
brushDef3
{
( 0 0 1 -304 ) ( ( 0.002441406213620219 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 184 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 136 ) ( ( 0.002441406213620219 0 0 ) ( 0 0.002441406213620212 0.3125 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -192 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -104 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 77 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 7
{
brushDef3
{
( 0 0 1 -304 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 192 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -40 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 136 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -320 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 32 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 8
{
brushDef3
{
( 0 0 1 -304 ) ( ( 0.002441406213620219 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 184 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 1 0 0 -40 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 0 -1 136 ) ( ( 0.002441406213620219 0 0 ) ( 0 0.002441406213620212 0.3125 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -192 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -21 ) ( ( 0.002441406213620212 0 -0.5200195235011053 ) ( 0 0.002441406213620213 1.110223024625157e-16 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
// primitive 9
{
brushDef3
{
( 0 0 1 -304 ) ( ( 0.002441406213620219 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 1 0 184 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( 0 -1 0 -192 ) ( ( 0.002441406213620212 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
( -1 0 0 -77 ) ( ( 0.002441406213620219 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 21 ) ( ( 0.002441406213620219 0 0 ) ( 0 0.002441406213620212 0 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 226 ) ( ( 0 -0.002441406213620212 5.551115123125783e-17 ) ( 0.002441406213620212 0 -0.08300781126308721 ) ) "textures/darkmod/wood/boards/dark_redwood" 0 0 0
}
}
}
// entity 1
{
"classname" "light"
"name" "light_1"
"origin" "256 128 207"
"light_center" "0 0 0"
"light_radius" "832 576 320"
}
// entity 2
{
"classname" "light"
"name" "light_2"
"origin" "0 -256 215"
"light_center" "0 0 0"
"light_radius" "320 320 320"
}
// entity 3
{
"classname" "atdm:door_104x56_2hinge"
"name" "door_104x56x2hinge_1"
"lock_picktype" "-"
"lock_pins" "0"
"locked" "0"
"origin" "-77 -188 136"
"rotate" "0 90 0"
"skin" "door_004"
"used_by" "-"
"rotation" "1 0 0 0 1 0 0 0 1"
}
// entity 4
{
"classname" "atdm:handle_curved_rotate_double_right"
"name" "doorhandle_104x56x3hinge_3"
"bind" "door_104x56x2hinge_1"
"origin" "-25 -188 186"
"rotation" "1 0 0 0 1 0 0 0 1"
}
// entity 5
{
"classname" "info_player_start"
"name" "info_player_start_1"
"angle" "90"
"origin" "-54 -296 181"
}
// entity 6
{
"classname" "atdm:ai_merchant01"
"name" "atdm_ai_merchant01_1"
"origin" "7 -224 136.147"
"rotation" "1 0 0 0 1 0 0 0 1"
}
// entity 7
{
"classname" "path_flee_point"
"name" "path_flee_point_1"
"origin" "577 -131 136"
}
// entity 8
{
"classname" "path_flee_point"
"name" "path_flee_point_2"
"origin" "569 -227 136"
}
| ||||
|
I spent a little time debugging & looking at the code. I think the problem is related to this part of HandleDoorTask.cpp, circa line 121: // grayman 0004227 - if you're on the same side of this door as your // destination, and you're searching, why go through the door? _doorSide = owner->GetDoorSide(frobDoor,owner->GetPhysics()->GetOrigin()); // grayman 0004227 if ( owner->IsSearching() ) { int pointSide = owner->GetDoorSide(frobDoor, owner->GetMoveDest()); // grayman 0004227 if ( _doorSide == pointSide ) { subsystem.FinishTask(); return; } } In the failure case, _doorSide == pointSide and the code returns, and thus the AI never tries to open the door. |
|