// fix for common broken config for unknown reason
alias _update_configversion_5 "r_shadow_realtime_world_lightmaps 1; _update_configversion_6"
+// some people have freetype issues, weird
+alias _update_configversion_6 "r_font_disable_freetype 0; utf8_enable 1; _update_configversion_7"
+
// place to put further updates
-alias _update_configversion_6 ""
+alias _update_configversion_7 ""
_update_configversion_$g_configversion
-set g_configversion 6
+set g_configversion 7
set _campaign_index ""
set _campaign_name ""
+// debug
+set _independent_players 0 "DO NOT TOUCH"
+
// define some engine cvars that we need even on dedicated server
set r_showbboxes 0
{
self.enemy.cnt = bound(0, VOL_BASE * autocvar_g_balance_tuba_volume, 1);
self.enemy.count = self.enemy.cnt;
+#ifdef PITCHSHIFT
+ sound7(self.enemy, CH_SHOTS_SINGLE, TUBA_STARTNOTE(0), self.enemy.cnt, self.enemy.attenuate * autocvar_g_balance_tuba_attenuation, 100 * pow(2.0, self.cnt / 12.0), 0);
+#else
sound(self.enemy, CH_SHOTS_SINGLE, TUBA_STARTNOTE(self.cnt), self.enemy.cnt, self.enemy.attenuate * autocvar_g_balance_tuba_attenuation);
+#endif
}
void Ent_TubaNote_StopSound()
void Tuba_Precache()
{
float i;
+#ifdef PITCHSHIFT
+ precache_sound(TUBA_STARTNOTE(0));
+#else
for(i = -18; i <= +27; ++i)
{
precache_sound(TUBA_STARTNOTE(i));
}
+#endif
//precache_sound(""); // we want to change volume of existing sounds
}
+float autocvar__independent_players;
float autocvar__campaign_index;
string autocvar__campaign_name;
float autocvar__sv_init;
self.bot_timelastseengoal = 0;
}
+#if 0
// Release jump button
if(!cvar("sv_pogostick"))
if(self.flags & FL_ONGROUND == 0)
}
}
+#endif
};
void havocbot_movetogoal()
if(clienttype(self) == CLIENTTYPE_BOT && autocvar_g_botclip_collisions)
self.dphitcontentsmask |= DPCONTENTS_BOTCLIP;
self.frags = FRAGS_PLAYER;
- if(independent_players)
+ if(INDEPENDENT_PLAYERS)
MAKE_INDEPENDENT_PLAYER(self);
self.flags = FL_CLIENT;
self.takedamage = DAMAGE_AIM;
}
}
+float clientkilltime;
void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2 = spec
{
float killtime;
+ float starttime;
entity e;
if (gameover)
}
else
{
+ starttime = max(time, clientkilltime);
+
self.killindicator = spawn();
self.killindicator.owner = self;
self.killindicator.scale = 0.5;
setattachment(self.killindicator, self, "");
setorigin(self.killindicator, '0 0 52');
self.killindicator.think = KillIndicator_Think;
- self.killindicator.nextthink = time + (self.lip) * 0.05;
+ self.killindicator.nextthink = starttime + (self.lip) * 0.05;
+ clientkilltime = max(clientkilltime, self.killindicator.nextthink + 0.05);
self.killindicator.cnt = ceil(killtime);
self.killindicator.count = bound(0, ceil(killtime), 10);
//sprint(self, strcat("^1You'll be dead in ", ftos(self.killindicator.cnt), " seconds\n"));
setattachment(e.killindicator, e, "");
setorigin(e.killindicator, '0 0 52');
e.killindicator.think = KillIndicator_Think;
- e.killindicator.nextthink = time + (e.lip) * 0.05;
+ e.killindicator.nextthink = starttime + (e.lip) * 0.05;
+ clientkilltime = max(clientkilltime, e.killindicator.nextthink + 0.05);
e.killindicator.cnt = ceil(killtime);
}
self.lip = 0;
c = c + 1;
if(wb && ((self.weapons & wb) == 0))
{
- W_SwitchWeapon_Force(self, w_getbestweapon(self));
+ if(self.weapon == self.switchweapon)
+ W_SwitchWeapon_Force(self, w_getbestweapon(self));
wb = 0;
}
.float version_mismatch;
float independent_players;
+#define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players)
#define IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER)
#define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER) + ((e).frags = FRAGS_PLAYER_NONSOLID))
// we're using + here instead of , because fteqcc sucks
//pl.disableclientprediction = FALSE;
}
+void GrapplingHookReset(void)
+{
+ if(self.realowner.hook == self)
+ RemoveGrapplingHook(self.owner);
+ else // in any case:
+ remove(self);
+}
+
void GrapplingHookThink();
void GrapplingHook_Stop()
{
missile = WarpZone_RefSys_SpawnSameRefSys(self);
missile.owner = missile.realowner = self;
self.hook = missile;
+ missile.reset = GrapplingHookReset;
missile.classname = "grapplinghook";
missile.movetype = MOVETYPE_FLY;
BADCVAR("bot_number");
BADCVAR("bot_prefix");
BADCVAR("bot_suffix");
+ BADCVAR("bot_config_file");
BADCVAR("capturelimit_override");
BADCVAR("fraglimit_override");
BADCVAR("gametype");
if(score_enabled)
ScoreInfo_SetLabel_TeamScore (ST_SCORE, "score", stprio);
- if not(independent_players)
+ if not(INDEPENDENT_PLAYERS)
ScoreInfo_SetLabel_PlayerScore(SP_KILLS, "kills", 0);
ScoreInfo_SetLabel_PlayerScore(SP_DEATHS, "deaths", SFL_LOWER_IS_BETTER);
- if not(independent_players)
+ if not(INDEPENDENT_PLAYERS)
ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES, "suicides", SFL_LOWER_IS_BETTER);
if(score_enabled)