mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
fixed sound positioning bug, tweaked laser effect, fixed memory dumping
This commit is contained in:
parent
d76661b3be
commit
dd1e7adc00
|
@ -19,6 +19,7 @@
|
|||
#include <engine/e_memheap.h>
|
||||
#include <engine/e_datafile.h>
|
||||
#include <engine/e_console.h>
|
||||
#include <engine/e_ringbuffer.h>
|
||||
|
||||
#include <mastersrv/mastersrv.h>
|
||||
|
||||
|
|
|
@ -8,6 +8,13 @@
|
|||
#include <engine/e_config.h>
|
||||
#include <engine/e_console.h>
|
||||
|
||||
|
||||
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();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -184,6 +184,8 @@ void mem_debug_dump()
|
|||
io_write(f, buf, strlen(buf));
|
||||
header = header->next;
|
||||
}
|
||||
|
||||
io_close(f);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue