mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Support shotgun_speed 0
for mapping stationary bullets
This commit is contained in:
parent
c0eb81f603
commit
9d39ca888f
|
@ -77,6 +77,9 @@ typedef vector2_base<int> ivec2;
|
|||
template<typename T>
|
||||
inline vector2_base<T> closest_point_on_line(vector2_base<T> line_point0, vector2_base<T> line_point1, vector2_base<T> target_point)
|
||||
{
|
||||
if(line_point1 == line_point0)
|
||||
return line_point0;
|
||||
|
||||
vector2_base<T> c = target_point - line_point0;
|
||||
vector2_base<T> v = (line_point1 - line_point0);
|
||||
v = normalize(v);
|
||||
|
|
|
@ -214,7 +214,7 @@ void CGameWorld::Tick()
|
|||
CCharacter *CGameWorld::IntersectCharacter(vec2 Pos0, vec2 Pos1, float Radius, vec2& NewPos, CCharacter *pNotThis, int CollideWith, class CCharacter *pThisOnly)
|
||||
{
|
||||
// Find other players
|
||||
float ClosestLen = distance(Pos0, Pos1) * 100.0f;
|
||||
float ClosestLen = HUGE_VALF;
|
||||
CCharacter *pClosest = 0;
|
||||
|
||||
CCharacter *p = (CCharacter *)FindFirst(ENTTYPE_CHARACTER);
|
||||
|
|
|
@ -295,7 +295,7 @@ void CGameWorld::Tick()
|
|||
CCharacter *CGameWorld::IntersectCharacter(vec2 Pos0, vec2 Pos1, float Radius, vec2& NewPos, CCharacter *pNotThis, int CollideWith, class CCharacter *pThisOnly)
|
||||
{
|
||||
// Find other players
|
||||
float ClosestLen = distance(Pos0, Pos1) * 100.0f;
|
||||
float ClosestLen = HUGE_VALF;
|
||||
CCharacter *pClosest = 0;
|
||||
|
||||
CCharacter *p = (CCharacter *)FindFirst(ENTTYPE_CHARACTER);
|
||||
|
|
Loading…
Reference in a new issue