Use valptr for fuelcen.cpp

This commit is contained in:
Kp 2015-07-12 01:04:19 +00:00
parent 13bcdcf0ca
commit 374145633b

View file

@ -373,7 +373,7 @@ static void robotmaker_proc( FuelCenter * robotcen )
return;
}
segment *segp = &Segments[robotcen->segnum];
const auto &&segp = vsegptr(robotcen->segnum);
matcen_num = segp->matcen_num;
if ( matcen_num == -1 ) {
@ -452,12 +452,12 @@ static void robotmaker_proc( FuelCenter * robotcen )
}
}
const auto cur_object_loc = compute_segment_center(&Segments[robotcen->segnum]);
const auto &&cur_object_loc = compute_segment_center(vcsegptr(robotcen->segnum));
// HACK!!! The 10 under here should be something equal to the 1/2 the size of the segment.
auto obj = object_create_explosion(robotcen->segnum, cur_object_loc, i2f(10), VCLIP_MORPHING_ROBOT );
if (obj != object_none)
extract_orient_from_segment(&obj->orient,&Segments[robotcen->segnum]);
extract_orient_from_segment(&obj->orient, vsegptr(robotcen->segnum));
if ( Vclip[VCLIP_MORPHING_ROBOT].sound_num > -1 ) {
digi_link_sound_to_pos( Vclip[VCLIP_MORPHING_ROBOT].sound_num, robotcen->segnum, 0, cur_object_loc, 0, F1_0 );
@ -474,7 +474,7 @@ static void robotmaker_proc( FuelCenter * robotcen )
robotcen->Flag = 0;
robotcen->Timer = 0;
const auto cur_object_loc = compute_segment_center(&Segments[robotcen->segnum]);
const auto &&cur_object_loc = compute_segment_center(vcsegptr(robotcen->segnum));
// If this is the first materialization, set to valid robot.
{
@ -501,7 +501,7 @@ static void robotmaker_proc( FuelCenter * robotcen )
else
type = legal_types[(d_rand() * num_types) / 32768];
const objptridx_t obj = create_morph_robot(&Segments[robotcen->segnum], cur_object_loc, type );
const auto &&obj = create_morph_robot(vsegptridx(robotcen->segnum), cur_object_loc, type );
if (obj != object_none) {
if (Game_mode & GM_MULTI)
multi_send_create_robot(robotcen-Station, obj, type);