Comment gsc function

This commit is contained in:
FutureRave 2022-01-15 13:49:33 +00:00
parent 3b52208c87
commit 7fab6e136e
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955

View File

@ -643,9 +643,10 @@ namespace Components
Script::ScriptStorage.clear(); Script::ScriptStorage.clear();
}); });
// PlayerCmd_AreControlsFrozen GSC function from Black Ops 2
Script::AddFunction("AreControlsFrozen", [](Game::scr_entref_t entref) // Usage: self AreControlsFrozen(); Script::AddFunction("AreControlsFrozen", [](Game::scr_entref_t entref) // Usage: self AreControlsFrozen();
{ {
auto* ent = Script::GetEntFromEntRef(entref); const auto* ent = Script::GetEntFromEntRef(entref);
if (ent->client == nullptr) if (ent->client == nullptr)
{ {
@ -653,10 +654,7 @@ namespace Components
return; return;
} }
const auto isToggled = (ent->client->flags & Game::PLAYER_FLAG_FROZEN) Game::Scr_AddInt((ent->client->flags & Game::PLAYER_FLAG_FROZEN) != 0);
? 1 : 0;
Game::Scr_AddInt(isToggled);
}); });
Script::AddFunction("DebugCode", [](Game::scr_entref_t) // gsc: DebugCode(<int toggle>) Script::AddFunction("DebugCode", [](Game::scr_entref_t) // gsc: DebugCode(<int toggle>)