diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-04-05 08:48:29 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-04-05 08:48:29 -0400 |
commit | 16920d744a2e638f564753f15f1269f51c131b6b (patch) | |
tree | ae3ee1ba2b2f7a92c196347853e0c82e2dd14973 /src/world.cpp | |
parent | 4ea7b19bf2d4c64719471a53e6223aac7c250585 (diff) |
sword improvements, page threading
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/world.cpp b/src/world.cpp index e009f78..f7e9096 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -718,7 +718,9 @@ singleDetect( Entity *e ) * Kill any dead entities. */ - if ( !e->alive || e->health <= 0 ) { + if ( e->alive && e->health <= 0 ) { + e->alive = false; + e->health = 0; for ( i = 0; i < entity.size(); i++) { if ( entity[i] == e ){ switch ( e->type ) { @@ -776,6 +778,15 @@ singleDetect( Entity *e ) // handle only living entities if ( e->alive ) { + + // forced movement gravity + if ( e->forcedMove ) { + if ( e->vel.x > .0005 || e->vel.x < -.0005 ) + e->vel.x *= .6; + else + e->forcedMove = false; + } + if ( e->type == MOBT && Mobp(e)->subtype == MS_TRIGGER ) return; |