Pass multi_send_controlcen_fire vector by &
This commit is contained in:
parent
8276bbc36a
commit
6024bf0369
|
@ -239,7 +239,7 @@ void multi_send_kill(vobjptridx_t objnum);
|
|||
void multi_send_remobj(vobjptridx_t objnum);
|
||||
void multi_send_door_open(segnum_t segnum, int side,ubyte flag);
|
||||
void multi_send_create_explosion(playernum_t);
|
||||
void multi_send_controlcen_fire(const vms_vector *to_target, int gun_num, int objnum);
|
||||
void multi_send_controlcen_fire(const vms_vector &to_target, int gun_num, int objnum);
|
||||
void multi_send_cloak(void);
|
||||
void multi_send_decloak(void);
|
||||
void multi_send_create_powerup(int powerup_type, segnum_t segnum, objnum_t objnum, const vms_vector &pos);
|
||||
|
|
|
@ -389,7 +389,7 @@ void do_controlcen_frame(const vobjptridx_t obj)
|
|||
}
|
||||
|
||||
if (Game_mode & GM_MULTI)
|
||||
multi_send_controlcen_fire(&vec_to_goal, best_gun_num, obj);
|
||||
multi_send_controlcen_fire(vec_to_goal, best_gun_num, obj);
|
||||
Laser_create_new_easy( vec_to_goal, obj->ctype.reactor_info.gun_pos[best_gun_num], obj, CONTROLCEN_WEAPON_NUM, 1);
|
||||
|
||||
int count = 0;
|
||||
|
@ -410,7 +410,7 @@ void do_controlcen_frame(const vobjptridx_t obj)
|
|||
vm_vec_scale_add2(vec_to_goal, randvec, F1_0/scale_divisor);
|
||||
vm_vec_normalize_quick(vec_to_goal);
|
||||
if (Game_mode & GM_MULTI)
|
||||
multi_send_controlcen_fire(&vec_to_goal, best_gun_num, obj);
|
||||
multi_send_controlcen_fire(vec_to_goal, best_gun_num, obj);
|
||||
Laser_create_new_easy( vec_to_goal, obj->ctype.reactor_info.gun_pos[best_gun_num], obj, CONTROLCEN_WEAPON_NUM, count == 0);
|
||||
count++;
|
||||
}
|
||||
|
|
|
@ -3034,7 +3034,7 @@ void multi_send_create_explosion(const playernum_t pnum)
|
|||
multi_send_data<MULTI_CREATE_EXPLOSION>(multibuf, count, 0);
|
||||
}
|
||||
|
||||
void multi_send_controlcen_fire(const vms_vector *to_goal, int best_gun_num, int objnum)
|
||||
void multi_send_controlcen_fire(const vms_vector &to_goal, int best_gun_num, int objnum)
|
||||
{
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
vms_vector swapped_vec;
|
||||
|
@ -3043,11 +3043,11 @@ void multi_send_controlcen_fire(const vms_vector *to_goal, int best_gun_num, int
|
|||
|
||||
count += 1;
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
memcpy(multibuf+count, to_goal, 12); count += 12;
|
||||
memcpy(multibuf+count, &to_goal, 12); count += 12;
|
||||
#else
|
||||
swapped_vec.x = (fix)INTEL_INT( (int)to_goal->x );
|
||||
swapped_vec.y = (fix)INTEL_INT( (int)to_goal->y );
|
||||
swapped_vec.z = (fix)INTEL_INT( (int)to_goal->z );
|
||||
swapped_vec.x = (fix)INTEL_INT( (int)to_goal.x );
|
||||
swapped_vec.y = (fix)INTEL_INT( (int)to_goal.y );
|
||||
swapped_vec.z = (fix)INTEL_INT( (int)to_goal.z );
|
||||
memcpy(multibuf+count, &swapped_vec, 12); count += 12;
|
||||
#endif
|
||||
multibuf[count] = (char)best_gun_num; count += 1;
|
||||
|
|
Loading…
Reference in a new issue