• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Fixed Performance Drop in Villages due to BuildingSet Colliders

Hylie Pistof

Curmudgeon
QA Tester
Storm Modder
Pirate Legend
I went into the jungle outside Santo Domingo and all went normally until I left the area with the building with the tree growing in it is.
There are two villages there and when I went there my frame rate fell from 200+ to 10 and stayed there. I had to restart the game to get it running properly again.
The save is just before entering the villages.
 

Attachments

  • -=Player=- Hispaniola.7z
    532.9 KB · Views: 120
So it was OK IN the location with the BuildingSet model that now has collision detection.
But it is NOT OK as soon as you leave there? :shock
 
Thread renamed accordingly. Haven't got time to check; hopefully @Levis can take a look some time.
 
you didn't get any error logs?
You where using the most recent version?
 
@Levis: I loaded Hylie's save and confirmed the problem.
It is very bad in "Hispaniola_village_Exit".

And there are indeed PLENTY error logs:
Code:
RUNTIME ERROR - file: BUILDINGS\Colliders.c; line: 21
Invalid function call
RUNTIME ERROR - file: BUILDINGS\Colliders.c; line: 21
function 'AddCollider' stack error
RUNTIME ERROR - file: BUILDINGS\Colliders.c; line: 92
missed attribute: checkradius
RUNTIME ERROR - file: BUILDINGS\Colliders.c; line: 92
no rAP data
RUNTIME ERROR - file: BUILDINGS\Colliders.c; line: 92
missed attribute: checkradius
[...]
This seems to be a location with a whole bunch of BuildingSet structures in there.
And the collider for the windmill there also did not seem to work.

The first error occurs here:
Code:
      string idx = index;
       Colliders.checklist.(idx).building = building;
       aref Colliderdata; makearef(Colliderdata, Colliders.checklist.(idx));
       GetCollideData(Colliderdata); <--------------- THIS LINE -----------------
       Colliders.checklist.(idx).building.x = x;
       Colliders.checklist.(idx).building.y = y;
       Colliders.checklist.(idx).building.z = z;
       Colliders.checklist.(idx).building.ay = ay;
Can you think of a quick fix by any chance?
 
hmmm seen this error before. tought I fixed it... guess not...
It has something to do with the file not being loaded right.
I can look into this tomorrow but can't make any promises. On monday evening I'm back at my home and I can fix it better.
I'm thinking about using the same technique which is used for quests. So keep 1 file open and only close it and open another one when this is requested. Still it should work .... If you can find anything please tell me. I can't really test ingame that much atm.
 
If it breaks the game just go to BUILDINGS/Colliders.c
At the top there is a define. Set it to 0 and the system will stop working.
 
This is just some new oddities I have been dealing with. Fast travel works when I get stuck.

Getting stuck in a table seems to be a thing now. First I saw others stuck and then one time while exiting the upstairs room I got stuck in a table when I fell through the floor.


Then coming down the stairs at Guadaloupe I got stuck and then pushed out of the building.

Then at another tavern gravity got a little messed up.
POTC4 2015-10-17 16-45-13-07.jpg POTC4 2015-10-18 18-24-47-46.jpg POTC4 2015-10-18 17-01-55-89.jpg POTC4 2015-10-18 20-07-47-95.jpg POTC4 2015-10-18 20-07-58-40.jpg POTC4 2015-10-18 20-08-21-33.jpg
 
I think this is because fast travel not loading the location like I want. Found a problem for the fps problem tough. Expect an update tonight.
 
Why are all these strange things happening in locations that don't even have any BuildingSet structures in them? :shock

@Hylie Pistof: Have you tried switching off that toggle already? I'd be quite curious if that indeed shuts down the strangeness too.
 
Toggle? I don't see one. I am actually enjoying flying all over the place.
At the top of PROGRAM\BUILDINGS\Colliders.c there is:
Code:
#define USE_COLLISSION_DETECTION   1
Set to that 0; I'd really like to know if that stops the flying again. :confused:
 
This should fix some of the problems occuring with the collission detection.

(oh and churches should be collidable now also ;) )
 

Attachments

  • b14_b4_wip19Oct2015.zip
    369.5 KB · Views: 133
This one is "Fixed" by erasing this feature from the game for the time being.
 
Back
Top