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
Massive RPT spam when some virtualised RHS vehicles are attacked #286
Comments
Did a bit of digging. Seems that for some reason,
this is from ("O_Heli_Attack_02_black_F" call ALiVE_fnc_configGetVehicleHitPoints). I'm going to try to run a test now to see which vehicles return with no hitpoints. |
thanks for the report! as far as I understand it, RHS messed up the vehicle hitpoints on this vehicle and this fucks up ALiVE. I believe profileSimulator should fail with grace on such a mistake. |
Yup, seems like a good solution. I just ran some code to see which vehicles will fail and here's a list from Project OPFOR and RHS: I've tested a few of these at random and the error appears predictably. Like you say, seems like failing with grace is the only viable solution to this one! |
If there is an alternate way of grabbing hit points please let me know, otherwise these vehicles when used as profiles, will be killed instantly. |
I've been trying to find a way around it for the past half an hour or so with no luck. No idea why the hitpoints don't return but I'll try again tomorrow. Here's the code I ran to get all these vehicles just in case it's of use to anyone:
|
Incontinentia, perhaps a formal bug report on RHS's bug tracker would be warranted here too? It may be good to make them aware, especially if this is not something the ALiVE guys can workaround. |
I was just doing that but I have a feeling it's a "feature" to do with their fancy armour system. I'll try to find out if there's an alternative way to get the rhs equivalent of hitpoints. Even getAllHitPointsDamage doesn't work on these objects. EDIT: getAllHitPointsDamage does work so I'll keep digging for a way... |
@SpyderBlack723 I've just had some success using this:
This returns a list of hitpoints for the vehicle when the other method doesn't, but it is around 13 times slower. Could be a fallback option if the original returns nothing? |
Final comment of the evening! Changing line 575 from this:
to this:
...solves the issue with the same functionality as before. I don't know the code well enough to say whether the 1.3 ms (vs 0.2 ms) hit is going to be worth it performance wise but at least there's a way around the issue for now. |
Thanks for the effort, I'll try to find some time next week to take a look at it. I'm sure we can find a way to only use the slower method if the first fails. |
In theory that's what it does already - the slower code is only called if ALiVE_fnc_configGetVehicleHitPoints returns []. What I don't quite know is why BIS_fnc_returnChildren works when ALiVE_fnc_configGetVehicleHitPoints doesn't as they look similar from a quick glance. I suspect that BIS_fnc_returnChildren contains a lot of code that could be trimmed regardless. |
Speed isn't really a problem then if that's the only case where it's called. The Profile System will still progress at the same rate anyway. |
…EOS#286 Some RHS vehicles were not returning any hitpoints for use when calculating virtualised damage. [(configfile >> "CfgVehicles" >> _vehicleClass >> "HitPoints"),0] call BIS_fnc_returnChildren; is a much slower method of getting the hitpoints but it seems to be more thorough and works on all RHS vehicles. This is only called when the original method doesn't work. This solves the "Undefined variable in expression: _randomhitpoint" error.
When some virtualised vehicles are attacked, the RPT log quickly fills up with thousands of lines of the following:
I've so far managed to get a repro on all armed RHS M1025 and any vehicles that inherit from them (including those in Project OPFOR). Does not happen when the vehicles aren't virtualised. May happen with other vehicle types too but these are the only ones that I've managed to nail down so far.
Does not occur on vanilla vehicles as far as I'm aware. Repro mission requires RHS.
HitpointRepro.Stratis.zip
Arma3_2017-02-11_18-45-50.txt
The text was updated successfully, but these errors were encountered: