Captain's log, 010208. Still no insights into my problem walking on meshes. But I do have new evidence. I've dumped diagnostic information about the entity to a file. The data doesn't suggest that my movement code it to blame. Here's a chunk of my movement code:
Code:
// Move the player
distance_moved = c_move(me, move_to_vector, nullvector, GLIDE|IGNORE_SPRITES|IGNORE_PASSABLE);
if (key_z)
{
diag_var("\nx: %6.3f",my.x);
diag_var("\ny: %6.3f",my.y);
diag_var("\nz: %6.3f",my.z);
diag_var("\ndistance to ground: %6.3f",distance_to_ground);
diag_var("\nmove to x: %6.3f",move_to_vector.x);
diag_var("\nmove to y: %6.3f",move_to_vector.y);
diag_var("\nmove to z: %6.3f",move_to_vector.z);
diag_var("\ndistance moved: %6.3f", distance_moved);
diag_var("\nin solid: %6.3f",in_solid);
}
Here's some diagnostic information that I gathered while the entity is stuck:
Code:
x: -512.035
y: 236.587
z: 136.929
distance to ground: 0.000
move to x: 2.971
move to y: 0.000
move to z: 0.000
distance moved: 0.000
in solid: 0.000
// .. next loop
x: -512.035
y: 236.587
z: 136.929
distance to ground: 0.000
move to x: 2.979
move to y: 0.000
move to z: 0.000
distance moved: 0.000
Notice that I'm attempting to move the entity forward 2.979 quants. c_move isn't moving the entity. However, it's also not reporting that I'm stuck in a block. During these frames, I'm not trying to move in the z-direction. distance_moved is set to 0. I'm not sure how helpful that is. Am I looking at an engine bug?
EDIT: One more thing. When I get stuck, a "blocked" event does get triggered.
Thanks,
- Bret