diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-07-26 19:54:31 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-07-26 19:54:31 +0000 |
| commit | 5cb918a9139f149612fdb3257a4c78be6a3015d5 (patch) | |
| tree | 5038357d95da85f328d062330b95efcecb5ff37e /src/game/client/game_client.cpp | |
| parent | 78151cf4233fb70d9f640793273f14241b387f2e (diff) | |
| download | zcatch-5cb918a9139f149612fdb3257a4c78be6a3015d5.tar.gz zcatch-5cb918a9139f149612fdb3257a4c78be6a3015d5.zip | |
ninja tweaks :D
Diffstat (limited to 'src/game/client/game_client.cpp')
| -rw-r--r-- | src/game/client/game_client.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp index 4cc17409..ed9e5c81 100644 --- a/src/game/client/game_client.cpp +++ b/src/game/client/game_client.cpp @@ -628,6 +628,7 @@ static void render_powerup(obj_powerup *prev, obj_powerup *current) { gfx_texture_set(data->images[IMAGE_WEAPONS].id); gfx_quads_begin(); + vec2 pos = mix(vec2(prev->x, prev->y), vec2(current->x, current->y), client_intratick()); float angle = 0.0f; float size = 64.0f; if (current->type == POWERUP_WEAPON) @@ -646,11 +647,19 @@ static void render_powerup(obj_powerup *prev, obj_powerup *current) SPRITE_POWERUP_TIMEFIELD }; select_sprite(c[current->type]); + + if(c[current->type] == SPRITE_POWERUP_NINJA) + { + proj_particles.addparticle(0, 0, + pos+vec2((frandom()-0.5f)*80.0f, (frandom()-0.5f)*20.0f), + vec2((frandom()-0.5f)*10.0f, (frandom()-0.5f)*10.0f)); + size *= 2.0f; + pos.x += 10.0f; + } } gfx_quads_setrotation(angle); - vec2 pos = mix(vec2(prev->x, prev->y), vec2(current->x, current->y), client_intratick()); float offset = pos.y/32.0f + pos.x/32.0f; pos.x += cosf(client_localtime()*2.0f+offset)*2.5f; pos.y += sinf(client_localtime()*2.0f+offset)*2.5f; |