debug box flag update for puppycam and puppylights

This commit is contained in:
Fazana
2021-09-17 14:37:47 +01:00
parent ce9abd6aff
commit 02a6bf0f95
2 changed files with 4 additions and 4 deletions

View File

@@ -1052,7 +1052,7 @@ static s32 puppycam_check_volume_bounds(struct sPuppyVolume *volume, s32 index)
vec3f_set(debugPos[0], sPuppyVolumeStack[index]->pos[0], sPuppyVolumeStack[index]->pos[1], sPuppyVolumeStack[index]->pos[2]);
vec3f_set(debugPos[1], sPuppyVolumeStack[index]->radius[0], sPuppyVolumeStack[index]->radius[1], sPuppyVolumeStack[index]->radius[2]);
debug_box_color(0x0000FF00);
debug_box_rot(debugPos[0], debugPos[1], sPuppyVolumeStack[index]->rot, DEBUG_SHAPE_BOX);
debug_box_rot(debugPos[0], debugPos[1], sPuppyVolumeStack[index]->rot, DEBUG_SHAPE_BOX | DEBUG_UCODE_DEFAULT);
#endif
//Now compare values.
if (-sPuppyVolumeStack[index]->radius[0] < pos[0] && pos[0] < sPuppyVolumeStack[index]->radius[0] &&
@@ -1077,7 +1077,7 @@ static s32 puppycam_check_volume_bounds(struct sPuppyVolume *volume, s32 index)
vec3f_set(debugPos[0], sPuppyVolumeStack[index]->pos[0], sPuppyVolumeStack[index]->pos[1], sPuppyVolumeStack[index]->pos[2]);
vec3f_set(debugPos[1], sPuppyVolumeStack[index]->radius[0], sPuppyVolumeStack[index]->radius[1], sPuppyVolumeStack[index]->radius[2]);
debug_box_color(0x0000FF00);
debug_box_rot(debugPos[0], debugPos[1], sPuppyVolumeStack[index]->rot, DEBUG_SHAPE_CYLINDER);
debug_box_rot(debugPos[0], debugPos[1], sPuppyVolumeStack[index]->rot, DEBUG_SHAPE_CYLINDER | DEBUG_UCODE_DEFAULT);
#endif
distCheck = (dist < sPuppyVolumeStack[index]->radius[0]);

View File

@@ -125,9 +125,9 @@ void puppylights_iterate(struct PuppyLight *light, Lights1 *src, struct Object *
vec3f_set(debugPos[1], light->pos[1][0], light->pos[1][1], light->pos[1][2]);
debug_box_color(0x08FF00FF);
if (light->flags & PUPPYLIGHT_SHAPE_CYLINDER)
debug_box_rot(debugPos[0], debugPos[1], light->yaw, DEBUG_SHAPE_CYLINDER);
debug_box_rot(debugPos[0], debugPos[1], light->yaw, DEBUG_SHAPE_CYLINDER | DEBUG_UCODE_DEFAULT);
else
debug_box_rot(debugPos[0], debugPos[1], light->yaw, DEBUG_SHAPE_BOX);
debug_box_rot(debugPos[0], debugPos[1], light->yaw, DEBUG_SHAPE_BOX | DEBUG_UCODE_DEFAULT);
#endif
//Check if the object is inside the box, after correcting it for rotation.
if (-light->pos[1][0] < lightPos[0] && lightPos[0] < light->pos[1][0] &&