Do you have Fraps installed? I ask because I use it to show the frame rate, and what it shows is a steady pulse in the fps every half second or so. Counting using the old "a thousand 1, a thousand 2" method I get "a thousand" between pulses.
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!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
This is also when I see the function I told being called, thats why I think thats the culprit. I'm going to look at that function this week. Hopefully I can rewrite it enough so it wont cause lag anymore.Do you have Fraps installed? I ask because I use it to show the frame rate, and what it shows is a steady pulse in the fps every half second or so. Counting using the old "a thousand 1, a thousand 2" method I get "a thousand" between pulses.
I have used Shadowplay and find the performance very good . For the first time I have seen FPS go to 62 inThis is also when I see the function I told being called, thats why I think thats the culprit. I'm going to look at that function this week. Hopefully I can rewrite it enough so it wont cause lag anymore.
// check forts for abordage
int iFortsNum = GetAttributesNum(aForts);
fBestDistance = 10000000.0;
for (i=0; i<iFortsNum; i++)
{
aref aFort = GetAttributeN(aForts, i);
iRelation = sti(aFort.relation);
if (iRelation == RELATION_FRIEND) { continue; }
ref rFortCharacter = GetCharacter(sti(aFort.idx));
if (LAi_IsDead(rFortCharacter)) { continue; }
aref aRLoc = FindIslandReloadLocator(sPlayerLocation, rFortCharacter.location.locator);
float fRadius = stf(aRLoc.Radius);
fDistance = stf(aFort.Distance);
if(CheckAttribute(rCharacter, "ship.SubmergeDutchman")) fDistance = DIST_NOSHIP; //Levis no shooting at submerged dutchman
int iFortMode = sti(rFortCharacter.Fort.Mode);
switch (iFortMode)
{
case FORT_NORMAL:
if (iRelation == RELATION_ENEMY)
{
if (fMinEnemyDistance > fDistance) { fMinEnemyDistance = fDistance; }
}
// KK -->
if (sti(rFortCharacter.nation) == PERSONAL_NATION) {
if (!bMapEnter) continue;
if (fDistance > fRadius) continue;
//if (!Character_IsAbordageEnable(rFortCharacter)) { continue; }
if (fBestDistance > fDistance)
{
fBestDistance = fDistance;
bCanEnterToFort = true;
sAbordageLocator = rFortCharacter.location.locator;
iAbordageFortEnemyCharacter = sti(rFortCharacter.index);
}
}
// <-- KK
break;
case FORT_DEAD:
if (fDistance > fRadius) { continue; }
if (fBestDistance > fDistance)
{
fBestDistance = fDistance;
bCanEnterToLand = true;
sIslandID = rIsland.id;
makearef(arIslandReload, rIsland.reload);
sIslandLocator = aRLoc.GoAfterBoard.location;
}
break;
case FORT_ABORDAGE:
if (iRelation == RELATION_ENEMY)
{
if (fMinEnemyDistance > fDistance) { fMinEnemyDistance = fDistance; }
}
if (fDistance > fRadius) { continue; }
if (!Character_IsAbordageEnable(rFortCharacter)) { continue; }
if (fBestDistance > fDistance)
{
fBestDistance = fDistance;
bAbordageFortCanBe = true;
sAbordageLocator = rFortCharacter.location.locator;
iAbordageFortEnemyCharacter = sti(rFortCharacter.index);
}
break;
}
}
// check ships for abordage
int iShipsNum = GetAttributesNum(aShips);
fBestDistance = 10000000.0;
aref aShip; // KK
ref rShipCharacter; // KK
for (i=0; i<iShipsNum; i++)
{
aShip = GetAttributeN(aShips, i);
rShipCharacter = GetCharacter(sti(aShip.idx));
if (LAi_IsDead(rShipCharacter)) { continue; } // TIH moved up here for program speed Aug24'06
if (!Character_IsAbordageEnable(rShipCharacter)) { continue; } // TIH moved up here for program speed Aug24'06
if (IsCompanion(rShipCharacter)) { continue; } // TIH don't even do this stuff with companion ships Aug24'06
fDistance = stf(aShip.Distance); // distance between player ship and this ship
if(CheckAttribute(rCharacter, "ship.SubmergeDutchman")) fDistance = DIST_NOSHIP; //Levis trying to get the Dutchman out of reach when submerged
iRelation = sti(aShip.relation);
// NK surrender 05-04-20 -->
if (iRelation == RELATION_ENEMY && fMinEnemyDistance > fDistance) { fMinEnemyDistance = fDistance; }
if (iRelation != RELATION_ENEMY && !CheckAttribute(rShipCharacter,"surrendered")) { continue; }
//if (fMinEnemyDistance > fDistance) { fMinEnemyDistance = fDistance; }
// NK <--
float fAng = stf(aShip.d_ay); // it's dot.ay between ships
float fRelativeSpeed = stf(aShip.RelativeSpeed); // it's relative speed about player ship
float fEnemyBoxSizeX = stf(rShipCharacter.Ship.BoxSize.x) / 2.0 * (1.0 + makefloat(CheckAttribute(rShipCharacter,"surrendered"))*BOARD_SURR_DISTANCE_MULT); //so you can board surrednered ships from afar. NK 05-04-23 //KB - corrected
bool bAngleTest = abs(fAng) > fOurMaxAbordageAngle && fRelativeSpeed < fOurMaxAbordageSpeed;
if(!USE_REAL_SAILING) bAngleTest = bAngleTest || bGrapplingProfessional; // KNB
//if (abs(fAng) > fOurMaxAbordageAngle && fRelativeSpeed < fOurMaxAbordageSpeed)
float fAbordageDistance = fDistance - fEnemyBoxSizeX - fOurBoxSizeX;
// NK check for surrender 05-04-21 (reorganize this so dist checked first, angle second)
if (fAbordageDistance < fOurMaxAbordageDistance && fBestDistance > fDistance)
{
if(CheckAttribute(rShipCharacter,"surrendered"))
{
/*string sGroupID = rShipCharacter.surrendered.oldgroup;
bool alive = true;
int gidx = Group_FindGroup(sGroupID);
if(gidx == -1) alive = false;
if(alive) alive = Group_isDead(sGroupID);
if(alive)
{
ref gcmdr = Group_GetGroupCommander(sGroupID);
if(SeaAI_GetRelation(sti(gcmdr.index), GetMainCharacterIndex()) != RELATION_ENEMY) { continue; }
}
else { */
// TIH --> use a better function for relation checking to determine if you can board a surrendered ship Aug24'06
//Trace("BDCHK: surrendered ship boarding check: " + rShipCharacter.id + " oldnation: " + rShipCharacter.oldnation + " curnation: " + rShipCharacter.nation );
// attempt 7: (couldn't seem to board ANYONE who surrendered)
//int tmpNation = sti(rShipCharacter.nation);
//rShipCharacter.nation = rShipCharacter.oldnation;
//int tmpRelation = SeaAI_GetRelation(sti(rShipCharacter.index), GetMainCharacterIndex());
//rShipCharacter.nation = tmpNation;
//if (tmpRelation != RELATION_ENEMY) continue;
// LDH unable to board surrendered ship test
// Relations 0=friend, 1=neutral, 2=enemy
// Flags 0=England, 1=France, 5=Portugal
// 5, 1, 0,
//logit("Surrendered ship: flag = " + GetCurrentFlag() + ", oldnation = " + rShipCharacter.oldnation);
// 0 with English (Portugese!!) flag, 1 with personal flag
//logit("NationRelation = " + GetNationRelation(GetCurrentFlag(),sti(rShipCharacter.oldnation)));
// 2
//logit("ActualRelation = " + GetNationRelation2MainCharacter(sti(rShipCharacter.oldnation)));
// attempt 6: (seems to work except for one damned french ship - but he is set to never surrender now, so who cares?)
/* int tmpRelation = "";
if ( GetCurrentFlag() != PERSONAL_NATION )
{
tmpRelation = GetNationRelation(GetCurrentFlag(),sti(rShipCharacter.oldnation));
// Trace("BDCHK: GetNationRelation: " + tmpRelation + " (" + RELATION_ENEMY + ")" );
}
else
{
tmpRelation = GetNationRelation2MainCharacter(sti(rShipCharacter.oldnation));
// Trace("BDCHK: GetNationRelation2MainCharacter: " + tmpRelation + " (" + RELATION_ENEMY + ")" );
}
*/
int tmpRelation = GetNationRelation(GetCurrentFlag(), sti(rShipCharacter.oldnation)); // PB
if (tmpRelation != RELATION_ENEMY) continue;
// attempt 5:
//int tmpnation = sti(rShipCharacter.nation);
//rShipCharacter.nation = rShipCharacter.oldnation;
//if(GetRelation(rCharacter.index,rShipCharacter.index) != RELATION_ENEMY) { rShipCharacter.nation = tmpnation; continue; }
//rShipCharacter.nation = tmpnation;
// attempt 4:
//if(SeaAI_GetRelation(sti(rShipCharacter.index), GetMainCharacterIndex()) != RELATION_ENEMY) { continue; }
// attempt 3:
//if(GetRMRelationType(GetRMRelation(rCharacter, sti(rShipCharacter.oldnation))) != RELATION_ENEMY) { continue; }
// attempt 2:
//if(GetNationRelation2MainCharacter(sti(rShipCharacter.oldnation)) != RELATION_ENEMY) { continue; }
// attempt 1:
//if(GetNationRelation2MainCharacter(sti(rShipCharacter.oldnation)) != RELATION_ENEMY) { continue; }
// TIH <--
//}
//HKE -->
if (!CheckAttribute(rCharacter, "PlayedAbordageSound"))
{
PlayStereoSound("INTERFACE\prepare_for_boarding.wav");
rCharacter.PlayedAbordageSound = true;
}
//<-- HKE
bAbordageShipCanBe = true;
iAbordageShipEnemyCharacter = sti(rShipCharacter.index);
fBestDistance = fDistance;
continue;
}
if (bAngleTest)
{
// NK surrender 05-04-20 <--
//HKE -->
if (!CheckAttribute(rCharacter, "PlayedAbordageSound"))
{
PlayStereoSound("INTERFACE\prepare_for_boarding.wav");
rCharacter.PlayedAbordageSound = true;
}
//<-- HKE
// abordage enable
fBestDistance = fDistance;
bAbordageShipCanBe = true;
iAbordageShipEnemyCharacter = sti(rShipCharacter.index);
// maybe other character want abordage us?
float fEnemyFencing = pow2(stf(rShipCharacter.TmpSkill.Fencing),FENCING_BOARD_PWR); // NK scale by fencingpwr 05-04-20
float fEnemyCrewFencing = (0.1 + fEnemyFencing * stf(rShipCharacter.Ship.Crew.Quantity) * (1.0 - ((1.0 - fclamp(0.1, 10.0, stf(rShipCharacter.ship.crew.morale)/(MORALE_MAX-MORALE_MIN) * 2))/2.0))); // NK add morale 05-04-20
float fRatio = fEnemyCrewFencing / fOurCrewFencing;
if (sti(rShipCharacter.nation) == PIRATE) { fRatio = fRatio * 1.4; }
if (fRatio > 1.2)
{
bAbordageStartNow = true;
break;
}
}
continue;
}
}
I have noticed worse stutters when enemy ships are around.Okay I will look into this more when I'm back.
Untill then all information you can provide would be nice.
For example:
- Does it only happen in battle, or also normally
- Does it happen with all spyglasses or only some
- Does it become worse with a higher spyglass
- Does it happen on each type of ship
- Is it worse when a fort is around
And all other things you can notice .
This is with walking on ship, aiming and using the telescope?
I'm sorry but these kind of posts dont help. I understand its annoying but this doesn't give me much information. If it's really exactly the same in all situations please specificly state it. else try to tell in which situation its worse or if some aspects make it worse. Those kind of small details can help me so much in finding where the problem lies....It is all the time everywhere doing anything and everything.
The more details we've got, the more chance we've got of actually solving the problem.I'm not going to repeat myself again. Figure it out for yourself.
Wish i could but even with aa and everything to the max I have no fps below 30 on both my laptop and desktop...I'm not going to repeat myself again. Figure it out for yourself.