Skip to content

Commit 1a7ee07

Browse files
authored
assume beam and shockwave creation is falliable (scp-fs2open#7174)
1 parent ddb50fb commit 1a7ee07

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

code/ship/ship.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14019,7 +14019,6 @@ void ship_process_targeting_lasers()
1401914019

1402014020
// hmm, why didn't it fire?
1402114021
if(shipp->targeting_laser_objnum < 0){
14022-
Int3();
1402314022
ship_stop_targeting_laser(shipp);
1402414023
}
1402514024
}

code/weapon/beam.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,6 @@ int beam_fire_targeting(fighter_beam_fire_info *fire_info)
698698
if(objnum < 0){
699699
beam_delete(new_item);
700700
nprintf(("General", "obj_create() failed for beam weapon! bah!\n"));
701-
Int3();
702701
return -1;
703702
}
704703
new_item->objnum = objnum;

code/weapon/shockwave.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ int shockwave_create(int parent_objnum, const vec3d* pos, const shockwave_create
181181
objnum = obj_create( OBJ_SHOCKWAVE, real_parent, i, &orient, &sw->pos, sw->outer_radius, tmp_flags + Object::Object_Flags::Renders, false );
182182

183183
if ( objnum == -1 ){
184-
Int3();
184+
mprintf(("Couldn't create shockwave object -- out of object slots\n"));
185+
return -1;
185186
}
186187

187188
sw->objnum = objnum;

0 commit comments

Comments
 (0)