[DiscordArchive] what is the crash?
[DiscordArchive] what is the crash?
Archived author: Rymercyble • Posted: 2022-12-21T22:29:42.932000+00:00
Original source
time to yoink some code from autobalance
Archived author: Anchy • Posted: 2022-12-21T22:30:53.980000+00:00
Original source
lol alright
Archived author: Anchy • Posted: 2022-12-21T22:31:35.737000+00:00
Original source
you could make a pull request to the core for the hooks then make a pull request to autobalance to add open world scaling
Archived author: Rymercyble • Posted: 2022-12-21T22:32:49.451000+00:00
Original source
im not sure if that is supposed to be part of autobalance
Archived author: Rymercyble • Posted: 2022-12-21T23:40:17.421000+00:00
Original source
im starting to get clueless i cant figure out how to get count of attacking players from that hook
Archived author: Anchy • Posted: 2022-12-21T23:55:36.806000+00:00
Original source
what have you tried?
Archived author: Rymercyble • Posted: 2022-12-21T23:56:52.314000+00:00
Original source
```cpp
void OnAddHostileReferenceToThreatContainer(HostileReference *hostileRef) override
{
if (!hostileRef->GetVictim()) {
return;
}
if (!hostileRef->GetVictim()->IsPlayer()) {
return;
}
auto ref = hostileRef;
int count = 0;
while (ref) {
if (!ref->GetVictim()) {
continue;
}
if (ref->GetVictim()->IsPlayer()) {
count++;
}
ref = ref->next();
}
}
```
multiple versions of something like this
Archived author: Anchy • Posted: 2022-12-21T23:57:28.290000+00:00
Original source
yeah that wont work
Archived author: Anchy • Posted: 2022-12-21T23:57:46.280000+00:00
Original source
try this
Archived author: Rymercyble • Posted: 2022-12-21T23:58:07.627000+00:00
Original source
i dont understand why so i clearly dont understand what even is `HostileReference`