Pass vsegptridx to gate_in_robot
This commit is contained in:
parent
1b0e3f4aa5
commit
850853326c
|
@ -101,7 +101,7 @@ extern sbyte Boss_dying;
|
|||
extern vms_vector Believed_player_pos;
|
||||
|
||||
void move_towards_segment_center(vobjptr_t objp);
|
||||
extern objptridx_t gate_in_robot(int type, segnum_t segnum);
|
||||
objptridx_t gate_in_robot(int type, vsegptridx_t segnum);
|
||||
void do_ai_frame(vobjptridx_t objp);
|
||||
void init_ai_object(vobjptr_t objp, ai_behavior initial_mode, segnum_t hide_segment);
|
||||
extern void do_ai_frame_all(void);
|
||||
|
|
|
@ -1991,9 +1991,8 @@ static objptridx_t create_gated_robot(const vsegptridx_t segp, int object_id, co
|
|||
// The process of him bringing in a robot takes one second.
|
||||
// Then a robot appears somewhere near the player.
|
||||
// Return objnum if robot successfully created, else return -1
|
||||
objptridx_t gate_in_robot(int type, segnum_t segnum)
|
||||
objptridx_t gate_in_robot(int type, const vsegptridx_t segnum)
|
||||
{
|
||||
Assert((segnum >= 0) && (segnum <= Highest_segment_index));
|
||||
return create_gated_robot(segnum, type, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1044,13 +1044,13 @@ void multi_do_boss_create_robot(const playernum_t pnum, const ubyte *buf)
|
|||
return;
|
||||
}
|
||||
// Do some validity checking
|
||||
if ( (b.objrobot >= MAX_OBJECTS) || (b.objrobot < 0) || (b.where < 0) || (b.where > Highest_segment_index) )
|
||||
if (b.objrobot >= MAX_OBJECTS || b.objrobot < 0)
|
||||
{
|
||||
Int3(); // See Rob, bad data in boss gate action message
|
||||
return;
|
||||
}
|
||||
// Gate one in!
|
||||
if (gate_in_robot(b.robot_type, b.where) != object_none)
|
||||
if (gate_in_robot(b.robot_type, vsegptridx(b.where)) != object_none)
|
||||
map_objnum_local_to_remote(Net_create_objnums[0], b.objrobot, pnum);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue