diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c index 27dce4cfb..627791bb2 100644 --- a/src/engine/client/ec_client.c +++ b/src/engine/client/ec_client.c @@ -19,6 +19,7 @@ #include #include #include +#include #include diff --git a/src/engine/e_engine.c b/src/engine/e_engine.c index 3168020d8..9af77f848 100644 --- a/src/engine/e_engine.c +++ b/src/engine/e_engine.c @@ -8,6 +8,13 @@ #include #include + +static void con_dbg_dumpmem(void *result, void *user_data) +{ + mem_debug_dump(); +} + + static char application_save_path[512] = {0}; const char *engine_savepath(const char *filename, char *buffer, int max) @@ -16,6 +23,7 @@ const char *engine_savepath(const char *filename, char *buffer, int max) return buffer; } + void engine_init(const char *appname, int argc, char **argv) { dbg_msg("engine", "running on %s-%s-%s", CONF_FAMILY_STRING, CONF_PLATFORM_STRING, CONF_ARCH_STRING); @@ -44,6 +52,9 @@ void engine_init(const char *appname, int argc, char **argv) /* init console */ console_init(); + + MACRO_REGISTER_COMMAND("dbg_dumpmem", "", con_dbg_dumpmem, 0x0); + /* reset the config */ config_reset(); diff --git a/src/engine/e_ringbuffer.c b/src/engine/e_ringbuffer.c index 9ece9b98f..023501402 100644 --- a/src/engine/e_ringbuffer.c +++ b/src/engine/e_ringbuffer.c @@ -206,11 +206,11 @@ void *ringbuf_item_ptr(void *p) return ((RBITEM *)p) - 1; } -void *ringbuf_first(RINGBUFFER *rb) -{ - if(rb->last_alloc && rb->last_alloc->next) - return ringbuf_next(rb, rb->last_alloc->next+1); - return 0x0; +void *ringbuf_first(RINGBUFFER *rb) +{ + if(rb->last_alloc && rb->last_alloc->next) + return ringbuf_next(rb, rb->last_alloc->next+1); + return 0x0; } void *ringbuf_last(RINGBUFFER *rb) diff --git a/src/engine/e_system.c b/src/engine/e_system.c index e9c96fa36..1472b3d69 100644 --- a/src/engine/e_system.c +++ b/src/engine/e_system.c @@ -184,6 +184,8 @@ void mem_debug_dump() io_write(f, buf, strlen(buf)); header = header->next; } + + io_close(f); } diff --git a/src/game/client/gc_render_obj.cpp b/src/game/client/gc_render_obj.cpp index 6f836307d..1e1d64308 100644 --- a/src/game/client/gc_render_obj.cpp +++ b/src/game/client/gc_render_obj.cpp @@ -152,10 +152,9 @@ void render_laser(const struct obj_laser *current) float ia = 1-a; - vec2 out(dir.y, -dir.x); - out = out * (4.0f*ia); + out = out * (6.0f*ia); gfx_blend_normal(); gfx_texture_set(-1); diff --git a/src/game/g_tuning.h b/src/game/g_tuning.h index e23b46bf4..c22018894 100644 --- a/src/game/g_tuning.h +++ b/src/game/g_tuning.h @@ -24,6 +24,6 @@ MACRO_TUNING_PARAM(grenade_speed, 15.0f) MACRO_TUNING_PARAM(laser_reach, 800.0f) MACRO_TUNING_PARAM(laser_bounce_delay, 150) -MACRO_TUNING_PARAM(laser_bounce_num, 2) -MACRO_TUNING_PARAM(laser_bounce_cost, 32) -MACRO_TUNING_PARAM(laser_damage, 8) +MACRO_TUNING_PARAM(laser_bounce_num, 1) +MACRO_TUNING_PARAM(laser_bounce_cost, 0) +MACRO_TUNING_PARAM(laser_damage, 6) diff --git a/src/game/server/gs_server.cpp b/src/game/server/gs_server.cpp index 4a95406ed..41dc18a32 100644 --- a/src/game/server/gs_server.cpp +++ b/src/game/server/gs_server.cpp @@ -424,7 +424,7 @@ void projectile::tick() if(targetplayer || collide || lifespan < 0) { if (lifespan >= 0 || weapon == WEAPON_GRENADE) - create_sound(pos, sound_impact); + create_sound(curpos, sound_impact); if (flags & PROJECTILE_FLAGS_EXPLODE) create_explosion(prevpos, owner, weapon, false);