Skip to content
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

Fixing nullObj being passed in entityKilled #331

Merged
merged 3 commits into from
Mar 23, 2020
Merged

Conversation

Cyruz143
Copy link
Collaborator

Not sure when this started happening but I noticed that vehicles were being deleted nearly instantly when they exploded. Looking at the array, it was filled with <NULL-object>.

Not sure if this is off the back of an ACE update or something but entityKilled is returning a lot of garbage now. Example:

 0:08:01 "O Charlie 3-4:3 REMOTE"
 0:08:01 "<NULL-object>"
 0:08:28 "O Charlie 2-4:1 REMOTE"
 0:08:28 "<NULL-object>"
 0:08:31 "O Charlie 1-1:2 REMOTE"
 0:08:31 "<NULL-object>"

or

 0:09:00 "2a6af13d600# 587069: zastavka_jih.p3d"
 0:09:00 "<NULL-object>"
 0:09:00 "<NULL-object>"
 0:09:00 "<NULL-object>"
 0:09:00 "<NULL-object>"
 0:09:00 "<NULL-object>"
 0:09:00 "<NULL-object>"
 0:09:00 "<NULL-object>"
 0:09:00 "<NULL-object>"
 0:09:00 "<NULL-object>"
 0:09:01 "<NULL-object>"
 0:09:01 "<NULL-object>"
 0:09:01 "<NULL-object>"

Only sensible thing we can do is exit out when anything nuill is passed to the garbage cleaner, will need to keep an eye on the number mid-mission and make sure everything still cleans up properly!

@Cyruz143
Copy link
Collaborator Author

I've changed the filtering logic here too, there were probably a few edge cases that were slipping by so I've changed it to explicitly only loook for the things we want to clean up. @kami- check please.

@Cyruz143
Copy link
Collaborator Author

acemod/ACE3#7561

@@ -79,8 +79,10 @@ hull3_gc_fnc_adjustConfig = {

hull3_gc_fnc_sortDead = {
params ["_killed"];

if (isNull _killed) exitWith {};
if (!(_killed isKindOf "CAManBase") || { !(_killed isKindOf "Car") } || { !(_killed isKindOf "Tank") } || { !(_killed isKindOf "Air") } || { !(_killed isKindOf "Ship") } ) exitWith {};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to replace the ORs with ANDs. Also the line is too long and should be split into multiple lines like this:

if (condition1
    && {condition2}
    && {condition3}) {

@kami- kami- merged commit b5c5c86 into kami-:master Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants