Ninja fixes

This commit is contained in:
Olle Rosenquist 2007-07-22 13:46:45 +00:00
parent ee89982075
commit 184796de1c

View file

@ -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);