// {{{ #2: Shotgun
set g_balance_shotgun_primary_ammo 1
set g_balance_shotgun_primary_animtime 0.2
-set g_balance_shotgun_primary_bullets 14
-set g_balance_shotgun_primary_damage 3.5
+set g_balance_shotgun_primary_bullets 12
+set g_balance_shotgun_primary_damage 4
set g_balance_shotgun_primary_force 15
set g_balance_shotgun_primary_refire 0.75
set g_balance_shotgun_primary_solidpenetration 3.8
-set g_balance_shotgun_primary_spread 0.11
+set g_balance_shotgun_primary_spread 0.12
set g_balance_shotgun_reload_ammo 0
set g_balance_shotgun_reload_time 2
set g_balance_shotgun_secondary 1
// {{{ #2: Shotgun
set g_balance_shotgun_primary_ammo 1
set g_balance_shotgun_primary_animtime 0.2
-set g_balance_shotgun_primary_bullets 14
-set g_balance_shotgun_primary_damage 3.5
+set g_balance_shotgun_primary_bullets 12
+set g_balance_shotgun_primary_damage 4
set g_balance_shotgun_primary_force 15
set g_balance_shotgun_primary_refire 0.75
set g_balance_shotgun_primary_solidpenetration 3.8
-set g_balance_shotgun_primary_spread 0.11
+set g_balance_shotgun_primary_spread 0.12
set g_balance_shotgun_reload_ammo 0
set g_balance_shotgun_reload_time 2
set g_balance_shotgun_secondary 1
// 0: only damage from contents (lava/slime) or exceptions
// 1: only self damage or damage from contents or exceptions
// 2: allow all damage to projectiles normally
-set g_projectiles_keep_owner 0
+set g_projectiles_keep_owner 1
set g_projectiles_newton_style 0
// possible values:
// 0: absolute velocity projectiles (like Quake)
// 0: only damage from contents (lava/slime) or exceptions
// 1: only self damage or damage from contents or exceptions
// 2: allow all damage to projectiles normally
-set g_projectiles_keep_owner 0
+set g_projectiles_keep_owner 1
set g_projectiles_newton_style 0
// possible values:
// 0: absolute velocity projectiles (like Quake)
seta crosshair 16
seta crosshair_enabled 1 // main toggle for enabling/disabling crosshair rendering, used mostly just for the menu... 1 = with per-weapon crosshairs, 2 = custom crosshair
seta crosshair_color "0.6 0.8 1"
-seta crosshair_alpha 0.75
-seta crosshair_size 0.3
+seta crosshair_alpha 0.8
+seta crosshair_size 0.4
// crosshair dot settings
seta crosshair_dot 0
seta crosshair_dot_alpha 1
-seta crosshair_dot_size 0.600000
+seta crosshair_dot_size 0.6
seta crosshair_dot_color "1 0 0"
seta crosshair_dot_color_custom 1 "use a custom color for the crosshair dot"
set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
-set g_spawn_furthest 0.5 "this amount of the spawns shall be far away from any players"
+set g_spawn_furthest 1.0 "this amount of the spawns shall be far away from any players"
set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
// respawn delay
set g_respawn_delay_small 2 "small game number of seconds you have to wait before you can respawn again"
set g_overkill_powerups_replace 1
set g_overkill_superguns_respawn_time 20
-set g_overkill_ammo_charge 1
+set g_overkill_ammo_charge 0
set g_overkill_ammo_charge_notice 1
set g_overkill_ammo_charge_limit 1
set g_overkill_ammo_charge_rate 0.5
return color;
}
+float HUD_GetRowCount(float item_count, vector size, float item_aspect)
+{
+ float aspect = size_y / size_x;
+ return bound(1, floor((sqrt(4 * item_aspect * aspect * item_count + aspect * aspect) + aspect + 0.5) / 2), item_count);
+}
+
float stringwidth_colors(string s, vector theSize)
{
return stringwidth(s, true, theSize);
float screen_ar;
vector center = '0 0 0';
float weapon_count, weapon_id;
- float row, column, rows = 0, columns = 0;
+ float row, column, rows = 0, columns;
float aspect = autocvar_hud_panel_weapons_aspect;
- float panel_weapon_accuracy;
-
float timeout = autocvar_hud_panel_weapons_timeout;
float timein_effect_length = autocvar_hud_panel_weapons_timeout_speed_in; //? 0.375 : 0);
float timeout_effect_length = autocvar_hud_panel_weapons_timeout_speed_out; //? 0.75 : 0);
- float ammo_full;
vector barsize = '0 0 0', baroffset = '0 0 0';
vector ammo_color = '1 0 1';
float ammo_alpha = 1;
if(!autocvar_hud_panel_weapons_complainbubble || autocvar__hud_configure || time - complain_weapon_time >= when + fadetime)
complain_weapon = 0;
+ if(autocvar__hud_configure)
+ {
+ if(!weapons_stat)
+ for(i = WEP_FIRST; i <= WEP_LAST; i += floor((WEP_LAST-WEP_FIRST)/5))
+ weapons_stat |= WepSet_FromWeapon(i);
+ }
+
// determine which weapons are going to be shown
if (autocvar_hud_panel_weapons_onlyowned)
{
if(autocvar__hud_configure)
{
- if (!weapons_stat)
- for(i = WEP_FIRST; i <= WEP_LAST; i += floor((WEP_LAST-WEP_FIRST)/5))
- weapons_stat |= WepSet_FromWeapon(i);
-
if(menu_enabled != 2)
HUD_Panel_DrawBg(1); // also draw the bg of the entire panel
}
// do we own this weapon?
weapon_count = 0;
for(i = 0; i <= WEP_LAST-WEP_FIRST; ++i)
- if(weapons_stat & WepSet_FromWeapon(weaponorder[i].weapon))
+ if((weapons_stat & WepSet_FromWeapon(weaponorder[i].weapon)) || (weaponorder[i].weapon == complain_weapon))
++weapon_count;
- // add it anyway if weaponcomplain is shown
- if(complain_weapon)
- ++weapon_count;
-
// might as well commit suicide now, no reason to live ;)
if (weapon_count == 0)
{
return;
}
- vector max_panel_size = panel_size - '2 2 0' * panel_bg_padding;
+ vector old_panel_size = panel_size;
+ vector padded_panel_size = panel_size - '2 2 0' * panel_bg_padding;
- // calculate distribution and size of table cells
- if(max_panel_size.x > max_panel_size.y)
- {
- while(weapon_count > columns * rows)
- {
- ++rows;
- columns = ceil(max_panel_size.x / (max_panel_size.y / rows * aspect));
- }
+ // get the all-weapons layout
+ rows = HUD_GetRowCount(WEP_COUNT, padded_panel_size, aspect);
+ columns = ceil(WEP_COUNT / rows);
+ weapon_size.x = padded_panel_size.x / columns;
+ weapon_size.y = padded_panel_size.y / rows;
- weapon_size.x = max_panel_size.x / columns;
- weapon_size.y = max_panel_size.y / rows;
+ // reduce rows and columns as needed
+ // NOTE: although weapons should aways look the same even if onlyowned is enabled,
+ // we enlarge them a bit when possible to better match the desired aspect ratio
+ if(padded_panel_size.y > padded_panel_size.x)
+ {
columns = ceil(weapon_count / rows);
+ rows = ceil(weapon_count / columns);
+ weapon_size.y = min(padded_panel_size.y / rows, weapon_size.x / aspect);
+ weapon_size.x = min(padded_panel_size.x / columns, aspect * weapon_size.y);
}
else
{
- while(weapon_count > columns * rows)
- {
- ++columns;
- rows = ceil(max_panel_size.y / (max_panel_size.x / columns / aspect));
- }
-
- weapon_size.x = max_panel_size.x / columns;
- weapon_size.y = max_panel_size.y / rows;
rows = ceil(weapon_count / columns);
+ columns = ceil(weapon_count / rows);
+ weapon_size.x = min(padded_panel_size.x / columns, aspect * weapon_size.y);
+ weapon_size.y = min(padded_panel_size.y / rows, weapon_size.x / aspect);
}
// reduce size of the panel
panel_size.x = columns * weapon_size.x;
panel_size.y = rows * weapon_size.y;
- panel_pos.x += (max_panel_size.x - panel_size.x) / 2;
- panel_pos.y += (max_panel_size.y - panel_size.y) / 2;
-
panel_size += '2 2 0' * panel_bg_padding;
+
+ // center the resized panel, or snap it to the screen edge when close enough
+ if(panel_pos.x > vid_conwidth * 0.001)
+ {
+ if(panel_pos.x + old_panel_size.x > vid_conwidth * 0.999)
+ panel_pos.x += old_panel_size.x - panel_size.x;
+ else
+ panel_pos.x += (old_panel_size.x - panel_size.x) / 2;
+ }
+ else if(old_panel_size.x > vid_conwidth * 0.999)
+ panel_pos.x += (old_panel_size.x - panel_size.x) / 2;
+
+ if(panel_pos.y > vid_conheight * 0.001)
+ {
+ if(panel_pos.y + old_panel_size.y > vid_conheight * 0.999)
+ panel_pos.y += old_panel_size.y - panel_size.y;
+ else
+ panel_pos.y += (old_panel_size.y - panel_size.y) / 2;
+ }
+ else if(old_panel_size.y > vid_conheight * 0.999)
+ panel_pos.y += (old_panel_size.y - panel_size.y) / 2;
}
else
weapon_count = WEP_COUNT;
if(!rows) // if rows is > 0 onlyowned code has already updated these vars
{
- rows = panel_size.y/panel_size.x;
- rows = bound(1, floor((sqrt(4 * aspect * rows * weapon_count + rows * rows) + rows + 0.5) / 2), weapon_count);
+ rows = HUD_GetRowCount(weapon_count, panel_size, aspect);
columns = ceil(weapon_count/rows);
weapon_size = eX * panel_size.x*(1/columns) + eY * panel_size.y*(1/rows);
}
// draw the weapon accuracy
if(autocvar_hud_panel_weapons_accuracy)
{
- panel_weapon_accuracy = weapon_accuracy[self.weapon-WEP_FIRST];
+ float panel_weapon_accuracy = weapon_accuracy[self.weapon-WEP_FIRST];
if(panel_weapon_accuracy >= 0)
{
color = Accuracy_GetColor(panel_weapon_accuracy);
// draw ammo status bar
if(autocvar_hud_panel_weapons_ammo && (self.ammo_field != ammo_none))
{
+ float ammo_full;
a = getstati(GetAmmoStat(self.ammo_field)); // how much ammo do we have?
if(a > 0)
else
nade_prevstatus = nade_prevframe = nade_statuschange_time = 0;
- rows = mySize.y/mySize.x;
- rows = bound(1, floor((sqrt(4 * (3/1) * rows * (total_ammo_count) + rows * rows) + rows + 0.5) / 2), (total_ammo_count));
- // ^^^ ammo item aspect goes here
-
+ rows = HUD_GetRowCount(total_ammo_count, mySize, 3);
columns = ceil((total_ammo_count)/rows);
-
ammo_size = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
-
vector offset = '0 0 0'; // fteqcc sucks
float newSize;
if(ammo_size.x/ammo_size.y > 3)
}
if(spectatee_status == -1)
{
- rows = mySize.y/mySize.x;
- rows = bound(1, floor((sqrt(4 * (3/1) * rows * team_count + rows * rows) + rows + 0.5) / 2), team_count);
- // ^^^ ammo item aspect goes here
-
+ rows = HUD_GetRowCount(team_count, mySize, 3);
columns = ceil(team_count/rows);
-
score_size = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
float newSize;
else //if(gametype == MAPINFO_TYPE_FREEZETAG)
layout = autocvar_hud_panel_modicons_freezetag_layout;
float rows, columns, aspect_ratio;
- rows = mySize.y/mySize.x;
aspect_ratio = (layout) ? 2 : 1;
- rows = bound(1, floor((sqrt((4 * aspect_ratio * team_count + rows) * rows) + rows + 0.5) / 2), team_count);
+ rows = HUD_GetRowCount(team_count, mySize, aspect_ratio);
columns = ceil(team_count/rows);
int i;
int layout = autocvar_hud_panel_modicons_dom_layout;
float rows, columns, aspect_ratio;
- rows = mySize.y/mySize.x;
aspect_ratio = (layout) ? 3 : 1;
- rows = bound(1, floor((sqrt((4 * aspect_ratio * team_count + rows) * rows) + rows + 0.5) / 2), team_count);
+ rows = HUD_GetRowCount(team_count, mySize, aspect_ratio);
columns = ceil(team_count/rows);
int i;
#include "tuba.qh"
-void tubasound(entity e, float restart)
+#define TUBA_STARTNOTE(i, n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
+
+const int TUBA_MIN = -18;
+const int TUBA_MAX = 27;
+const int TUBA_INSTRUMENTS = 3;
+
+.int note;
+.bool tuba_attenuate;
+.float tuba_volume;
+.float tuba_volume_initial;
+.int tuba_instrument;
+
+int Tuba_PitchStep;
+
+void tubasound(entity e, bool restart)
{
- string snd1;
-
- snd1 = string_null;
-
- if(Tuba_PitchStep)
- {
- string snd2;
- float f1, f2;
- float p1, p2;
- float m;
-
- f1 = 1;
- p1 = 1;
- snd2 = string_null;
- f2 = 0;
- p2 = 1;
-
- m = e.note % Tuba_PitchStep;
- if(m)
- {
- if(e.note - m < TUBA_MIN)
- {
- if(restart)
+ string snd1 = string_null;
+ if (Tuba_PitchStep) {
+ float vol1 = 1;
+ float speed1 = 1;
+ string snd2 = string_null;
+ float vol2 = 0;
+ float speed2 = 1;
+
+ int m = pymod(e.note, Tuba_PitchStep);
+ if (m) {
+ if (e.note - m < TUBA_MIN) {
+ if (restart) {
snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m + Tuba_PitchStep);
- p1 = pow(2.0, (m - Tuba_PitchStep) / 12.0);
- }
- else if(e.note - m + Tuba_PitchStep > TUBA_MAX)
- {
- if(restart)
+ }
+ speed1 = pow(2.0, (m - Tuba_PitchStep) / 12.0);
+ } else if (e.note - m + Tuba_PitchStep > TUBA_MAX) {
+ if (restart) {
snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m);
- p1 = pow(2.0, m / 12.0);
- }
- else
- {
- if(restart)
+ }
+ speed1 = pow(2.0, m / 12.0);
+ } else {
+ if (restart) {
snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m);
- f1 = cos(M_PI_2 * m / Tuba_PitchStep);
- p1 = pow(2.0, m / 12.0);
- if(restart)
+ }
+ vol1 = cos(M_PI_2 * m / Tuba_PitchStep);
+ speed1 = pow(2.0, m / 12.0);
+ if (restart) {
snd2 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m + Tuba_PitchStep);
- f2 = sin(M_PI_2 * m / Tuba_PitchStep);
- p2 = pow(2.0, (m - Tuba_PitchStep) / 12.0);
+ }
+ vol2 = sin(M_PI_2 * m / Tuba_PitchStep);
+ speed2 = pow(2.0, (m - Tuba_PitchStep) / 12.0);
}
- }
- else
- {
- if(restart)
- snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note);
+ } else if (restart) {
+ snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note);
}
- sound7(e, CH_TUBA_SINGLE, snd1, e.cnt * f1, e.attenuate * autocvar_g_balance_tuba_attenuation, 100 * p1, 0);
- if(f2)
- sound7(e.enemy, CH_TUBA_SINGLE, snd2, e.cnt * f2, e.attenuate * autocvar_g_balance_tuba_attenuation, 100 * p2, 0);
- }
- else
- {
- if(restart)
+ sound7(e, CH_TUBA_SINGLE, snd1, e.tuba_volume * vol1, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation, 100 * speed1, 0);
+ if (vol2) {
+ sound7(e.enemy, CH_TUBA_SINGLE, snd2, e.tuba_volume * vol2, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation, 100 * speed2, 0);
+ }
+ } else {
+ if (restart) {
snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note);
- sound(e, CH_TUBA_SINGLE, snd1, e.cnt, e.attenuate * autocvar_g_balance_tuba_attenuation);
+ }
+ sound(e, CH_TUBA_SINGLE, snd1, e.tuba_volume, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation);
}
}
void Ent_TubaNote_Think()
{
- float f;
- f = autocvar_g_balance_tuba_fadetime;
- if(f > 0)
- self.cnt -= frametime * self.count / f;
- else
- self.cnt = 0;
+ float f = autocvar_g_balance_tuba_fadetime;
+ if (f > 0) {
+ self.tuba_volume -= frametime * self.tuba_volume_initial / f;
+ } else {
+ self.tuba_volume = 0;
+ }
self.nextthink = time;
- if(self.cnt <= 0)
- {
+ if (self.tuba_volume <= 0) {
sound(self, CH_TUBA_SINGLE, "misc/null.wav", 0, 0);
- if(self.enemy)
- {
+ if (self.enemy) {
sound(self.enemy, CH_TUBA_SINGLE, "misc/null.wav", 0, 0);
remove(self.enemy);
}
remove(self);
- }
- else
- {
+ } else {
tubasound(self, 0);
}
}
void Ent_TubaNote_UpdateSound()
{
- self.enemy.cnt = bound(0, VOL_BASE * autocvar_g_balance_tuba_volume, 1);
- self.enemy.count = self.enemy.cnt;
+ self.enemy.tuba_volume = bound(0, VOL_BASE * autocvar_g_balance_tuba_volume, 1);
+ self.enemy.tuba_volume_initial = self.enemy.tuba_volume;
self.enemy.note = self.note;
self.enemy.tuba_instrument = self.tuba_instrument;
tubasound(self.enemy, 1);
self.enemy = world;
}
-void Ent_TubaNote(float bIsNew)
+void Ent_TubaNote(bool isNew)
{
- int f, n, i;
- float att, upd;
- f = ReadByte();
-
- upd = 0;
-
- if(f & 1)
- {
- n = ReadChar();
- i = ReadByte();
- att = (i & 1);
- i = floor(i / 2);
-
- if(n != self.note || i != self.tuba_instrument || bIsNew)
- {
- if(self.enemy)
+ bool upd = false;
+ int f = ReadByte();
+ if (f & 1) {
+ int n = ReadChar();
+ int i = ReadByte();
+ bool att = (i & 1);
+ i >>= 1;
+
+ if (self.enemy) {
+ if (n != self.note || i != self.tuba_instrument || isNew) {
Ent_TubaNote_StopSound();
- }
-
- if(!self.enemy)
- {
+ }
+ } else {
self.enemy = spawn();
self.enemy.classname = "tuba_note";
- if(Tuba_PitchStep)
- {
+ if (Tuba_PitchStep) {
self.enemy.enemy = spawn();
self.enemy.enemy.classname = "tuba_note_2";
}
- bIsNew = true;
+ isNew = true;
}
- self.enemy.attenuate = att;
+ self.enemy.tuba_attenuate = att;
- if(bIsNew)
- {
+ if (isNew) {
self.note = n;
self.tuba_instrument = i;
- upd = 1;
+ upd = true;
}
}
- if(f & 2)
- {
+ if (f & 2) {
self.enemy.origin_x = ReadCoord();
self.enemy.origin_y = ReadCoord();
self.enemy.origin_z = ReadCoord();
setorigin(self.enemy, self.enemy.origin);
- if(self.enemy.enemy)
+ if (self.enemy.enemy) {
setorigin(self.enemy.enemy, self.enemy.origin);
+ }
}
self.think = Ent_TubaNote_StopSound;
self.enemy.think = Ent_TubaNote_Think;
self.enemy.nextthink = time + 10;
- if(upd)
+ if (upd) {
Ent_TubaNote_UpdateSound();
+ }
}
void Tuba_Precache()
{
- float i;
- int n;
Tuba_PitchStep = autocvar_g_balance_tuba_pitchstep;
- if(Tuba_PitchStep)
- {
- if(!checkextension("DP_SND_SOUND7_WIP2") && !checkextension("DP_SND_SOUND7"))
- {
+ if (Tuba_PitchStep) {
+ if (!checkextension("DP_SND_SOUND7_WIP2") && !checkextension("DP_SND_SOUND7")) {
print("^1NOTE:^7 requested pitch shifting, but not supported by this engine build\n");
Tuba_PitchStep = 0;
}
}
- for(n = TUBA_MIN; n <= TUBA_MAX; ++n)
- {
- if(!Tuba_PitchStep || ((n % Tuba_PitchStep) == 0))
- {
- for(i = 0; i < TUBA_INSTRUMENTS; ++i)
+ for (int n = TUBA_MIN; n <= TUBA_MAX; ++n) {
+ if (!Tuba_PitchStep || pymod(n, Tuba_PitchStep) == 0) {
+ for (int i = 0; i < TUBA_INSTRUMENTS; ++i) {
precache_sound(TUBA_STARTNOTE(i, n));
+ }
}
}
}
#ifndef TUBA_H
#define TUBA_H
-
-const float TUBA_MIN = -18;
-const float TUBA_MAX = 27;
-const float TUBA_INSTRUMENTS = 3;
-
-#define TUBA_STARTNOTE(i,n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
-.int note; // note
-.float attenuate; // if set, attenuate it
-.float cnt; // current volume
-.float count; // initial volume
-.float tuba_instrument;
-
-int Tuba_PitchStep;
-
-void tubasound(entity e, float restart);
-
-void Ent_TubaNote_Think();
-
-void Ent_TubaNote_UpdateSound();
-
-void Ent_TubaNote_StopSound();
-
-void Ent_TubaNote(float bIsNew);
-
+void Ent_TubaNote(bool isNew);
void Tuba_Precache();
#endif
return r;
}
-void MapInfo_SwitchGameType(float t)
+void MapInfo_SwitchGameType(int t)
{
- entity e;
- for(e = MapInfo_Type_first; e; e = e.enemy)
+ for (entity e = MapInfo_Type_first; e; e = e.enemy) {
cvar_set(e.netname, (t == e.items) ? "1" : "0");
+ }
}
void MapInfo_LoadMap(string s, float reinit)
string MapInfo_Type_Description(float t);
string MapInfo_Type_ToString(float t);
string MapInfo_Type_ToText(float t);
-void MapInfo_SwitchGameType(float t);
+void MapInfo_SwitchGameType(int t);
// to be called from worldspawn to set up cvars
void MapInfo_LoadMapSettings(string s);
/* color */ '1 0.5 0.5',
/* modelname */ "laser",
/* simplemdl */ "foobar",
-/* crosshair */ "gfx/crosshairlaser 0.4",
+/* crosshair */ "gfx/crosshairlaser 0.5",
/* wepimg */ "weaponlaser",
/* refname */ "blaster",
/* wepname */ _("Blaster")
/* color */ '1 0.5 1',
/* modelname */ "crylink",
/* simplemdl */ "foobar",
-/* crosshair */ "gfx/crosshaircrylink 0.4",
+/* crosshair */ "gfx/crosshaircrylink 0.5",
/* wepimg */ "weaponcrylink",
/* refname */ "crylink",
/* wepname */ _("Crylink")
/* color */ '1 1 0',
/* modelname */ "rl",
/* simplemdl */ "foobar",
-/* crosshair */ "gfx/crosshairrocketlauncher 0.5875",
+/* crosshair */ "gfx/crosshairrocketlauncher 0.7",
/* wepimg */ "weaponrocketlauncher",
/* refname */ "devastator",
/* wepname */ _("Devastator")
/* color */ '0 0.5 1',
/* modelname */ "electro",
/* simplemdl */ "foobar",
-/* crosshair */ "gfx/crosshairelectro 0.5",
+/* crosshair */ "gfx/crosshairelectro 0.6",
/* wepimg */ "weaponelectro",
/* refname */ "electro",
/* wepname */ _("Electro")
/* color */ '0.5 1 0',
/* modelname */ "campingrifle",
/* simplemdl */ "foobar",
-/* crosshair */ "gfx/crosshairrifle 0.5",
+/* crosshair */ "gfx/crosshairrifle 0.6",
/* wepimg */ "weaponrifle",
/* refname */ "rifle",
/* wepname */ _("Rifle")
/* color */ '0.5 0.5 0',
/* modelname */ "ok_rl",
/* simplemdl */ "foobar",
-/* crosshair */ "gfx/crosshairrocketlauncher 0.5875",
+/* crosshair */ "gfx/crosshairrocketlauncher 0.7",
/* wepimg */ "weaponrpc",
/* refname */ "rpc",
/* wepname */ _("Rocket Propelled Chainsaw")
/* color */ '0.5 1 1',
/* modelname */ "minstanex",
/* simplemdl */ "foobar",
-/* crosshair */ "gfx/crosshairminstanex 0.4",
+/* crosshair */ "gfx/crosshairminstanex 0.6",
/* wepimg */ "weaponminstanex",
/* refname */ "vaporizer",
/* wepname */ _("Vaporizer")
float(string s) isfunction = #607;
void(entity e, string s) parseentitydata = #608;
+//DP_COVERAGE
+//idea: divVerent
+//darkplaces implementation: divVerent
+//function definitions:
+void coverage() = #642; // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
+
// assorted builtins
//const int STAT_MOVEVARS_TICRATE = 240;
//const int STAT_MOVEVARS_TIMESCALE = 241;
//darkplaces implementation: Blub\0
//cvar definitions:
// utf8_enable: enable utf8 encoding
-//description: utf8 characters are allowed inside cvars, protocol strings, files, progs strings, etc.,
+//description: utf8 characters are allowed inside cvars, protocol strings, files, progs strings, etc.,
//and count as 1 char for string functions like strlen, substring, etc.
// note: utf8_enable is run-time cvar, could be changed during execution
// note: beware that str2chr() could return value bigger than 255 once utf8 is enabled
// description: allows alternative 'static' lightstyle syntax : "=value"
// examples: "=0.5", "=2.0", "=2.75"
// could be used to control switchable lights or making styled lights with brightness > 2
-// Warning: this extension is experimental. It safely works in CSQC, but SVQC use is limited by the fact
+// Warning: this extension is experimental. It safely works in CSQC, but SVQC use is limited by the fact
// that other engines (which do not support this extension) could connect to a game and misunderstand this kind of lightstyle syntax
//DP_LITSPRITES
//syntax of .dpsubs files: each line in .dpsubs file defines 1 subtitle, there are three tokens:
// <start> <end> "string"
// start: subtitle start time in seconds
-// end: subtitle time-to-show in seconds, if 0 - subtitle will be showed until next subtitle is started,
+// end: subtitle time-to-show in seconds, if 0 - subtitle will be showed until next subtitle is started,
// if below 0 - show until next subtitles minus this number of seconds
// text: subtitle text, color codes (Q3-style and ^xRGB) are allowed
//example of subtitle file:
// 3 0 "Vengeance! Vengeance for my eternity of suffering!"
// 9 0 "Whelp! As if you knew what eternity was!"
// 13 0 "Grovel before your true master."
-// 17 0 "Never!"
+// 17 0 "Never!"
// 18 7 "I'll hack you from crotch to gizzard and feed what's left of you to your brides..."
//DP_SOLIDCORPSE
.vector massofs; // offsets a mass center out of object center, if not set a center of model bounds is used
.float friction; // a friction of object, get multiplied by second objects's friction on contact
.float bouncefactor;
-.float bouncestop;
+.float bouncestop;
.float jointtype; // type of joint
.float forcetype; // type of force
-.float erp; // error restitution parameter, makes ODE solver attempt to fix errors in contacts,
- // bringing together 2 joints or fixing object being stuch in other object,
+.float erp; // error restitution parameter, makes ODE solver attempt to fix errors in contacts,
+ // bringing together 2 joints or fixing object being stuch in other object,
// a value of 0.1 will fix slightly, a value of 1.0 attempts to fix whole error in one frame
// use with care as high values makes system unstable and likely to explode
//builtin definitions:
//
//Note: it is worth considering that network-related functions may be called during the pause (including customizeentityforclient for example), and it is also important to consider the continued use of the KRIMZON_SV_PARSECLIENTCOMMAND extension while paused (chatting players, etc), players may also join/leave during the pause. In other words, the only things that are not called are think and other time-related functions.
-
+//DP_COVERAGE
+//idea: divVerent
+//darkplaces implementation: divVerent
+//function definitions:
+void coverage() = #642; // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
// EXPERIMENTAL (not finalized) EXTENSIONS:
//idea: divVerent
//darkplaces implementation: divVerent
//field definitions: (SVQC)
-.string crypto_keyfp; // fingerprint of CA key the player used to authenticate, or string_null if not verified
-.string crypto_mykeyfp; // fingerprint of CA key the server used to authenticate to the player, or string_null if not verified
+.string crypto_keyfp; // fingerprint of CA key the player used to authenticate
+.string crypto_mykeyfp; // fingerprint of CA key the server used to authenticate to the player
.string crypto_idfp; // fingerprint of ID used by the player entity, or string_null if not identified
+.float crypto_idfp_signed; // set if the player's ID has been signed
.string crypto_encryptmethod; // the string "AES128" if encrypting, and string_null if plaintext
.string crypto_signmethod; // the string "HMAC-SHA256" if signing, and string_null if plaintext
// there is no field crypto_myidfp, as that info contains no additional information the QC may have a use for
float drawcolorcodedstring(vector position, string text, vector scale, float alpha, float flag) = #467;
vector drawcolorcodedstring2(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #467;
-
+
float drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag) = #456;
float drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #457;
//field definitions: (MENUQC)
string(string serveraddress) crypto_getkeyfp = #633; // retrieves the cached host key's CA fingerprint of a server given by IP address
string(string serveraddress) crypto_getidfp = #634; // retrieves the cached host key fingerprint of a server given by IP address
+float(string serveraddress) crypto_getidstatus = #643; // retrieves the cached host key's key status. See below for CRYPTO_IDSTATUS_ defines.
string(string serveraddress) crypto_getencryptlevel = #635; // 0 if never encrypting, 1 supported, 2 requested, 3 required, appended by list of allowed methods in order of preference ("AES128"), preceded by a space each
string(float i) crypto_getmykeyfp = #636; // retrieves the CA key fingerprint of a given CA slot, or "" if slot is unused but more to come, or string_null if end of list
string(float i) crypto_getmyidfp = #637; // retrieves the ID fingerprint of a given CA slot, or "" if slot is unused but more to come, or string_null if end of list
//getentityfieldstring returns data as would be written to a savegame, eg... "0.05" (float), "0 0 1" (vector), or "Hello World!" (string). Function names can also be returned.
//putentityfieldstring puts the data returned by getentityfieldstring back into the entity.
+//DP_COVERAGE
+//idea: divVerent
+//darkplaces implementation: divVerent
+//function definitions:
+void coverage() = #642; // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
+
// assorted undocumented extensions
string(string, float) netaddress_resolve = #625;
string(string search, string replace, string subject) strreplace = #484;
if(e.ModalController_state)
{
if(front)
- {
me.switchState(me, front, 2, 0);
- if(front.ModalController_factor < 1)
- animating = 1;
- }
front = e;
}
if(front)
- {
me.switchState(me, front, 1, 0);
- if(front.ModalController_factor < 1)
- animating = 1;
- }
-
- if(front && front.Container_alpha == front.ModalController_initialAlpha)
- goto update_done; // update isn't needed, everything stay as is
df = frametime * 3; // animation speed
me.setAlphaOf(me, e, e.Container_alpha * prevFactor);
else
{
+ animating = 1;
targetFactor = df / (1 - f + df);
if(e.ModalController_state == 1)
e.Container_fontscale_y = fs.y * e.ModalController_initialFontScale.y;
}
}
- :update_done
if(animating || !me.focused)
me.setFocus(me, NULL);
me.gotoRC(me, me.rows - 3, 0);
me.TDempty(me, 1.5);
- me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_allow_uid2name", "1", ZCTX(_("ALWU2N^Yes"))));
- me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_allow_uid2name", "0", ZCTX(_("ALWU2N^No"))));
- me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_allow_uid2name", "-1", ZCTX(_("ALWU2N^Undecided"))));
+ me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_allow_uid2name", "1", _("Yes")));
+ me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_allow_uid2name", "0", _("No")));
+ me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_allow_uid2name", "-1", _("Undecided")));
// because of the language selector, this is a menu_restart!
me.gotoRC(me, me.rows - 1, 0);
case MAPINFO_TYPE_ONSLAUGHT: GameType_ConfigureSliders(e, l, _("Point limit:"), 50, 500, 10, ""); break;
case MAPINFO_TYPE_CTS: GameType_ConfigureSliders(e, l, _("Point limit:"), 50, 500, 10, ""); break;
case MAPINFO_TYPE_INVASION: GameType_ConfigureSliders(e, l, _("Point limit:"), 5, 0, 5, ""); break;
+ case MAPINFO_TYPE_TEAM_DEATHMATCH:GameType_ConfigureSliders(e, l, _("Point limit:"), 5, 100, 5, "g_tdm_point_limit"); break;
default: GameType_ConfigureSliders(e, l, _("Frag limit:"), 5, 100, 5, "fraglimit_override"); break;
}
me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you really wish to disconnect now?")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("DMCNFRM^Yes")), '1 0 0'));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("Yes"), '1 0 0'));
e.onClick = Handle_StartDemo_Click;
e.onClickEntity = demolist;
- me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("DMCNFRM^No")), '0 1 0'));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you really wish to disconnect now?")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("DMCNFRM^Yes")), '1 0 0'));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("Yes"), '1 0 0'));
e.onClick = Handle_TimeDemo_Click;
e.onClickEntity = demolist;
- me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("DMCNFRM^No")), '0 1 0'));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
#if 0
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gender:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("_cl_gender"));
- e.addValue(e, ZCTX(_("GENDER^Undisclosed")), "0");
- e.addValue(e, ZCTX(_("GENDER^Female")), "1");
- e.addValue(e, ZCTX(_("GENDER^Male")), "2");
+ e.addValue(e, _("Undisclosed"), "0");
+ e.addValue(e, _("Female"), "1");
+ e.addValue(e, _("Male"), "2");
e.configureXonoticTextSliderValues(e);
#else
me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Gender")));
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Damage effects:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_damageeffect"));
- e.addValue(e, _("Disabled"), "0");
+ e.addValue(e, ZCTX(_("DMGFX^Disabled")), "0");
e.addValue(e, _("Skeletal"), "1");
- e.addValue(e, _("All"), "2");
+ e.addValue(e, ZCTX(_("DMGFX^All")), "2");
e.configureXonoticTextSliderValues(e);
me.gotoRC(me, 1.25, 3.2); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 1, e = makeXonoticRadioButton(3, "crosshair_enabled", "2", _("Custom")));
me.TR(me);
me.TDempty(me, 0.1);
- for(i = 1; i <= 14; ++i) {
- me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0');
+ for(i = 31; i <= 42; ++i) {
+ me.TDNoMargin(me, 1, 2 / 12, e = makeXonoticCrosshairButton(4, i), '1 1 0');
setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
}
// show a larger preview of the selected crosshair
setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
me.TR(me);
me.TDempty(me, 0.1);
- for(i = 15; i <= 28; ++i) {
- me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0');
+ for(i = 43; i <= 54; ++i) {
+ me.TDNoMargin(me, 1, 2 / 12, e = makeXonoticCrosshairButton(4, i), '1 1 0');
setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
}
me.TR(me);
me.TDempty(me, 0.1);
- for(i = 29; i <= 42; ++i) {
- me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0');
+ for(i = 55; i <= 66; ++i) {
+ me.TDNoMargin(me, 1, 2 / 12, e = makeXonoticCrosshairButton(4, i), '1 1 0');
setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
}
me.TR(me);
me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Decolorize:")));
setDependent(e, "hud_shownames", 1, 1);
me.TD(me, 1, 2, e = makeXonoticTextSlider("hud_shownames_decolorize"));
- e.addValue(e, ZCTX(_("Never")), "0");
- e.addValue(e, ZCTX(_("Teamplay")), "1");
- e.addValue(e, ZCTX(_("Always")), "2");
+ e.addValue(e, _("Never"), "0");
+ e.addValue(e, _("Teamplay"), "1");
+ e.addValue(e, _("Always"), "2");
e.configureXonoticTextSliderValues(e);
setDependent(e, "hud_shownames", 1, 1);
me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you wish to start a local game to set up the HUD?")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^Yes")), '1 0 0'));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("Yes"), '1 0 0'));
e.onClick = HUDSetup_Start;
e.onClickEntity = me;
- me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^No")), '0 1 0'));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Sprees in info messages:")));
setDependent(e, "notification_show_sprees", 1, 1);
me.TD(me, 1, 2, e = makeXonoticTextSlider("notification_show_sprees_info"));
- e.addValue(e, ZCTX(_("Disabled")), "0");
- e.addValue(e, ZCTX(_("Target")), "1");
- e.addValue(e, ZCTX(_("Attacker")), "2");
- e.addValue(e, ZCTX(_("Both")), "3");
+ e.addValue(e, ZCTX(_("SPREES^Disabled")), "0");
+ e.addValue(e, _("Target"), "1");
+ e.addValue(e, _("Attacker"), "2");
+ e.addValue(e, ZCTX(_("SPREES^Both")), "3");
e.configureXonoticTextSliderValues(e);
setDependent(e, "notification_show_sprees", 1, 1);
#endif
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Jetpack on jump:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_jetpack_jump"));
- e.addValue(e, _("Disabled"), "0");
+ e.addValue(e, ZCTX(_("JPJUMP^Disabled")), "0");
e.addValue(e, _("Air only"), "1");
- e.addValue(e, _("All"), "2");
+ e.addValue(e, ZCTX(_("JPJUMP^All")), "2");
e.configureXonoticTextSliderValues(e);
e.sendCvars = true;
me.TR(me);
}
void XonoticGametypeList_configureXonoticGametypeList(entity me)
{
- float i;
me.configureXonoticListBox(me);
me.nItems = GameType_GetCount();
// we want the pics mipmapped
- for(i = 0; i < GameType_GetCount(); ++i)
+ for(int i = 0; i < GameType_GetCount(); ++i)
draw_PreloadPictureWithFlags(GameType_GetIcon(i), PRECACHE_PIC_MIPMAP);
me.loadCvars(me);
}
void XonoticGametypeList_saveCvars(entity me)
{
- float t;
- t = GameType_GetID(me.selectedItem);
- if(t == MapInfo_CurrentGametype())
+ int t = GameType_GetID(me.selectedItem);
+ if (t == MapInfo_CurrentGametype()) {
return;
+ }
MapInfo_SwitchGameType(t);
- me.parent.gameTypeChangeNotify(me.parent);
+ entity owner = me.parent;
+ if (owner) { // not set immediately
+ owner.gameTypeChangeNotify(owner);
+ }
}
void XonoticGametypeList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
{
//GAMETYPE(MAPINFO_TYPE_INVASION) \
/* nothing */
-float GameType_GetID(float cnt)
+int GameType_GetID(int cnt)
{
- float i;
- i = 0;
+ int i = 0;
- #define GAMETYPE(id) { if(i++ == cnt) return id; }
+ #define GAMETYPE(id) { if (i++ == cnt) return id; }
GAMETYPES
#undef GAMETYPE
return 0;
}
-float GameType_GetCount()
+int GameType_GetCount()
{
- float i;
- i = 0;
+ int i = 0;
#define GAMETYPE(id) ++i;
GAMETYPES
return i;
}
-string GameType_GetName(float cnt)
+string GameType_GetName(int cnt)
{
- float i = GameType_GetID(cnt);
+ int i = GameType_GetID(cnt);
if(i)
return MapInfo_Type_ToText(i);
return "";
}
-string GameType_GetIcon(float cnt)
+string GameType_GetIcon(int cnt)
{
- float i = GameType_GetID(cnt);
+ int i = GameType_GetID(cnt);
if(i)
return strcat("gametype_", MapInfo_Type_ToString(i));
// game type list box stuff (does not NEED to contain all game types, other
// types stay available via console)
-float GameType_GetID(float cnt);
-string GameType_GetName(float cnt);
-string GameType_GetIcon(float cnt);
+int GameType_GetID(int cnt);
+string GameType_GetName(int cnt);
+string GameType_GetIcon(int cnt);
//string GameType_GetTeams(float cnt);
-float GameType_GetCount();
+int GameType_GetCount();
void dialog_hudpanel_common_notoggle(entity me, string panelname);
#define DIALOG_HUDPANEL_COMMON_NOTOGGLE() \
float n, i;
string s;
- // NOTE: we do NOT check crypto_keyfp here, an unsigned ID is fine too for this
+ // NOTE: we do NOT check crypto_idfp_signed here, an unsigned ID is fine too for this
if (!p.crypto_idfp)
return 0;
if(IS_REAL_CLIENT(self))
sv_notice_join();
+ for (entity e = world; (e = findfloat(e, init_for_player_needed, 1)); ) {
+ entity oldself = self;
+ self = e;
+ e.init_for_player(oldself);
+ self = oldself;
+ }
+
MUTATOR_CALLHOOK(ClientConnect);
}
/*
}
// if the client is not acceptable, return a string to be used for error messages
-string GetClientErrorString(float clienterror, string original_input)
+string GetClientErrorString_color(float clienterror, string original_input, string col)
{
switch(clienterror)
{
- case CLIENT_DOESNT_EXIST: { return strcat("Client '", original_input, "' doesn't exist"); }
- case CLIENT_NOT_REAL: { return strcat("Client '", original_input, "' is not real"); }
- case CLIENT_NOT_BOT: { return strcat("Client '", original_input, "' is not a bot"); }
+ case CLIENT_DOESNT_EXIST: { return strcat(col, "Client '", original_input, col, "' doesn't exist"); }
+ case CLIENT_NOT_REAL: { return strcat(col, "Client '", original_input, col, "' is not real"); }
+ case CLIENT_NOT_BOT: { return strcat(col, "Client '", original_input, col, "' is not a bot"); }
default: { return "Incorrect usage of GetClientErrorString"; }
}
}
float VerifyClientEntity(entity client, float must_be_real, float must_be_bots);
// if the client is not acceptable, return a string to be used for error messages
-string GetClientErrorString(float clienterror, string original_input);
+string GetClientErrorString_color(float clienterror, string original_input, string col);
+#define GetClientErrorString(clienterror,original_input) GetClientErrorString_color(clienterror,original_input,"^7")
// is this entity number even in the possible range of entities?
float VerifyClientNumber(float tmp_number);
switch(tmp_player.vote_selection)
{
case VOTE_SELECT_REJECT: { ++vote_reject_count; { if(IS_PLAYER(tmp_player)) ++vote_real_reject_count; } break; }
- case VOTE_SELECT_ACCEPT: { ++vote_accept_count; { if(IS_PLAYER(tmp_player)) ++vote_real_reject_count; } break; }
+ case VOTE_SELECT_ACCEPT: { ++vote_accept_count; { if(IS_PLAYER(tmp_player)) ++vote_real_accept_count; } break; }
case VOTE_SELECT_ABSTAIN: { ++vote_abstain_count; { if(IS_PLAYER(tmp_player)) ++vote_real_abstain_count; } break; }
default: break;
}
.string playernick;
.float elos;
.float ranks;
+
+.float init_for_player_needed;
+.void(entity) init_for_player;
+
#endif
self.dropped_origin = self.origin;
if(self.mdl_dead == "")
- self.model = "";
+ self.effects |= EF_NODRAW;
else {
if (self.origin == '0 0 0') { // probably no origin brush, so don't spawn in the middle of the map..
floorZ = self.absmin.z;
self.origin_z = floorZ;
}
setmodel(self, self.mdl_dead);
+ self.effects &= ~EF_NODRAW;
}
+ CSQCMODEL_AUTOUPDATE();
+
self.solid = SOLID_NOT;
}
void func_breakable_look_restore()
{
setmodel(self, self.mdl);
+ self.effects &= ~EF_NODRAW;
+
if(self.mdl_dead != "") // only do this if we use mdl_dead, to behave better with misc_follow
setorigin(self, self.dropped_origin);
+
+ CSQCMODEL_AUTOUPDATE();
+
self.solid = SOLID_BSP;
}
self.event_damage = func_null;
self.state = 1;
func_breakable_colormod();
+ if (self.noise1)
+ stopsound (self, CH_TRIGGER_SINGLE);
}
void func_breakable_behave_restore()
self.state = 0;
self.nextthink = 0; // cancel auto respawn
func_breakable_colormod();
+ if (self.noise1)
+ sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
+}
+
+void func_breakable_init_for_player(entity player)
+{
+ if (self.noise1 && self.state == 0 && clienttype(player) == CLIENTTYPE_REAL)
+ {
+ msg_entity = player;
+ soundto (MSG_ONE, self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
+ }
}
void func_breakable_destroyed()
precache_model(argv(i));
if(self.noise)
precache_sound(self.noise);
+ if(self.noise1)
+ precache_sound(self.noise1);
self.team_saved = self.team;
self.dropped_origin = self.origin;
self.reset = func_breakable_reset;
func_breakable_reset();
+ self.init_for_player_needed = 1;
+ self.init_for_player = func_breakable_init_for_player;
+
CSQCMODEL_AUTOINIT();
}
float i1, i2, i3, i4;
string s;
- if(client.crypto_keyfp)
+ if(client.crypto_idfp_signed)
ban_idfp = client.crypto_idfp;
else
ban_idfp = string_null;
self = oldself;
activator = oldactivator;
+
+ // We called an external function, so we have to re-tokenize msg.
+ n = tokenize_console(msg);
}
else
{
return exp(v.x) * v.y;
}
+/**
+ * Pythonic mod:
+ * TODO: %% operator?
+ *
+ * 1 % 2 == 1
+ * -1 % 2 == 1
+ * 1 % -2 == -1
+ * -1 % -2 == -1
+ */
+float pymod(float x, float y)
+{
+ return x - y * floor(x / y);
+}
+
float nearbyint(float x)
{
return rint(x);
vector lgamma(float x); // value in _x, sign in _y
float tgamma(float x);
+/**
+ * Pythonic mod:
+ * TODO: %% operator?
+ *
+ * 1 % 2 == 1
+ * -1 % 2 == 1
+ * 1 % -2 == -1
+ * -1 % -2 == -1
+ */
+float pymod(float x, float y);
+
//float ceil(float x);
//float floor(float x);
float nearbyint(float x);
Marvin "Mirio" Beck
Merlijn Hofstra
Peter "Morphed" Pielak
+Ruszkai "CuBe0wL" Ákos
Samual "Ares" Lenks
Tyler "-z-" Mulligan
Zac "Mario" Jardine
JH0nny
Łukasz "kuniu the frogg" Polek
Matthias "matthiaskrgr" Krüger
+Mattia "Melanosuchus" Basaglia
MrBougo
Nick "bitbomb" Lucca
nilyt/nyov
packer
Pearce "theShadow" Michal
Rasmus "FruitieX" Eskola
-Ruszkai "C.Brutail" Ákos
+Ruszkai "CuBe0wL" Ákos
Severin "sev" Meyer
*Music / Sound FX
*Marketing / PR
Tyler "-z-" Mulligan
-Ruszkai "C.Brutail" Ákos
+Ruszkai "CuBe0wL" Ákos
Samual "Ares" Lenks
Saulo "mand1nga" Gil
**Other Active Contributors
Erik "Ablu" Schilling
Jope "Sless" Withers
-Mattia "Melanosuchus" Basaglia
Mircea "Taoki" Kitsune
Robert "ai" Kuroto
*Czech
shogun assassin/woky
+Tomáš "CZHeron" Volavka
*Dutch
Alexander "freefang" van Dam
PinkRobot
vegiburger
-*German
-cvcxc
-Erik "Ablu" Schilling
-Jope "Sless" Withers
-Marvin "Mirio" Beck
-Rudolf "divVerent" Polzer
-Yepoleb
+*English (Australia)
+Zac "Mario" Jardine
*Finnish
Henry "Exitium" Sanmark
RedGuff
Yannick "SpiKe" Le Guen
+*German
+cvcxc
+Erik "Ablu" Schilling
+Jope "Sless" Withers
+Marvin "Mirio" Beck
+Rudolf "divVerent" Polzer
+Yepoleb
+
*Greek
Γιάννης "Evropi" Α.
Konstantinos "LDinos" Mihalenas
Vindex
*Hungarian
-Ruszkai "C.Brutail" Ákos
+Ruszkai "CuBe0wL" Ákos
xaN1C4n3
*Japanese
*Polish
4m
+Alex "tiprogrammierer.alex" Progger
Amadeusz "amade/proraide" Sławiński
*Portuguese
*Romanian
BusterDBK
Mircea "Taoki" Kitsune
+Tudor "TropiKo" Ionel
*Russian
Alex "alextalker7" Talker
+Alexandr "zrg"
Andrei "adem4ik" Stepanov
gravicappa
Hot Dog
Ari_tent
brunodeleo
Kammy
-roader_gentto
+roader_gentoo
Rodrigo Mouton Laudin
SouL