This commit is contained in:
jacob 2025-01-12 16:06:24 -06:00
parent 5026a967ff
commit bcdd9660c2

View File

@ -355,6 +355,7 @@ INTERNAL PHYS_COLLISION_CALLBACK_FUNC_DEF(on_collision, array)
if (bullet->bullet_has_hit || entity_handle_eq(src->top, target->top)) { if (bullet->bullet_has_hit || entity_handle_eq(src->top, target->top)) {
/* Ignore collision if bullet already spent or if weapon and /* Ignore collision if bullet already spent or if weapon and
* target share same top level parent */ * target share same top level parent */
/* NOTE: Since bullet is most likely just a sensor skip_solve is probably already true */
constraint->skip_solve = true; constraint->skip_solve = true;
} else { } else {
struct v2 point = data->point; struct v2 point = data->point;
@ -814,7 +815,8 @@ INTERNAL void game_update(struct game_cmd_array game_cmds)
bullet->bullet_src_pos = rel_pos; bullet->bullet_src_pos = rel_pos;
bullet->bullet_src_dir = rel_dir; bullet->bullet_src_dir = rel_dir;
//bullet->bullet_impulse = 0.1f; //bullet->bullet_impulse = 0.1f;
bullet->bullet_impulse = 0.25f; //bullet->bullet_impulse = 0.25f;
bullet->bullet_impulse = 1.0f;
//bullet->bullet_impulse = 5.f; //bullet->bullet_impulse = 5.f;
bullet->mass_unscaled = 0.04f; bullet->mass_unscaled = 0.04f;
bullet->inertia_unscaled = 0.00001f; bullet->inertia_unscaled = 0.00001f;
@ -1082,8 +1084,6 @@ INTERNAL void game_update(struct game_cmd_array game_cmds)
struct v2 start = ent->tracer_start; struct v2 start = ent->tracer_start;
struct v2 tail = ent->tracer_tail; struct v2 tail = ent->tracer_tail;
struct v2 end = entity_get_xform(ent).og; struct v2 end = entity_get_xform(ent).og;
} }
#endif #endif