Skip to content

Commit

Permalink
add match stv recording plugin by F2
Browse files Browse the repository at this point in the history
  • Loading branch information
Arie committed Sep 11, 2016
1 parent 9e1e5ad commit 4b92699
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions app/models/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,12 @@ def end_reservation(reservation)

def enable_demos_tf
demos_tf_file = "#{Rails.root.join("doc", "demostf.smx")}"
copy_to_server([demos_tf_file], "#{tf_dir}/addons/sourcemod/plugins")
record_stv_file = "#{Rails.root.join("doc", "recordstv.smx")}"
copy_to_server([demos_tf_file, record_stv_file], "#{tf_dir}/addons/sourcemod/plugins")
end

def disable_demos_tf
delete_from_server(["#{tf_dir}/addons/sourcemod/plugins/demostf.smx"])
delete_from_server(["#{tf_dir}/addons/sourcemod/plugins/demostf.smx", "#{tf_dir}/addons/sourcemod/plugins/recordstv.smx"])
end

def zip_demos_and_logs(reservation)
Expand Down
Binary file added doc/recordstv.smx
Binary file not shown.
13 changes: 8 additions & 5 deletions lib/reservation.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ sv_rcon_whitelist_address <%= "direct.#{SITE_HOST}" %>
tftrue_no_hats 0
tftrue_logs_prefix "serveme.tf"
tftrue_logs_roundend 0
tftrue_tv_autorecord 0
tftrue_restorestats 1
tv_enable 1
tv_autorecord 1
tv_delaymapchange 1

<% if server_config %>
<%= "exec #{server_config}" %><% end %>
Expand All @@ -30,7 +26,14 @@ tv_delaymapchange 1
<%= %{tftrue_logs_apikey "#{LOGS_TF_API_KEY}"} %>
<% end %>

tv_delaymapchange 1
tv_enable 1
tftrue_tv_autorecord 0
<% if enable_demos_tf? %>
<%= %{sm_demostf_apikey "#{DEMOS_TF_API_KEY}"} %><% end %>
<%= "tv_autorecord 0" %>
<%= %{sm_demostf_apikey "#{DEMOS_TF_API_KEY}"} %>
<% else %>
<%= "tv_autorecord 1" %>
<% end %>

tf_preround_push_from_damage_enable 1

0 comments on commit 4b92699

Please sign in to comment.