Description
Describe the bug
Whenever you drag a piece of furniture it will be obstructed by traps that are not visible to the player.
Message is '(something) collides with (dragged object)".
which is weird because how would the player know that.
For dragged vehicles [like a shopping cart] it doesn't have this message but instead a check is done to see if it triggers the trap.
Seems like this would be the correct behavior for furniture also.
Also look at the code with my limited insight it seems that this is how it should work also.,
Attach save file
N/A
Steps to reproduce
place a trap with debug map-editor.. one that's maybe hard to spot for your character..
Try and drag a piece of furniture over and see the blocked message appear both if it's detected and undetected.
(then spawn a shopping cart and successfully blow yourself up when dragging it over a buried landmine.)
Expected behavior
Expected is that hidden traps will not block dragged furniture.. THink of a buried landmine or buried beartrap. Or something small like a tripwire..
They should probably, like dragged vehicles, have a one-time check to trigger them.
Screenshots
No response
Versions and configuration
win7
06460ed (tiles)
Additional context
Maybe, the problem is in
src
/vehicle_move.cpp
line 777:
if( just_detect ) {
// DO insert the first collision so we can tell what was it
return true;
}
as this function seems to get called with this flag set to true, and this will cause it to just return without doing anything useful (it seems)
it is called from
src
/grab.cpp
line 167:
const bool failed = grabbed_vehicle->collision( colls, actual_dir, true );
which will cause the movement-block in the same file at line 184:
if( final_dp_veh == tripoint_zero ) {
add_msg( _( "The %s collides with %s." ), grabbed_vehicle->name, blocker_name );
u.grab_point = prev_grab;
return true;
}