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"
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
+set g_mh_autotaunt_runner_time 35 "runner automatic taunt time, plays a sound automatically when time is over, and restarts taunt time"
+set g_mh_propmode 1 "when this is set, runners are spawned as props"
\ No newline at end of file
.vector taggedplayervelocity;
.vector taggedplayerviewangles;
.float RunnerSoundTaunt_time;
+.float proptime;
void MH_FakeTimeLimit(entity e, float t)
{
return true;
}
+// Prop feature
+.entity mh_prop; // TODO: to be checked
+MUTATOR_HOOKFUNCTION(mh, FixPlayermodel)
+{
+ entity player = M_ARGV(2, entity);
+
+ if(autocvar_g_mh_propmode)
+ {
+ if (player.team == Team_IndexToTeam(2))
+ {
+ string defaultmodel = M_ARGV(0, string);
+ // TODO: to be checked
+ //M_ARGV(0, string) = player.mh_prop.model;
+ //M_ARGV(1, int) = player.mh_prop.skin;
+
+ defaultmodel = MDL_RUNNER_PROP2.model_str();
+ player.playermodel = defaultmodel; // Runners are transformed into props
+ //cvar_set("sv_defaultcharacter", "1");
+ //cvar_set("sv_defaultplayermodel", "");
+ //_setmodel(player, defaultmodel);
+ //setplayermodel(player, MDL_RUNNER_PROP_RANDOM().model_str());//LOG_INFOF("Runner %s fixplayermodel disabled", player.netname);
+ }
+ }
+}
+
// ===================
// weaponarena hooks
// ===================
else if(player.team == Team_IndexToTeam(2))
player.mh_status = MH_STATUS_RUNNER;
+ if(!IS_DEAD(player) && player.team == Team_IndexToTeam(2))
+ traceline_antilag(
+ player,
+ CS(player).cursor_trace_start,
+ CS(player).cursor_trace_start + normalize(CS(player).cursor_trace_endpos - CS(player).cursor_trace_start) * max_shot_distance,
+ MOVE_NORMAL,
+ player,
+ ANTILAG_LATENCY(player)
+ );
+
// Autotaunt feature
if(autocvar_g_mh_autotaunt_runner)
{
if(player.team == Team_IndexToTeam(1))
HunterEyesStart(player); // Hunters can't see anything until round starts
}
+
+ if(autocvar_g_mh_propmode)
+ {
+ if(player.team == Team_IndexToTeam(2))
+ {
+ setmodel(player, MDL_RUNNER_PROP2);
+ //setplayermodel(player, MDL_RUNNER_PROP_RANDOM().model_str());//prop_setup(player);
+ //setmodel(player, MDL_RUNNER_PROP_RANDOM());
+ LOG_INFOF("Spawned prop");
+ }
+ }
if(player.team == Team_IndexToTeam(2) && !allowed_to_spawn_untagged && Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(2)) > 1 && round_handler_IsActive() && round_handler_IsRoundStarted()){
player.mh_status = MH_STATUS_RUNNER;
int autocvar_g_mh_weapons_force;
bool autocvar_g_mh_limited_ammunition;
bool autocvar_g_mh_hunterblind;
+bool autocvar_g_mh_propmode;
bool autocvar_g_mh_autotaunt_runner;
float autocvar_g_mh_autotaunt_runner_time;
return REGISTRY_GET(Sounds, SND_RUNNER_TAUNT1.m_id + floor(prandom() * 10));
}
+// Prop feature
+MODEL(RUNNER_PROP1, "models/containers/barrel01.iqm");
+MODEL(RUNNER_PROP2, "models/containers/crate01.iqm");
+Model MDL_RUNNER_PROP_RANDOM() {
+ return REGISTRY_GET(Sounds, MDL_RUNNER_PROP1.m_id + floor(prandom() * 2));
+}
+
bool MH_CheckTeams();
bool MH_CheckWinner();
void MH_RoundStart();