forked from mirrors/0ad
Store whether a player is activ in C++
This prevents mods from mutating this value and revealing the map.
Part of this commit is written by @phosit.
(cherry picked from commit c9e76efe7b)
Signed-off-by: Itms <itms@wildfiregames.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -46,6 +46,13 @@ void CComponentTypeScript::Deinit()
|
||||
ScriptFunction::CallVoid(rq, m_Instance, "Deinit");
|
||||
}
|
||||
|
||||
bool CComponentTypeScript::HasMessageHandler(const CMessage& msg, const bool global)
|
||||
{
|
||||
const ScriptRequest rq(m_ScriptInterface);
|
||||
return Script::HasProperty(rq, m_Instance, global ? msg.GetScriptGlobalHandlerName() :
|
||||
msg.GetScriptHandlerName());
|
||||
}
|
||||
|
||||
void CComponentTypeScript::HandleMessage(const CMessage& msg, bool global)
|
||||
{
|
||||
ScriptRequest rq(m_ScriptInterface);
|
||||
|
||||
Reference in New Issue
Block a user