[code]if ScriptPostLoad then
print("user_script_1: Taking control of ScriptPostLoad()...")
--check for possible loading errors
if us1_ScriptPostLoad then
print("user_script_1: Warning: Someone else is using our us1_ScriptPostLoad variable!")
print("user_script_1: Exited")
return
end
--backup the current ScriptPostLoad function
us1_ScriptPostLoad = ScriptPostLoad
--this is our new ScriptPostLoad function
ScriptPostLoad = function()
print("user_script_1: ScriptPostLoad(): Entered")
--only do these changes when in SP
--if we wanted them done in MP too, we should check to make sure that we are the server's host: ScriptCB_GetAmHost()
if not ScriptCB_InMultiplayer() then
--build the FakeConsole list
ff_rebuildFakeConsoleList()
--do the FakeConsole commands we want to happen each time a new map starts (when ScriptPostLoad() is normally called)
ff_DoCommand( "Lock Vehicles" ) --prevents everyone from entering vehicles (not good on space maps...)
ff_DoCommand( "Remove Award Effects" ) --no more graphical hues or annoying sounds when you get awards
SetClassProperty("rep_inf_ep2_rifleman", "MaxHealth", 120)
SetClassProperty("rep_inf_ep2_rocketeer", "MaxHealth", 120)
SetClassProperty("rep_inf_ep2_sniper", "MaxHealth", 120)
SetClassProperty("rep_inf_ep2_engineer", "MaxHealth", 120)
SetClassProperty("rep_inf_ep2_jettrooper", "MaxHealth", 120)
SetClassProperty("rep_inf_ep3_rifleman", "MaxHealth", 120)
SetClassProperty("rep_inf_ep3_rocketeer", "MaxHealth", 120)
SetClassProperty("rep_inf_ep3_sniper", "MaxHealth", 120)
SetClassProperty("rep_inf_ep3_engineer", "MaxHealth", 120)
SetClassProperty("rep_inf_ep3_officer", "MaxHealth", 120)
SetClassProperty("rep_inf_ep3_jettrooper", "MaxHealth", 120)
SetClassProperty("rep_inf_ep3_sniper_felucia", "MaxHealth", 120)
SetClassProperty("rep_inf_ep3_pilot", "MaxHealth", 120)
SetClassProperty("rep_inf_ep3_marine", "MaxHealth", 120)
SetClassProperty("cis_inf_rifleman", "MaxHealth", 120)
SetClassProperty("cis_inf_rocketeer", "MaxHealth", 120)
SetClassProperty("cis_inf_sniper", "MaxHealth", 120)
SetClassProperty("cis_inf_engineer", "MaxHealth", 120)
SetClassProperty("cis_inf_officer", "MaxHealth", 120)
SetClassProperty("cis_inf_droideka", "MaxHealth", 120)
SetClassProperty("cis_inf_pilot", "MaxHealth", 120)
SetClassProperty("cis_inf_marine", "MaxHealth", 120)
SetClassProperty("all_inf_rifleman", "MaxHealth", 120)
SetClassProperty("all_inf_rocketeer", "MaxHealth", 120)
SetClassProperty("all_inf_sniper", "MaxHealth", 120)
SetClassProperty("all_inf_engineer", "MaxHealth", 120)
SetClassProperty("all_inf_officer", "MaxHealth", 120)
SetClassProperty("all_inf_wookie", "MaxHealth", 120)
SetClassProperty("all_inf_rifleman_jungle", "MaxHealth", 120)
SetClassProperty("all_inf_rocketeer_jungle", "MaxHealth", 120)
SetClassProperty("all_inf_sniper_jungle", "MaxHealth", 120)
SetClassProperty("all_inf_rifleman_snow", "MaxHealth", 120)
SetClassProperty("all_inf_rocketeer_snow", "MaxHealth", 120)
SetClassProperty("all_inf_sniper_snow", "MaxHealth", 120)
SetClassProperty("all_inf_engineer_snow", "MaxHealth", 120)
SetClassProperty("all_inf_officer_snow", "MaxHealth", 120)
SetClassProperty("all_inf_wookie_snow", "MaxHealth", 120)
SetClassProperty("all_inf_pilot", "MaxHealth", 120)
SetClassProperty("all_inf_marine", "MaxHealth", 120)
SetClassProperty("imp_inf_rifleman", "MaxHealth", 120)
SetClassProperty("imp_inf_rocketeer", "MaxHealth", 120)
SetClassProperty("imp_inf_sniper", "MaxHealth", 120)
SetClassProperty("imp_inf_engineer", "MaxHealth", 120)
SetClassProperty("imp_inf_officer", "MaxHealth", 120)
SetClassProperty("imp_inf_darktrooper", "MaxHealth", 120)
SetClassProperty("imp_inf_rifleman_snow", "MaxHealth", 120)
SetClassProperty("imp_inf_rocketeer_snow", "MaxHealth", 120)
SetClassProperty("imp_inf_sniper_snow", "MaxHealth", 120)
SetClassProperty("imp_inf_engineer_snow", "MaxHealth", 120)
SetClassProperty("imp_inf_pilot", "MaxHealth", 120)
SetClassProperty("imp_inf_marine", "MaxHealth", 120)
--give humans a health regeneration
ff_healthRegen( 15, "humans" )
--clear the FakeConsole table to save memory
gConsoleCmdList = {}
end
--make sure to forward the method call to the real ScriptPostLoad, so the game can function normally
us1_ScriptPostLoad()
print("user_script_1: ScriptPostLoad(): Exited")
end
print("user_script_1: Have control of ScriptPostLoad()")
else
print("user_script_1: Warning: No ScriptPostLoad() to take over")
print("user_script_1: Exited")
return
end
print("user_script_1: Exited")[/code]