mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Ninja fixes
This commit is contained in:
parent
ee89982075
commit
184796de1c
|
@ -651,6 +651,7 @@ void player::init()
|
||||||
name[3] = 'b';
|
name[3] = 'b';
|
||||||
name[4] = 0;
|
name[4] = 0;
|
||||||
client_id = -1;
|
client_id = -1;
|
||||||
|
team = 0;
|
||||||
extrapowerflags = 0;
|
extrapowerflags = 0;
|
||||||
ninjaactivationtick = 0;
|
ninjaactivationtick = 0;
|
||||||
reset();
|
reset();
|
||||||
|
@ -665,7 +666,6 @@ void player::reset()
|
||||||
vel = vec2(0.0f, 0.0f);
|
vel = vec2(0.0f, 0.0f);
|
||||||
direction = vec2(0.0f, 1.0f);
|
direction = vec2(0.0f, 1.0f);
|
||||||
score = 0;
|
score = 0;
|
||||||
team = 0;
|
|
||||||
dead = true;
|
dead = true;
|
||||||
die_tick = 0;
|
die_tick = 0;
|
||||||
}
|
}
|
||||||
|
@ -797,7 +797,7 @@ int player::handle_ninja()
|
||||||
int type = OBJTYPE_PLAYER;
|
int type = OBJTYPE_PLAYER;
|
||||||
entity *ents[64];
|
entity *ents[64];
|
||||||
vec2 dir = pos - oldpos;
|
vec2 dir = pos - oldpos;
|
||||||
float radius = length(dir * 0.5f);
|
float radius = phys_size * 2.0f; //length(dir * 0.5f);
|
||||||
vec2 center = oldpos + dir * 0.5f;
|
vec2 center = oldpos + dir * 0.5f;
|
||||||
int num = world.find_entities(center, radius, ents, 64, &type, 1);
|
int num = world.find_entities(center, radius, ents, 64, &type, 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue