-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make ViewAsSkill generic for both server and client's usage #51
Comments
In the end we need to move currentPlayer, currentPhase and what ever states that are shared by client/server into RoomState rather than duplicating them. But duplicating it seems to be the only feasible way in the first pass. |
有些功能必须被重复。我来解释一下: 1。对于任何一个操作,服务器端接收到之后,需要检查这个操作的合法性,例如我可以杀一个距离8的人,或者杀空城诸葛亮,服务器应当期待从客户端而言,可能发出任何指令。——所以对服务器提起一个操作之后,服务器要有权说不。此时返回客户端之后,相当于该操作没有发生。 2。对于任何你可能发生非法操作之前,客户端可以从『方便用户』的角度,对某些非法操作进行屏蔽,例如使用杀的时候,自动把超过攻击范围的角色,以及空城诸葛,都给屏蔽了。——但客户端的这个行为,只是一种辅助性 AI ,用来辅助用户操作的,它不可以被依赖为检验动作合法性的标准,服务器端才是用于检测这个动作合法性的实体。 所以,某些操作必然是在客户端存在,同时在服务器端也存在的,虽然他们的用途不完全相同。客户端的存在意义只是帮助用户筛选出合法的操作,但客户端也有权不帮助用户进行这种筛选(例如 3V3 比赛中,你可以故意进行非法操作,扣技术分,然后达到某种目的),真正筛选的是服务器端,这样对所有客户端一视同仁,客户端即使是 AI 也不能作弊了。 |
@pansz That is what this patch is intended for. |
Currently viewAs and viewFilter are only for client side usage. To make it usable on server side for anti-cheating and other purposes. Do following things:
The text was updated successfully, but these errors were encountered: