-
-
Notifications
You must be signed in to change notification settings - Fork 125
Trigger owner can set as player of multiplayer game map #746
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
Conversation
|
Nightly build for this pull request:
|
|
The current approach is not quite good in fact, we don't need a |
It is a mapping from |
// PR #746: [QOL] Trigger owner can set as player of multiplayer game map.
DEFINE_HOOK(0x7272B5, TriggerTypeClass_FillIn_HouseType, 0x6)
{
GET(int, nIndex, EAX);
// Only if the house wasn't found
if (nIndex == -1)
{
GET(const char*, pString, ECX);
nIndex = HouseClass::GetPlayerAtFromString(pString);
if (nIndex == -1)
{
nIndex = atoi(pString);
if (nIndex == -1)
nIndex = 0; // process it like <none>
}
if (HouseClass::IsPlayerAtType(nIndex))
{
if (auto pHouse = HouseClass::FindByPlayerAt(nIndex))
nIndex = pHouse->Type->ArrayIndex;
}
else
nIndex = 0;
R->EAX(nIndex);
}
return 0;
} |
I don't quite understand this method. Two players from the same country can only find the first player to select this country through |
|
我不太能理解这个。。据我所知,多人游戏里如果按照国家类型只能找到第一个选择了这个国家的玩家,所以我才需要建立一个 |
aae92fd to
a32076e
Compare
2128644 to
799ea22
Compare
b429215 to
280b1c8
Compare
|
To discuss: whether this is a duplicate of #1853 |
|
After communicating with the author @ststl-s, I decided to close this PR. The relevant functions will be implemented in PR 1853. |
In a multiplayer map, set trigger owner as '4475'-'4482' is
player@A-player@G. If player nonexist, trigger will be desotroyed.