mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-05 23:58:19 +00:00
generall update with alot off small stuff
This commit is contained in:
parent
6abf334ced
commit
6336124097
|
@ -123,12 +123,18 @@ sounds {
|
||||||
"data/audio/hook_loop-02.wv"
|
"data/audio/hook_loop-02.wv"
|
||||||
}
|
}
|
||||||
|
|
||||||
hook_attach {
|
hook_attach_ground {
|
||||||
"data/audio/hook_attach-01.wv"
|
"data/audio/hook_attach-01.wv"
|
||||||
"data/audio/hook_attach-02.wv"
|
"data/audio/hook_attach-02.wv"
|
||||||
"data/audio/hook_attach-03.wv"
|
"data/audio/hook_attach-03.wv"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hook_attach_player {
|
||||||
|
"data/audio/foley_body_impact-01.wv"
|
||||||
|
"data/audio/foley_body_impact-02.wv"
|
||||||
|
"data/audio/foley_body_impact-03.wv"
|
||||||
|
}
|
||||||
|
|
||||||
pickup_health {
|
pickup_health {
|
||||||
"data/audio/sfx_pickup_hrt-01.wv"
|
"data/audio/sfx_pickup_hrt-01.wv"
|
||||||
"data/audio/sfx_pickup_hrt-02.wv"
|
"data/audio/sfx_pickup_hrt-02.wv"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import shutil, os, sys, zipfile
|
import shutil, os, sys, zipfile
|
||||||
|
|
||||||
valid_platforms = ["win32", "linux86", "linux86_64"]
|
valid_platforms = ["win32", "linux86", "linux86_64", "src"]
|
||||||
|
|
||||||
if len(sys.argv) != 3:
|
if len(sys.argv) != 3:
|
||||||
print "wrong number of arguments"
|
print "wrong number of arguments"
|
||||||
|
@ -12,6 +12,17 @@ version = sys.argv[1]
|
||||||
platform = sys.argv[2]
|
platform = sys.argv[2]
|
||||||
exe_ext = ""
|
exe_ext = ""
|
||||||
use_zip = 0
|
use_zip = 0
|
||||||
|
use_gz = 1
|
||||||
|
include_data = True
|
||||||
|
include_exe = True
|
||||||
|
include_src = False
|
||||||
|
|
||||||
|
if platform == "src":
|
||||||
|
include_data = False
|
||||||
|
include_exe = False
|
||||||
|
include_src = True
|
||||||
|
use_zip = 1
|
||||||
|
use_gz = 1
|
||||||
|
|
||||||
if not platform in valid_platforms:
|
if not platform in valid_platforms:
|
||||||
print "not a valid platform"
|
print "not a valid platform"
|
||||||
|
@ -21,8 +32,9 @@ if not platform in valid_platforms:
|
||||||
if platform == 'win32':
|
if platform == 'win32':
|
||||||
exe_ext = ".exe"
|
exe_ext = ".exe"
|
||||||
use_zip = 1
|
use_zip = 1
|
||||||
|
use_gz = 0
|
||||||
|
|
||||||
def copydir(src, dst):
|
def copydir(src, dst, excl=[]):
|
||||||
for root, dirs, files in os.walk(src, topdown=True):
|
for root, dirs, files in os.walk(src, topdown=True):
|
||||||
if "/." in root or "\\." in root:
|
if "/." in root or "\\." in root:
|
||||||
continue
|
continue
|
||||||
|
@ -36,23 +48,41 @@ def copydir(src, dst):
|
||||||
package = "%s-%s-%s" %(name, version, platform)
|
package = "%s-%s-%s" %(name, version, platform)
|
||||||
package_dir = package
|
package_dir = package
|
||||||
|
|
||||||
|
print "cleaning target"
|
||||||
shutil.rmtree(package_dir, True)
|
shutil.rmtree(package_dir, True)
|
||||||
os.mkdir(package_dir)
|
os.mkdir(package_dir)
|
||||||
os.mkdir(os.path.join(package_dir, "data"))
|
|
||||||
copydir("data", package_dir)
|
|
||||||
shutil.copy("readme.txt", package_dir)
|
|
||||||
|
|
||||||
shutil.copy("teewars"+exe_ext, package_dir)
|
print "adding files"
|
||||||
shutil.copy("teewars_srv"+exe_ext, package_dir)
|
shutil.copy("readme.txt", package_dir)
|
||||||
|
shutil.copy("license.txt", package_dir)
|
||||||
|
|
||||||
|
if include_data:
|
||||||
|
os.mkdir(os.path.join(package_dir, "data"))
|
||||||
|
copydir("data", package_dir)
|
||||||
|
|
||||||
|
if include_exe:
|
||||||
|
shutil.copy("teewars"+exe_ext, package_dir)
|
||||||
|
shutil.copy("teewars_srv"+exe_ext, package_dir)
|
||||||
|
|
||||||
|
if include_src:
|
||||||
|
for p in ["src", "scripts", "datasrc"] :
|
||||||
|
os.mkdir(os.path.join(package_dir, p))
|
||||||
|
copydir(p, package_dir)
|
||||||
|
shutil.copy("default.bam", package_dir)
|
||||||
|
|
||||||
if use_zip:
|
if use_zip:
|
||||||
|
print "making zip archive"
|
||||||
zf = zipfile.ZipFile("%s.zip" % package, 'w', zipfile.ZIP_DEFLATED)
|
zf = zipfile.ZipFile("%s.zip" % package, 'w', zipfile.ZIP_DEFLATED)
|
||||||
|
|
||||||
for root, dirs, files in os.walk(package_dir, topdown=True):
|
for root, dirs, files in os.walk(package_dir, topdown=True):
|
||||||
for name in files:
|
for name in files:
|
||||||
n = os.path.join(root, name)
|
n = os.path.join(root, name)
|
||||||
zf.write(n, n)
|
zf.write(n, n)
|
||||||
zf.printdir()
|
#zf.printdir()
|
||||||
zf.close()
|
zf.close()
|
||||||
else:
|
|
||||||
os.system("tar czvf %s.tar.gz %s" % (package, package_dir))
|
if use_gz:
|
||||||
|
print "making tar.gz archive"
|
||||||
|
os.system("tar czf %s.tar.gz %s" % (package, package_dir))
|
||||||
|
|
||||||
|
print "done"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import random
|
import random
|
||||||
import os
|
import os
|
||||||
|
|
||||||
masterservers = ["localhost 8383"]
|
masterservers = ["localhost 8300"]
|
||||||
|
|
||||||
maps = [
|
maps = [
|
||||||
["dm1", "dm2", "dm6"],
|
["dm1", "dm2", "dm6"],
|
||||||
|
|
|
@ -453,7 +453,7 @@ static tilemap brush = {0};
|
||||||
static tilemap chooser = {0};
|
static tilemap chooser = {0};
|
||||||
static float world_offset_x = 0, world_offset_y = 0;
|
static float world_offset_x = 0, world_offset_y = 0;
|
||||||
static int world_zoom = 3;
|
static int world_zoom = 3;
|
||||||
static const char *editor_filename = 0;
|
static char editor_filename[128] = {0};
|
||||||
static int editor_mode = 0; // 0 == tiles, 1 == ents
|
static int editor_mode = 0; // 0 == tiles, 1 == ents
|
||||||
static int editor_selected_ent = -1;
|
static int editor_selected_ent = -1;
|
||||||
|
|
||||||
|
@ -786,6 +786,7 @@ int editor_load(const char *filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
datafile_unload(df);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -925,6 +926,7 @@ static void editor_listdir_map_callback(const char *name, int is_dir, void *user
|
||||||
sprintf(buf, "data/maps/%s", name);
|
sprintf(buf, "data/maps/%s", name);
|
||||||
|
|
||||||
editor_load(buf);
|
editor_load(buf);
|
||||||
|
strcpy(editor_filename, buf);
|
||||||
editor_loadmap = -1;
|
editor_loadmap = -1;
|
||||||
}
|
}
|
||||||
*y += 1;
|
*y += 1;
|
||||||
|
@ -1267,16 +1269,16 @@ extern "C" void editor_update_and_render()
|
||||||
if(inp_key_down(KEY_KP_ADD))
|
if(inp_key_down(KEY_KP_ADD))
|
||||||
{
|
{
|
||||||
world_zoom--;
|
world_zoom--;
|
||||||
if(world_zoom < 3)
|
if(world_zoom < 1)
|
||||||
world_zoom = 3;
|
world_zoom = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// zoom out
|
// zoom out
|
||||||
if(inp_key_down(KEY_KP_SUBTRACT))
|
if(inp_key_down(KEY_KP_SUBTRACT))
|
||||||
{
|
{
|
||||||
world_zoom++;
|
world_zoom++;
|
||||||
if(world_zoom > 8)
|
if(world_zoom > 16)
|
||||||
world_zoom = 8;
|
world_zoom = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(inp_key_pressed(KEY_LCTRL) || inp_key_pressed(KEY_RCTRL))
|
if(inp_key_pressed(KEY_LCTRL) || inp_key_pressed(KEY_RCTRL))
|
||||||
|
@ -1305,6 +1307,7 @@ extern "C" void editor_update_and_render()
|
||||||
{
|
{
|
||||||
dbg_msg("editor", "save");
|
dbg_msg("editor", "save");
|
||||||
editor_save(editor_filename);
|
editor_save(editor_filename);
|
||||||
|
client_rcon("sv_map_reload=1");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1334,6 +1337,9 @@ extern "C" void editor_init()
|
||||||
font_texture = gfx_load_texture("data/debug_font.png");
|
font_texture = gfx_load_texture("data/debug_font.png");
|
||||||
checker_texture = gfx_load_texture("data/checker.png");
|
checker_texture = gfx_load_texture("data/checker.png");
|
||||||
editor_reset();
|
editor_reset();
|
||||||
|
|
||||||
|
layer *l = layers_get(layers_new(50, 50));
|
||||||
|
l->main_layer = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -51,7 +51,7 @@ MACRO_CONFIG_INT(sv_sendheartbeats, 1, 0, 1)
|
||||||
MACRO_CONFIG_STR(sv_map, 128, "dm1")
|
MACRO_CONFIG_STR(sv_map, 128, "dm1")
|
||||||
MACRO_CONFIG_INT(sv_map_reload, 0, 0, 1)
|
MACRO_CONFIG_INT(sv_map_reload, 0, 0, 1)
|
||||||
|
|
||||||
MACRO_CONFIG_INT(sv_max_clients, 8, 1, 16)
|
MACRO_CONFIG_INT(sv_max_clients, 8, 1, 12)
|
||||||
|
|
||||||
MACRO_CONFIG_INT(sv_bandwidth_mode, 0, 0, 2)
|
MACRO_CONFIG_INT(sv_bandwidth_mode, 0, 0, 2)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ extern "C" {
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
MAX_CLIENTS=16,
|
MAX_CLIENTS=12,
|
||||||
SERVER_TICK_SPEED=50, /* TODO: this should be removed */
|
SERVER_TICK_SPEED=50, /* TODO: this should be removed */
|
||||||
SNAP_CURRENT=0,
|
SNAP_CURRENT=0,
|
||||||
SNAP_PREV=1,
|
SNAP_PREV=1,
|
||||||
|
|
|
@ -696,25 +696,26 @@ static void process_events(int s)
|
||||||
{
|
{
|
||||||
ev_explosion *ev = (ev_explosion *)data;
|
ev_explosion *ev = (ev_explosion *)data;
|
||||||
vec2 p(ev->x, ev->y);
|
vec2 p(ev->x, ev->y);
|
||||||
|
vec4 c(0.5f, 0.1f, 0.1f, 1.0f);
|
||||||
|
|
||||||
// center explosion
|
// center explosion
|
||||||
vec2 v = normalize(vec2(frandom()-0.5f, -frandom()))*(32.0f+frandom()*32.0f);
|
vec2 v = normalize(vec2(frandom()-0.5f, -frandom()))*(32.0f+frandom()*32.0f);
|
||||||
temp_system.new_particle(p, v, 1.2f, 64.0f, 0, 0.95f);
|
temp_system.new_particle(p, v, 1.2f, 64.0f, 0, 0.95f, c);
|
||||||
v = normalize(vec2(frandom()-0.5f, -frandom()))*(128.0f+frandom()*128.0f);
|
v = normalize(vec2(frandom()-0.5f, -frandom()))*(128.0f+frandom()*128.0f);
|
||||||
temp_system.new_particle(p, v, 1.2f, 32.0f, 0, 0.95f);
|
temp_system.new_particle(p, v, 1.2f, 32.0f, 0, 0.95f, c);
|
||||||
v = normalize(vec2(frandom()-0.5f, -frandom()))*(128.0f+frandom()*128.0f);
|
v = normalize(vec2(frandom()-0.5f, -frandom()))*(128.0f+frandom()*128.0f);
|
||||||
temp_system.new_particle(p, v, 1.2f, 16.0f, 0, 0.95f);
|
temp_system.new_particle(p, v, 1.2f, 16.0f, 0, 0.95f, c);
|
||||||
|
|
||||||
for(int i = 0; i < 8; i++)
|
for(int i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
vec2 v = normalize(vec2(frandom()-0.5f, frandom()-0.5f))*(64.0f+frandom()*64.0f);
|
vec2 v = normalize(vec2(frandom()-0.5f, frandom()-0.5f))*(64.0f+frandom()*64.0f);
|
||||||
temp_system.new_particle(p, v, 0.5f+0.5f*frandom(), 16.0f, 0, 0.985f);
|
temp_system.new_particle(p, v, 0.5f+0.5f*frandom(), 16.0f, 0, 0.985f, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < 8; i++)
|
for(int i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
vec2 v = normalize(vec2(frandom()-0.5f, frandom()-0.5f))*(128.0f+frandom()*256.0f);
|
vec2 v = normalize(vec2(frandom()-0.5f, frandom()-0.5f))*(128.0f+frandom()*256.0f);
|
||||||
temp_system.new_particle(p, v, 0.5f+0.5f*frandom(), 16.0f, 128.0f, 0.985f);
|
temp_system.new_particle(p, v, 0.5f+0.5f*frandom(), 16.0f, 128.0f, 0.985f, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(item.type == EVENT_SOUND_WORLD)
|
else if(item.type == EVENT_SOUND_WORLD)
|
||||||
|
@ -823,8 +824,8 @@ extern "C" void modc_predict()
|
||||||
snd_play_random(CHN_WORLD, SOUND_PLAYER_JUMP, 1.0f, pos);
|
snd_play_random(CHN_WORLD, SOUND_PLAYER_JUMP, 1.0f, pos);
|
||||||
}
|
}
|
||||||
//if(events&COREEVENT_HOOK_LAUNCH) snd_play_random(CHN_WORLD, SOUND_HOOK_LOOP, 1.0f, pos);
|
//if(events&COREEVENT_HOOK_LAUNCH) snd_play_random(CHN_WORLD, SOUND_HOOK_LOOP, 1.0f, pos);
|
||||||
if(events&COREEVENT_HOOK_ATTACH_PLAYER) snd_play_random(CHN_WORLD, SOUND_HOOK_ATTACH, 1.0f, pos);
|
if(events&COREEVENT_HOOK_ATTACH_PLAYER) snd_play_random(CHN_WORLD, SOUND_HOOK_ATTACH_PLAYER, 1.0f, pos);
|
||||||
if(events&COREEVENT_HOOK_ATTACH_GROUND) snd_play_random(CHN_WORLD, SOUND_HOOK_ATTACH, 1.0f, pos);
|
if(events&COREEVENT_HOOK_ATTACH_GROUND) snd_play_random(CHN_WORLD, SOUND_HOOK_ATTACH_GROUND, 1.0f, pos);
|
||||||
//if(events&COREEVENT_HOOK_RETRACT) snd_play_random(CHN_WORLD, SOUND_PLAYER_JUMP, 1.0f, pos);
|
//if(events&COREEVENT_HOOK_RETRACT) snd_play_random(CHN_WORLD, SOUND_PLAYER_JUMP, 1.0f, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1499,7 +1500,7 @@ static void render_player(
|
||||||
if (player.weapon == WEAPON_GUN || player.weapon == WEAPON_SHOTGUN)
|
if (player.weapon == WEAPON_GUN || player.weapon == WEAPON_SHOTGUN)
|
||||||
{
|
{
|
||||||
// check if we're firing stuff
|
// check if we're firing stuff
|
||||||
if (true)///prev.attackticks)
|
if (true)//prev.attackticks)
|
||||||
{
|
{
|
||||||
float alpha = 0.0f;
|
float alpha = 0.0f;
|
||||||
int phase1tick = (client_tick() - player.attacktick);
|
int phase1tick = (client_tick() - player.attacktick);
|
||||||
|
|
|
@ -981,8 +981,8 @@ void player::tick_defered()
|
||||||
if(events&COREEVENT_GROUND_JUMP) create_sound(pos, SOUND_PLAYER_JUMP, mask);
|
if(events&COREEVENT_GROUND_JUMP) create_sound(pos, SOUND_PLAYER_JUMP, mask);
|
||||||
if(events&COREEVENT_AIR_JUMP) create_sound(pos, SOUND_PLAYER_JUMP, mask);
|
if(events&COREEVENT_AIR_JUMP) create_sound(pos, SOUND_PLAYER_JUMP, mask);
|
||||||
//if(events&COREEVENT_HOOK_LAUNCH) snd_play_random(CHN_WORLD, SOUND_HOOK_LOOP, 1.0f, pos);
|
//if(events&COREEVENT_HOOK_LAUNCH) snd_play_random(CHN_WORLD, SOUND_HOOK_LOOP, 1.0f, pos);
|
||||||
if(events&COREEVENT_HOOK_ATTACH_PLAYER) create_sound(pos, SOUND_HOOK_ATTACH, mask);
|
if(events&COREEVENT_HOOK_ATTACH_PLAYER) create_sound(pos, SOUND_HOOK_ATTACH_PLAYER, mask);
|
||||||
if(events&COREEVENT_HOOK_ATTACH_GROUND) create_sound(pos, SOUND_HOOK_ATTACH, mask);
|
if(events&COREEVENT_HOOK_ATTACH_GROUND) create_sound(pos, SOUND_HOOK_ATTACH_GROUND, mask);
|
||||||
//if(events&COREEVENT_HOOK_RETRACT) snd_play_random(CHN_WORLD, SOUND_PLAYER_JUMP, 1.0f, pos);
|
//if(events&COREEVENT_HOOK_RETRACT) snd_play_random(CHN_WORLD, SOUND_PLAYER_JUMP, 1.0f, pos);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue