Skip to content

Commit ce28607

Browse files
authored
Merge pull request #18 from RomeoCantCode/main
add workaround because playlistvaroverrides are not set properly when directly booting map
2 parents c713b49 + ddf32ab commit ce28607

File tree

3 files changed

+84
-9
lines changed

3 files changed

+84
-9
lines changed

manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "UnholyTrinity",
3-
"version_number": "1.1.9",
3+
"version_number": "1.2.0",
44
"website_url": "https://github.com/xamionex/xamionex.UnholyTrinity",
55
"description": "Quake Unholy Trinity similar gameplay in titanfall 2",
66
"dependencies": []
7-
}
7+
}

mods/xamionex.UnholyTrinity/mod.json

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
11
{
22
"Name": "xamionex.UnholyTrinity",
33
"Description": "This is my custom weapons for the UnholyTrinity server\n\nThis is a server side script, no need for clients to download",
4-
"Version": "1.1.9",
4+
"Version": "1.2.0",
55
"LoadPriority": 2,
6-
"Scripts": [{
7-
"Path": "WeaponBanList.nut",
8-
"RunOn": "SERVER && MP",
9-
"ServerCallback": {
10-
"After": "WeaponBanList_Init"
6+
"Scripts":[
7+
{
8+
"Path": "WeaponBanList.nut",
9+
"RunOn": "SERVER && MP",
10+
"ServerCallback": {
11+
"After": "WeaponBanList_Init"
12+
}
13+
},
14+
{
15+
"Path": "UnholyTrinity.nut",
16+
"RunOn": "SERVER && MP",
17+
"ServerCallback": {
18+
"After": "UnholyTrinity_Init"
19+
}
20+
}
21+
],
22+
23+
"ConVars":
24+
[
25+
{
26+
"Name": "uht_wenttolobbyfirst",
27+
"DefaultValue": "0"
1128
}
12-
}]
29+
]
1330
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
untyped
2+
3+
global function UnholyTrinity_Init
4+
5+
array<string> maplist = ["mp_forwardbase_kodai", "mp_grave","mp_homestead","mp_thaw","mp_black_water_canal","mp_eden","mp_drydock","mp_crashsite3","mp_complex3","mp_coliseum","mp_angel_city","mp_colony02","mp_relic02","mp_glitch","mp_lf_stacks","mp_lf_meadow","mp_lf_deck","mp_lf_traffic","mp_lf_township","mp_lf_uma","mp_coliseum_column","mp_wargames","mp_rise"]
6+
array<string> types = ["ps","gg","tt","inf","fastball","ctf_comp","hs","cp","lts","ctf","ttdm","turbo_ttdm","attdm","ffa","fra","coliseum","lf","rocket_lf","mfd", "chamber"]
7+
int wentToLobbyFirst
8+
string uht_map
9+
string uht_gamemode
10+
11+
void function UnholyTrinity_Init()
12+
{
13+
wentToLobbyFirst = GetConVarInt( "uht_wenttolobbyfirst" )
14+
15+
if( wentToLobbyFirst == 0)
16+
{
17+
if( GetMapName() == "mp_lobby" )
18+
{
19+
SetConVarString ( "uht_map", "mp_forwardbase_kodai" )
20+
}
21+
else
22+
{
23+
SetConVarString ( "uht_map", GetMapName() )
24+
SetConVarString( "uht_gamemode", GetConVarString( "mp_gamemode" ) )
25+
}
26+
27+
SetCurrentPlaylist( "private_match" )
28+
GameRules_ChangeMap( "mp_lobby", "private_match" )
29+
SetConVarInt( "uht_wenttolobbyfirst", 1 )
30+
}
31+
thread ThreadUnholyTrinity()
32+
}
33+
34+
void function ThreadUnholyTrinity()
35+
{
36+
wait 2.0
37+
38+
if( GetMapName() == "mp_lobby" )
39+
{
40+
uht_gamemode = GetConVarString( "uht_gamemode" )
41+
uht_map = GetConVarString( "uht_map" )
42+
43+
SetPlaylistVarOverride( "custom_air_accel_pilot", "9000" )
44+
SetPlaylistVarOverride( "featured_mode_amped_tacticals", "1" )
45+
SetPlaylistVarOverride( "fp_embark_enabled", "1" )
46+
SetPlaylistVarOverride( "pilot_health_multiplier", "1.01" )
47+
SetPlaylistVarOverride( "oob_timer_enabled", "0" )
48+
SetPlaylistVarOverride( "no_pilot_collision", "1" )
49+
SetPlaylistVarOverride( "run_epilogue", "0" )
50+
SetPlaylistVarOverride( "classic_mp", "0" )
51+
SetPlaylistVarOverride( "scorelimit", "200" )
52+
SetPlaylistVarOverride( "timelimit", "30" )
53+
ServerCommand( "slide_step_velocity_reduction -45" )
54+
55+
SetCurrentPlaylist( uht_gamemode )
56+
GameRules_ChangeMap( uht_map , uht_gamemode )
57+
}
58+
}

0 commit comments

Comments
 (0)