添加枪械后坐力处理

This commit is contained in:
aozhiwei 2021-03-11 14:23:33 +08:00
parent df4f83fa0e
commit 627b32badf

View File

@ -91,6 +91,12 @@ void InternalShot(Human* hum,
is_tank_skin);
}
}
if (weapon_meta->i->recoil_force() > 0.01f) {
a8::Vec2 old_move_dir = hum->move_dir;
hum->move_dir = hum->move_dir * -1;
hum->_UpdateMove(weapon_meta->i->recoil_force());
hum->move_dir = old_move_dir;
}
}
Human::Human():MoveableEntity()