Pass up various return values
This commit is contained in:
parent
9dbc7c5cfe
commit
ba914fea81
|
@ -92,7 +92,7 @@ static int calc_rod_corners(rod_4point &rod_point_group, const g3s_point &bot_po
|
|||
codes_and &= g3_code_point(i);
|
||||
|
||||
if (codes_and)
|
||||
return 1; //1 means off screen
|
||||
return codes_and; //1 means off screen
|
||||
|
||||
//clear flags for new points (not projected)
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ static int ok_for_buddy_to_talk(void)
|
|||
}
|
||||
|
||||
if (Buddy_allowed_to_talk)
|
||||
return 1;
|
||||
return Buddy_allowed_to_talk;
|
||||
|
||||
const segment *const segp = vcsegptr(buddy->segnum);
|
||||
|
||||
|
|
|
@ -1808,8 +1808,7 @@ int ai_door_is_openable(
|
|||
if ((wallp->type == WALL_DOOR) && (wallp->keys == KEY_NONE) && !(wallp->flags & WALL_DOOR_LOCKED))
|
||||
return 1;
|
||||
else if (wallp->keys != KEY_NONE) { // Allow bots to open doors to which player has keys.
|
||||
if (powerup_flags & static_cast<PLAYER_FLAG>(wallp->keys))
|
||||
return 1;
|
||||
return powerup_flags & static_cast<PLAYER_FLAG>(wallp->keys);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,15 +1249,14 @@ static int sphere_intersects_wall(const vms_vector &pnt, const vcsegptridx_t seg
|
|||
return 1;
|
||||
}
|
||||
else if (!visited[child]) { //haven't visited here yet
|
||||
if (sphere_intersects_wall(pnt, seg.absolute_sibling(child), rad, hresult, visited))
|
||||
return 1;
|
||||
if (auto r = sphere_intersects_wall(pnt, seg.absolute_sibling(child), rad, hresult, visited))
|
||||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue