Skip to content

Commit e41694f

Browse files
committed
bugfixing
1 parent 48b7059 commit e41694f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

code/object/objectsort.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,17 @@ int obj_in_view_cone( object * objp )
149149
if (objp->type == OBJ_WEAPON && Weapon_info[Weapons[objp->instance].weapon_info_index].render_type == WRT_LASER) {
150150
auto wp = &Weapons[objp->instance];
151151
auto wip = &Weapon_info[wp->weapon_info_index];
152-
float length_scalar = wip->weapon_curves.get_output(weapon_info::WeaponCurveOutputs::LASER_LENGTH_MULT, *wp, wp->modular_curves_instance);
152+
float length_scalar = wip->weapon_curves.get_output(weapon_info::WeaponCurveOutputs::LASER_LENGTH_MULT, *wp, &wp->modular_curves_instance);
153153
if (wip->laser_length_by_frametime) {
154154
length_scalar *= flFrametime;
155155
}
156-
obj_size = wip->laser_length *
156+
obj_size = wip->laser_length * length_scalar;
157157
} else {
158158
obj_size = objp->radius;
159159
}
160160

161161
for (i=0; i<8; i++ ) {
162-
vm_vec_scale_add( &pt, &objp->pos, &check_offsets[i], objp->radius );
162+
vm_vec_scale_add( &pt, &objp->pos, &check_offsets[i], obj_size );
163163
codes=g3_rotate_vector(&tmp,&pt);
164164
if ( !codes ) {
165165
//mprintf(( "A point is inside, so render it.\n" ));

0 commit comments

Comments
 (0)