1
This commit is contained in:
parent
df86d6410b
commit
4ec3bcc3ee
@ -315,6 +315,7 @@ void InternalShot(Creature* c,
|
||||
}
|
||||
}
|
||||
bullet_dir.Rotate(bullet_angle / 180.0f);
|
||||
int shot_animi_time = (shot_animi ? shot_animi->t : 0);
|
||||
{
|
||||
bool is_player = c->IsPlayer();
|
||||
bool is_car = c->IsCar();
|
||||
@ -335,7 +336,7 @@ void InternalShot(Creature* c,
|
||||
bullet_born_pos = c->GetPos() + bullet_born_offset;
|
||||
if (c->IsPlayer() || c->IsCar()) {
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("idx:%d offset:%f,%f angle:%f old_angle:%f angle_xy:%f,%f %f %f gun_muzzle_position:%f,%f,%f pos:%f,%f gun_id:%d\n",
|
||||
a8::XPrintf("idx:%d offset:%f,%f angle:%f old_angle:%f angle_xy:%f,%f %f %f gun_muzzle_position:%f,%f,%f pos:%f,%f gun_id:%d t:%d\n",
|
||||
{
|
||||
bulletIdx,
|
||||
bullet_born_offset.x,
|
||||
@ -351,7 +352,8 @@ void InternalShot(Creature* c,
|
||||
gun_muzzle_position.z,
|
||||
bullet_born_pos.x,
|
||||
bullet_born_pos.y,
|
||||
weapon_meta->i->id()
|
||||
weapon_meta->i->id(),
|
||||
shot_animi_time
|
||||
});
|
||||
#endif
|
||||
}
|
||||
@ -384,7 +386,11 @@ void InternalShot(Creature* c,
|
||||
a8::XPrintf("bullet trace_target_uniid:%d\n", {bullet_info->trace_target_uniid});
|
||||
}
|
||||
#endif
|
||||
int shot_animi_time = (shot_animi ? shot_animi->t : 0);
|
||||
#if 1
|
||||
InternalCreateBullet(*bullet_info);
|
||||
delete bullet_info;
|
||||
bullet_info = nullptr;
|
||||
#else
|
||||
c->room->xtimer.AddDeadLineTimerAndAttach
|
||||
(
|
||||
shot_animi_time / FRAME_RATE_MS,
|
||||
@ -402,6 +408,7 @@ void InternalShot(Creature* c,
|
||||
delete bullet_info;
|
||||
}
|
||||
);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user