Moved some game code into engine code
This commit is contained in:
@@ -116,7 +116,8 @@ update_gravity :: (scene: *Scene, dt: float) {
|
||||
if !e.enabled continue;
|
||||
|
||||
if e.flags & .PHYSICS {
|
||||
if e.is_proxy continue;
|
||||
#if NETWORKING { if e.is_proxy continue; }
|
||||
|
||||
if e.collider.ignore continue;
|
||||
e.body.velocity.y += GRAVITY * dt;
|
||||
}
|
||||
@@ -126,7 +127,9 @@ update_gravity :: (scene: *Scene, dt: float) {
|
||||
update_positions :: (scene: *Scene, dt: float) {
|
||||
for e: scene.entities {
|
||||
if !e.enabled continue;
|
||||
if e.is_proxy continue;
|
||||
|
||||
#if NETWORKING { if e.is_proxy continue; }
|
||||
|
||||
if e.collider.ignore continue;
|
||||
|
||||
if e.flags & .PHYSICS {
|
||||
@@ -169,7 +172,7 @@ physics_step :: (scene: *Scene, timestep: float) {
|
||||
|
||||
for e: scene.entities {
|
||||
if !e.enabled continue;
|
||||
if e.is_proxy continue;
|
||||
#if NETWORKING { if e.is_proxy continue;}
|
||||
if e.collider.ignore continue;
|
||||
|
||||
if e.flags & .PHYSICS {
|
||||
|
||||
Reference in New Issue
Block a user