diff options
Diffstat (limited to 'src/game/server/entities')
| -rw-r--r-- | src/game/server/entities/laser.cpp | 6 | ||||
| -rw-r--r-- | src/game/server/entities/projectile.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/game/server/entities/laser.cpp b/src/game/server/entities/laser.cpp index 20054ed4..2c6fa0ff 100644 --- a/src/game/server/entities/laser.cpp +++ b/src/game/server/entities/laser.cpp @@ -48,14 +48,16 @@ void LASER::do_bounce() } vec2 to = pos + dir*energy; + vec2 org_to = to; - if(col_intersect_line(pos, to, &to)) + if(col_intersect_line(pos, to, 0x0, &to)) { if(!hit_character(pos, to)) { // intersected from = pos; - pos = to - dir*2; + pos = to; + vec2 temp_pos = pos; vec2 temp_dir = dir*4.0f; diff --git a/src/game/server/entities/projectile.cpp b/src/game/server/entities/projectile.cpp index e0b4701a..2a8de766 100644 --- a/src/game/server/entities/projectile.cpp +++ b/src/game/server/entities/projectile.cpp @@ -65,7 +65,7 @@ void PROJECTILE::tick() lifespan--; - int collide = col_intersect_line(prevpos, curpos, &curpos); + int collide = col_intersect_line(prevpos, curpos, &curpos, 0); //int collide = col_check_point((int)curpos.x, (int)curpos.y); CHARACTER *ownerchar = game.get_player_char(owner); CHARACTER *targetchr = game.world.intersect_character(prevpos, curpos, 6.0f, curpos, ownerchar); |