Pass player_is_visible_from_object arg by &
This commit is contained in:
parent
1aadba5837
commit
93113bc400
|
@ -131,7 +131,7 @@ void attempt_to_resume_path(vobjptridx_t objp);
|
|||
void do_ai_robot_hit_attack(vobjptridx_t robot, objptridx_t player, vms_vector *collision_point);
|
||||
extern void ai_open_doors_in_segment(object *robot);
|
||||
extern int ai_door_is_openable(object *objp, segment *segp, int sidenum);
|
||||
int player_is_visible_from_object(vobjptridx_t objp, vms_vector *pos, fix field_of_view, const vms_vector &vec_to_player);
|
||||
int player_is_visible_from_object(vobjptridx_t objp, vms_vector &pos, fix field_of_view, const vms_vector &vec_to_player);
|
||||
extern void ai_reset_all_paths(void); // Reset all paths. Call at the start of a level.
|
||||
int ai_multiplayer_awareness(vobjptridx_t objp, int awareness_level);
|
||||
|
||||
|
|
|
@ -636,7 +636,7 @@ fix Dist_to_last_fired_upon_player_pos = 0;
|
|||
// 2 Player is visible and in field of view.
|
||||
// Note: Uses Believed_player_pos as player's position for cloak effect.
|
||||
// NOTE: Will destructively modify *pos if *pos is outside the mine.
|
||||
int player_is_visible_from_object(vobjptridx_t objp, vms_vector *pos, fix field_of_view, const vms_vector &vec_to_player)
|
||||
int player_is_visible_from_object(vobjptridx_t objp, vms_vector &pos, fix field_of_view, const vms_vector &vec_to_player)
|
||||
{
|
||||
fix dot;
|
||||
fvi_query fq;
|
||||
|
@ -647,12 +647,12 @@ int player_is_visible_from_object(vobjptridx_t objp, vms_vector *pos, fix field_
|
|||
objp->ctype.ai_info.SUB_FLAGS &= ~SUB_FLAGS_GUNSEG;
|
||||
#endif
|
||||
|
||||
fq.p0 = pos;
|
||||
if ((pos->x != objp->pos.x) || (pos->y != objp->pos.y) || (pos->z != objp->pos.z)) {
|
||||
segnum_t segnum = find_point_seg(pos, objp->segnum);
|
||||
fq.p0 = &pos;
|
||||
if ((pos.x != objp->pos.x) || (pos.y != objp->pos.y) || (pos.z != objp->pos.z)) {
|
||||
segnum_t segnum = find_point_seg(&pos, objp->segnum);
|
||||
if (segnum == segment_none) {
|
||||
fq.startseg = objp->segnum;
|
||||
*pos = objp->pos;
|
||||
pos = objp->pos;
|
||||
move_towards_segment_center(objp);
|
||||
} else
|
||||
{
|
||||
|
@ -1673,7 +1673,7 @@ int Robot_sound_volume=DEFAULT_ROBOT_SOUND_VOLUME;
|
|||
// If the player is cloaked, set vec_to_player based on time player cloaked and last uncloaked position.
|
||||
// Updates ailp->previous_visibility if player is not cloaked, in which case the previous visibility is left unchanged
|
||||
// and is copied to player_visibility
|
||||
static void compute_vis_and_vec(vobjptridx_t objp, vms_vector *pos, ai_local *ailp, vms_vector &vec_to_player, int *player_visibility, const robot_info *robptr, int *flag)
|
||||
static void compute_vis_and_vec(vobjptridx_t objp, vms_vector &pos, ai_local *ailp, vms_vector &vec_to_player, int *player_visibility, const robot_info *robptr, int *flag)
|
||||
{
|
||||
if (!*flag) {
|
||||
if (Players[Player_num].flags & PLAYER_FLAGS_CLOAKED) {
|
||||
|
@ -1689,18 +1689,18 @@ static void compute_vis_and_vec(vobjptridx_t objp, vms_vector *pos, ai_local *ai
|
|||
vm_vec_scale_add2(Ai_cloak_info[cloak_index].last_position, randvec, 8*delta_time );
|
||||
}
|
||||
|
||||
dist = vm_vec_normalized_dir_quick(vec_to_player, Ai_cloak_info[cloak_index].last_position, *pos);
|
||||
dist = vm_vec_normalized_dir_quick(vec_to_player, Ai_cloak_info[cloak_index].last_position, pos);
|
||||
*player_visibility = player_is_visible_from_object(objp, pos, robptr->field_of_view[Difficulty_level], vec_to_player);
|
||||
// *player_visibility = 2;
|
||||
|
||||
if ((ailp->next_misc_sound_time < GameTime64) && (ready_to_fire_any_weapon(robptr, ailp, F1_0)) && (dist < F1_0*20))
|
||||
{
|
||||
ailp->next_misc_sound_time = GameTime64 + (d_rand() + F1_0) * (7 - Difficulty_level) / 1;
|
||||
digi_link_sound_to_pos( robptr->see_sound, objp->segnum, 0, pos, 0 , Robot_sound_volume);
|
||||
digi_link_sound_to_pos( robptr->see_sound, objp->segnum, 0, &pos, 0 , Robot_sound_volume);
|
||||
}
|
||||
} else {
|
||||
// Compute expensive stuff -- vec_to_player and player_visibility
|
||||
vm_vec_normalized_dir_quick(vec_to_player, Believed_player_pos, *pos);
|
||||
vm_vec_normalized_dir_quick(vec_to_player, Believed_player_pos, pos);
|
||||
if ((vec_to_player.x == 0) && (vec_to_player.y == 0) && (vec_to_player.z == 0)) {
|
||||
vec_to_player.x = F1_0;
|
||||
}
|
||||
|
@ -1724,19 +1724,19 @@ static void compute_vis_and_vec(vobjptridx_t objp, vms_vector *pos, ai_local *ai
|
|||
{
|
||||
if (ailp->previous_visibility == 0) {
|
||||
if (ailp->time_player_seen + F1_0/2 < GameTime64) {
|
||||
digi_link_sound_to_pos( robptr->see_sound, objp->segnum, 0, pos, 0 , Robot_sound_volume);
|
||||
digi_link_sound_to_pos( robptr->see_sound, objp->segnum, 0, &pos, 0 , Robot_sound_volume);
|
||||
ailp->time_player_sound_attacked = GameTime64;
|
||||
ailp->next_misc_sound_time = GameTime64 + F1_0 + d_rand()*4;
|
||||
}
|
||||
} else if (ailp->time_player_sound_attacked + F1_0/4 < GameTime64) {
|
||||
digi_link_sound_to_pos( robptr->attack_sound, objp->segnum, 0, pos, 0 , Robot_sound_volume);
|
||||
digi_link_sound_to_pos( robptr->attack_sound, objp->segnum, 0, &pos, 0 , Robot_sound_volume);
|
||||
ailp->time_player_sound_attacked = GameTime64;
|
||||
}
|
||||
}
|
||||
|
||||
if ((*player_visibility == 2) && (ailp->next_misc_sound_time < GameTime64)) {
|
||||
ailp->next_misc_sound_time = GameTime64 + (d_rand() + F1_0) * (7 - Difficulty_level) / 2;
|
||||
digi_link_sound_to_pos( robptr->attack_sound, objp->segnum, 0, pos, 0 , Robot_sound_volume);
|
||||
digi_link_sound_to_pos( robptr->attack_sound, objp->segnum, 0, &pos, 0 , Robot_sound_volume);
|
||||
}
|
||||
ailp->previous_visibility = *player_visibility;
|
||||
}
|
||||
|
@ -3041,7 +3041,7 @@ void do_ai_frame(const vobjptridx_t obj)
|
|||
else {
|
||||
if (cheats.robotskillrobots) {
|
||||
vis_vec_pos = obj->pos;
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
if (player_visibility) {
|
||||
objnum_t min_obj = object_none;
|
||||
fix min_dist = F1_0*200, cur_dist;
|
||||
|
@ -3255,7 +3255,7 @@ _exit_cheat:
|
|||
}
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
{
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
if (player_visibility == 1) // Only increase visibility if unobstructed, else claw guys attack through doors.
|
||||
player_visibility = 2;
|
||||
} else if (((obj_ref&3) == 0) && !previous_visibility && (dist_to_player < F1_0*100)) {
|
||||
|
@ -3267,7 +3267,7 @@ _exit_cheat:
|
|||
if ((fixmul(rval, sval) < FrameTime) || (Players[Player_num].flags & PLAYER_FLAGS_HEADLIGHT_ON)) {
|
||||
ailp->player_awareness_type = PA_PLAYER_COLLISION;
|
||||
ailp->player_awareness_time = F1_0*3;
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
if (player_visibility == 1) {
|
||||
player_visibility = 2;
|
||||
}
|
||||
|
@ -3315,7 +3315,7 @@ _exit_cheat:
|
|||
aip->GOAL_STATE = AIS_FIRE;
|
||||
if (aip->CURRENT_STATE == AIS_FLIN)
|
||||
aip->CURRENT_STATE = AIS_FIRE;
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
{ int pv = player_visibility;
|
||||
fix dtp = dist_to_player/4;
|
||||
|
@ -3343,7 +3343,7 @@ _exit_cheat:
|
|||
if (aip->CURRENT_STATE == AIS_FLIN)
|
||||
aip->CURRENT_STATE = AIS_FIRE;
|
||||
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
pv = player_visibility;
|
||||
|
||||
|
@ -3409,7 +3409,7 @@ _exit_cheat:
|
|||
if (ConsoleObject->segnum == obj->segnum) {
|
||||
if (!ai_multiplayer_awareness(obj, 97))
|
||||
return;
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
move_away_from_player(obj, vec_to_player, 0);
|
||||
ai_multi_send_robot_position(obj, -1);
|
||||
} else if (ailp->mode != AIM_STILL) {
|
||||
|
@ -3428,7 +3428,7 @@ _exit_cheat:
|
|||
|
||||
#if defined(DXX_BUILD_DESCENT_II)
|
||||
if (ailp->next_action_time < 0) {
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
if (player_visibility) {
|
||||
make_nearby_robot_snipe();
|
||||
ailp->next_action_time = (NDL - Difficulty_level) * 2*F1_0;
|
||||
|
@ -3436,7 +3436,7 @@ _exit_cheat:
|
|||
}
|
||||
#endif
|
||||
} else {
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
if (player_visibility) {
|
||||
if (!ai_multiplayer_awareness(obj, 50))
|
||||
return;
|
||||
|
@ -3458,7 +3458,7 @@ _exit_cheat:
|
|||
}
|
||||
|
||||
if (!(obj_ref & 3) || previous_visibility) {
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
// If this sniper is in still mode, if he was hit or can see player, switch to snipe mode.
|
||||
if (ailp->mode == AIM_STILL)
|
||||
|
@ -3474,7 +3474,7 @@ _exit_cheat:
|
|||
// More special ability stuff, but based on a property of a robot, not its ID.
|
||||
if (robot_is_companion(robptr)) {
|
||||
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
do_escort_frame(obj, dist_to_player, player_visibility);
|
||||
|
||||
if (obj->ctype.ai_info.danger_laser_num != object_none) {
|
||||
|
@ -3507,7 +3507,7 @@ _exit_cheat:
|
|||
|
||||
if (robot_is_thief(robptr)) {
|
||||
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
do_thief_frame(obj, dist_to_player, player_visibility, vec_to_player);
|
||||
|
||||
if (ready_to_fire_any_weapon(robptr, ailp, 0)) {
|
||||
|
@ -3535,7 +3535,7 @@ _exit_cheat:
|
|||
if (robptr->attack_type != 1)
|
||||
circle_distance += (objnum&0xf) * F1_0/2;
|
||||
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
// @mk, 12/27/94, structure here was strange. Would do both clauses of what are now this if/then/else. Used to be if/then, if/then.
|
||||
if ((player_visibility < 2) && (previous_visibility == 2)) { // this is redundant: mk, 01/15/95: && (ailp->mode == AIM_CHASE_OBJECT)) {
|
||||
|
@ -3619,7 +3619,7 @@ _exit_cheat:
|
|||
}
|
||||
|
||||
case AIM_RUN_FROM_OBJECT:
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
if (player_visibility) {
|
||||
if (ailp->player_awareness_type == 0)
|
||||
|
@ -3697,11 +3697,11 @@ _exit_cheat:
|
|||
anger_level = 64;
|
||||
}
|
||||
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
if (!ai_multiplayer_awareness(obj, anger_level)) {
|
||||
if (maybe_ai_do_actual_firing_stuff(obj, aip)) {
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
ai_do_actual_firing_stuff(obj, aip, ailp, robptr, &vec_to_player, dist_to_player, &gun_point, player_visibility, object_animates, aip->CURRENT_GUN);
|
||||
}
|
||||
return;
|
||||
|
@ -3766,13 +3766,13 @@ _exit_cheat:
|
|||
#endif
|
||||
if (!ai_multiplayer_awareness(obj, 71)) {
|
||||
if (maybe_ai_do_actual_firing_stuff(obj, aip)) {
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
ai_do_actual_firing_stuff(obj, aip, ailp, robptr, &vec_to_player, dist_to_player, &gun_point, player_visibility, object_animates, aip->CURRENT_GUN);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
ai_follow_path(obj, player_visibility, NULL);
|
||||
|
@ -3820,7 +3820,7 @@ _exit_cheat:
|
|||
|
||||
case AIM_STILL:
|
||||
if ((dist_to_player < F1_0*120+Difficulty_level*F1_0*20) || (ailp->player_awareness_type >= PA_WEAPON_ROBOT_COLLISION-1)) {
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
// turn towards vector if visible this time or last time, or rand
|
||||
// new!
|
||||
|
@ -3940,7 +3940,7 @@ _exit_cheat:
|
|||
// If the robot can see you, increase his awareness of you.
|
||||
// This prevents the problem of a robot looking right at you but doing nothing.
|
||||
// Assert(player_visibility != -1); // Means it didn't get initialized!
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
if (player_visibility == 2)
|
||||
if (ailp->player_awareness_type == 0)
|
||||
|
@ -3998,7 +3998,7 @@ _exit_cheat:
|
|||
if ((aip->GOAL_STATE != AIS_FLIN) && (get_robot_id(obj) != ROBOT_BRAIN)) {
|
||||
switch (aip->CURRENT_STATE) {
|
||||
case AIS_NONE:
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
dot = vm_vec_dot(obj->orient.fvec, vec_to_player);
|
||||
if (dot >= F1_0/2)
|
||||
|
@ -4007,7 +4007,7 @@ _exit_cheat:
|
|||
break;
|
||||
case AIS_REST:
|
||||
if (aip->GOAL_STATE == AIS_REST) {
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
if (ready_to_fire_any_weapon(robptr, ailp, 0) && (player_visibility)) {
|
||||
aip->GOAL_STATE = AIS_FIRE;
|
||||
}
|
||||
|
@ -4017,7 +4017,7 @@ _exit_cheat:
|
|||
if (!ai_multiplayer_awareness(obj, 60))
|
||||
return;
|
||||
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
if (player_visibility) {
|
||||
|
@ -4033,7 +4033,7 @@ _exit_cheat:
|
|||
#endif
|
||||
break;
|
||||
case AIS_LOCK:
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
if (!(Game_mode & GM_MULTI) || (player_visibility)) {
|
||||
if (!ai_multiplayer_awareness(obj, 68))
|
||||
|
@ -4057,7 +4057,7 @@ _exit_cheat:
|
|||
}
|
||||
break;
|
||||
case AIS_FIRE:
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
if (player_visibility) {
|
||||
|
@ -4092,7 +4092,7 @@ _exit_cheat:
|
|||
break;
|
||||
case AIS_RECO:
|
||||
if (!(obj_ref & 3)) {
|
||||
compute_vis_and_vec(obj, &vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
compute_vis_and_vec(obj, vis_vec_pos, ailp, vec_to_player, &player_visibility, robptr, &visibility_and_vec_computed);
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
if (player_visibility) {
|
||||
if (!ai_multiplayer_awareness(obj, 69))
|
||||
|
|
|
@ -336,7 +336,7 @@ void do_controlcen_frame(vobjptridx_t obj)
|
|||
vm_vec_sub(vec_to_player, ConsoleObject->pos, obj->pos);
|
||||
dist_to_player = vm_vec_normalize_quick(vec_to_player);
|
||||
if (dist_to_player < F1_0*200) {
|
||||
Control_center_player_been_seen = player_is_visible_from_object(obj, &obj->pos, 0, vec_to_player);
|
||||
Control_center_player_been_seen = player_is_visible_from_object(obj, obj->pos, 0, vec_to_player);
|
||||
Control_center_next_fire_time = 0;
|
||||
}
|
||||
}
|
||||
|
@ -355,7 +355,7 @@ void do_controlcen_frame(vobjptridx_t obj)
|
|||
dist_to_player = vm_vec_normalize_quick(vec_to_player);
|
||||
Last_time_cc_vis_check = GameTime64;
|
||||
if (dist_to_player < F1_0*120) {
|
||||
Control_center_player_been_seen = player_is_visible_from_object(obj, &obj->pos, 0, vec_to_player);
|
||||
Control_center_player_been_seen = player_is_visible_from_object(obj, obj->pos, 0, vec_to_player);
|
||||
if (!Control_center_player_been_seen)
|
||||
Control_center_been_hit = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue