mirror of
https://github.com/LDDestroier/CC/
synced 2024-12-13 19:50:29 +00:00
Fixed head-on collisions being considered ties
This commit is contained in:
parent
03d0d83b62
commit
3576ee74f2
25
tron
25
tron
@ -654,21 +654,24 @@ local moveTick = function(doSend)
|
||||
if isHost then
|
||||
p.x = p.x + math.floor(math.cos(math.rad(p.direction * 90)))
|
||||
p.y = p.y + math.floor(math.sin(math.rad(p.direction * 90)))
|
||||
if doesIntersectBorder(p.x, p.y) or getTrail(p.x, p.y) then
|
||||
p.dead = true
|
||||
deadGuys[i] = true
|
||||
elseif p.putTrail then
|
||||
putTrail(p)
|
||||
end
|
||||
end
|
||||
end
|
||||
if isHost then
|
||||
if p.putTrail then
|
||||
putTrail(p)
|
||||
for a = 1, #player do
|
||||
if (a ~= i) and (player[a].x == p.x and player[a].y == p.y) then
|
||||
p.dead = true
|
||||
player[a].dead = true
|
||||
deadGuys[i] = true
|
||||
deadGuys[a] = true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for i = 1, #player do
|
||||
p = player[i]
|
||||
if getTrail(p.x, p.y) or doesIntersectBorder(p.x, p.y) then
|
||||
p.dead = true
|
||||
deadGuys[i] = true
|
||||
end
|
||||
end
|
||||
ageTrails()
|
||||
return deadAnimation(doSend)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user