mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update on_physics_update & update standard components
This commit is contained in:
parent
2d29b8c46c
commit
bf682daffe
9 changed files with 12 additions and 29 deletions
|
|
@ -27,8 +27,7 @@ static debug::Logger logger("entities");
|
|||
Entities::Entities(Level& level)
|
||||
: level(level),
|
||||
sensorsTickClock(20, 3),
|
||||
updateTickClock(20, 3),
|
||||
physicsTickClock(60, 1) {
|
||||
updateTickClock(20, 3) {
|
||||
}
|
||||
|
||||
std::optional<Entity> Entities::get(entityid_t id) {
|
||||
|
|
@ -323,13 +322,8 @@ void Entities::update(float delta) {
|
|||
updateTickClock.getPart()
|
||||
);
|
||||
}
|
||||
if (physicsTickClock.update(delta)) {
|
||||
scripting::on_entities_physics_update(
|
||||
physicsTickClock.getTickRate(),
|
||||
physicsTickClock.getParts(),
|
||||
physicsTickClock.getPart()
|
||||
);
|
||||
}
|
||||
updatePhysics(delta);
|
||||
scripting::on_entities_physics_update(delta);
|
||||
}
|
||||
|
||||
static void debug_render_skeleton(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue