Jump to content
Sign in to follow this  
Hawkins

Seek & Destroy and setfuel causing lag

Recommended Posts

Posting this here as this is clearly a mod related issue. This does not happen with the regular BIS helos.

I have two problems with custom helos, first off, if I set their fuel to zero by using the slider in the unit menu, and then set it to full later on, the game will freeze or become very very slow. It happens right after the command.

Secondly, the seek & destroy waypoint seems to be causing the same sort of symptoms, huge lag and even a crash on an MP server, with the server promting out of memory errors.

These two bugs are way out over my head. Not sure what is causing them, but it has to be some kind of an atrribute that the choppers have which causes it, most likely in the cpp? If anyone has any ideas, please let me know. These are driving me and some of my mates over the edge.

Share this post


Link to post
Share on other sites

That's very strange.

But first you need to determine if the problem is in the model itself or if it is in a script of your mod.

To clarify this point, you need to create a temporary test mod folder without any scripts/functions, and use a BIS config.cpp in this \testmodfolder\bin\

In this \testmodfolder\bin\config.cpp, copy/paste the CfgModels part of your addon, then replace one of the BIS helicopter model by the one giving problem by changing the line model="...."; by yours (put the helo in the \testmodfolder\Addons\ subfolder too, but without any config.cpp inside of the pbo, it is important).

This way you have the model without any kind of functions/user action/eventhandler that could create conflicts.

Now try the setfuel command, and the seek&destroy waypoint.

If there is no problem, you may have just found the source of the bug : an eventhandler/function/script conflicting.

If the problem is repeated, so it is in the model. To be sure, remove the CfgModels part you just copy/pasted in your test config.cpp.

If problems occurs again, definitively something to do with the model (or its textures, have you checked all of them are power of 2 sized ? and that none of them has a side that is 8 or more times larger than the other side ?).

Share this post


Link to post
Share on other sites

Thank you Sanctuary! I narrowed the bugger down to a few scripts, and after removing the helidust script from the choppers, the crash seems to have gone away and the mod works well now. Excellent! Thank you again. smile_o.gif

I think there was some problems with the scripts detecting whether the chopper's engine was on or not, since the dust script should kick off as soon as the engine is on, but since the chopper has no fuel and the engine should be on, the script doesn't know what to do. Well, all sorted and well now, will need to edit that script a bit it seems.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×