set g_mh_weapons_damage 0 "0: no damage, 1: only self-damage for runners, 2: only damage opposing team, 3: only allow hunters to damage runners, 4: self-damage and opposing team damage"
set g_mh_weapons_force 1 "0: no force, 1: only self-force, 2: self-force and opposing team force"
set g_mh_limited_ammunition 0 "do players consume ammunition when firing"
-set g_mh_hunterblind 1 "when this is set, hunters can't see anything until the round starts"
\ No newline at end of file
+set g_mh_hunterblind 1 "when this is set, hunters can't see anything until the round starts"
+set g_mh_autotaunt_runner 1 "when this is set, runners play automatically a sound being noticed by everyone"
+set g_mh_autotaunt_runner_time 35 "runner automatic taunt time, plays a sound automatically when time is over, and restarts taunt time"
\ No newline at end of file
+2 waypoint modes,
waypoints for runners on round start always and waypoints for hunters when there are 3 or more hunters
-only runners can see other runners but hunters don't see others
rename teams as far as possible
add more TODO: notes
-it might need to improve something in Hunter black screen in mh.qh, sv_mh.qc uses HunterEyesStart function to execute black screen
-g_mh_hunterblind 1 // to activate hunter black screen
+if player(runner) taunts, his autotaunt time is restarted. something similar to "voice taunt"
fix waypoint visibility, currently they are always visible to everyone. Fix them to not be visible for spectators of that player.
\ No newline at end of file
timer_color = '1 0 0'; //red
}
+ // Autotaunt feature
+ string timerrunnertaunt_text = string_null;
+ vector timerrunnertaunt_color = '1 1 1';
+ if(!STAT(GAME_STOPPED) && !warmup_stage && STAT(MH_ROUNDTIMER) > 0)
+ {
+ float timeleft_runnertaunt = max(0, STAT(MH_RUNNER_TAUNTTIMER) - time);
+ timeleft_runnertaunt = ceil(timeleft_runnertaunt);
+ timerrunnertaunt_text = strcat("Taunt: ", seconds_tostring(timeleft_runnertaunt));
+ float secondsLeft = timeleft_runnertaunt;
+ if(intermission_time || secondsLeft >= 20 || warmup_stage || STAT(MH_RUNNER_TAUNTTIMER) == 0)
+ timerrunnertaunt_color = '1 1 1'; //white
+ else if(secondsLeft >= 10)
+ timerrunnertaunt_color = '1 1 0'; //yellow
+ else
+ timerrunnertaunt_color = '1 0 0'; //red
+ }
+
+ // Autotaunt feature
+ if(mystatus == MH_STATUS_RUNNER)
+ drawstring_aspect(pos + eX * (0.3 * mySize.x) + eY * (0.7 * mySize.y), timerrunnertaunt_text, vec2(0.3 * mySize.x, mySize.y), timerrunnertaunt_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+
//drawpic_aspect_skin(pos, player_icon, vec2(0.5 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
if(!time_text)
drawstring_aspect(pos, player_text, vec2(mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
if(!eyesblinded)
return false;
+ if(!STAT(GAME_STOPPED) && !warmup_stage && STAT(MH_ROUNDTIMER) > 0)
+ eyesblinded = false;
+
if(time <= huntereyes_fadetime)
{
HUD_HunterEyes();
eyesblinded = true;
huntereyes_appeartime = time;
- float time_mh_roundstart = (time * 2 + cvar("g_mh_warmup")) / 1.655;
- if(time <= cvar("g_mh_warmup")) // if it's the first time round starts
- {
- huntereyes_fadetime = time_mh_roundstart;
- // LOG_INFOF("if ENTERED time: %f", time);
- }
- else
- {
- huntereyes_fadetime = time + cvar("g_mh_warmup");
- // LOG_INFOF("else ENTERED time: %f", time);
- }
-
- // just another test
- // if(huntereyes_fadetime > time)
- // huntereyes_fadetime = time; LOG_INFOF("time: %f", time);
-
- // LOG_INFOF("huntereyes_fadetime: %f", huntereyes_fadetime);
+ huntereyes_fadetime = time + cvar("g_mh_warmup");
}
#endif
\ No newline at end of file
.vector taggedplayerlocation;
.vector taggedplayervelocity;
.vector taggedplayerviewangles;
+.float RunnerSoundTaunt_time;
void MH_FakeTimeLimit(entity e, float t)
{
player.mh_status = MH_STATUS_HUNTER;
else if(player.team == Team_IndexToTeam(2))
player.mh_status = MH_STATUS_RUNNER;
+
+ // Autotaunt feature
+ if(autocvar_g_mh_autotaunt_runner)
+ {
+ if(!game_stopped && !warmup_stage && round_handler_IsActive() && round_handler_IsRoundStarted())
+ {
+ if(time > player.RunnerSoundTaunt_time)
+ {
+ if(player.team == Team_IndexToTeam(2))
+ {
+ // play sound to make hunter notice
+ sound(player, CH_SHOTS, SND_RUNNER_TAUNT_RANDOM(), VOL_BASEVOICE, ATTEN_NORM);
+ player.RunnerSoundTaunt_time = time + autocvar_g_mh_autotaunt_runner_time;
+ STAT(MH_RUNNER_TAUNTTIMER, player) = player.RunnerSoundTaunt_time;
+ }
+ }
+ }
+ else
+ {
+ // LOG_INFOF("^2RESTARTED RUNNER TAUNT TIMER!");
+ player.RunnerSoundTaunt_time = time + autocvar_g_mh_autotaunt_runner_time;
+ STAT(MH_RUNNER_TAUNTTIMER, player) = player.RunnerSoundTaunt_time;
+ }
+ }
}
MUTATOR_HOOKFUNCTION(mh, Damage_Calculate)
return;
}
- if(frag_deathtype==DEATH_CAMP.m_id || !IS_PLAYER(frag_attacker)) return;
+ if(frag_deathtype == DEATH_CAMP.m_id || !IS_PLAYER(frag_attacker)) return;
if(IS_PLAYER(frag_target) && !IS_DEAD(frag_target)){ //check that the target is a player and not dead, allows anyone to knock around corpses for funsies
int autocvar_g_mh_weapons_force;
bool autocvar_g_mh_limited_ammunition;
bool autocvar_g_mh_hunterblind;
+bool autocvar_g_mh_autotaunt_runner;
+float autocvar_g_mh_autotaunt_runner_time;
int mh_teams;
bool allowed_to_spawn_untagged = 1;
const int ST_MH_ROUNDS = 1;
+// Autotaunt feature
+SOUND(RUNNER_TAUNT1, "sound/mh/taunt1");
+SOUND(RUNNER_TAUNT2, "sound/mh/taunt2");
+SOUND(RUNNER_TAUNT3, "sound/mh/taunt3");
+SOUND(RUNNER_TAUNT4, "sound/mh/taunt4");
+SOUND(RUNNER_TAUNT5, "sound/mh/taunt5");
+SOUND(RUNNER_TAUNT6, "sound/mh/taunt6");
+SOUND(RUNNER_TAUNT7, "sound/mh/taunt7");
+SOUND(RUNNER_TAUNT8, "sound/mh/taunt8");
+SOUND(RUNNER_TAUNT9, "sound/mh/taunt9");
+SOUND(RUNNER_TAUNT10, "sound/mh/taunt10");
+Sound SND_RUNNER_TAUNT_RANDOM() {
+ return REGISTRY_GET(Sounds, SND_RUNNER_TAUNT1.m_id + floor(prandom() * 10));
+}
+
bool MH_CheckTeams();
bool MH_CheckWinner();
void MH_RoundStart();
// man hunt
REGISTER_STAT(MH_ROUNDTIMER, float)
+REGISTER_STAT(MH_RUNNER_TAUNTTIMER, float)
#ifdef SVQC
float autocvar_g_teleport_maxspeed;