Merge branch 'fixes'

feature/prepare-cross-merge
Ulukyn 4 years ago committed by kaetemi
parent 8df98ce44a
commit ea095ca4f3
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -273,7 +273,7 @@ public:
std::string getEventParamString(uint32 i) { if (i >= _EventParams.size()) return ""; return _EventParams[i]; } std::string getEventParamString(uint32 i) { if (i >= _EventParams.size()) return ""; return _EventParams[i]; }
float getEventParamFloat(uint32 i) { if (i >= _EventParams.size()) return 0.0f; return (float)atof(_EventParams[i].c_str()); } float getEventParamFloat(uint32 i) { if (i >= _EventParams.size()) return 0.0f; return (float)atof(_EventParams[i].c_str()); }
float _AggroRange; uint32 _AggroRange;
uint32 _UpdateNbTicks; uint32 _UpdateNbTicks;
protected: protected:
@ -281,7 +281,7 @@ protected:
/// Team Id of the escort (if any). /// Team Id of the escort (if any).
uint16 _EscortTeamId; uint16 _EscortTeamId;
/// The range of the escort, ie the maximal distance of any escorter player that alow the group to be escorted /// The range of the escort, ie the maximal distance of any escorter player that alow the group to be escorted
float _EscortRange; uint8 _EscortRange;
/// The bots automaticaly spawn when the group is spawned. /// The bots automaticaly spawn when the group is spawned.
bool _AutoSpawn; bool _AutoSpawn;

@ -723,8 +723,8 @@ void CGrpProfileBandit::updateProfile(uint ticksSinceLastUpdate)
break; break;
_Grp->setCenterPos(centerPos); _Grp->setCenterPos(centerPos);
uint32 playerRadius=uint(_AggroRange); uint32 playerRadius=_AggroRange;
uint32 botRadius=uint(_AggroRange); uint32 botRadius=_AggroRange;
uint32 groupPlayerRadius=playerRadius*2; uint32 groupPlayerRadius=playerRadius*2;
uint32 groupBotRadius=botRadius*2; uint32 groupBotRadius=botRadius*2;
@ -910,7 +910,7 @@ void CGrpProfileGuard::beginProfile()
} }
else else
{ {
_AggroRange = 25; _AggroRange = 0;
} }
} }
@ -926,7 +926,9 @@ void CGrpProfileGuard::updateProfile(uint ticksSinceLastUpdate)
CFollowPathContext fpcGrpGuardProfileUpdate("GrpGuardProfileUpdate"); CFollowPathContext fpcGrpGuardProfileUpdate("GrpGuardProfileUpdate");
CAIVision<CPersistentOfPhysical> GuardVision; CAIVision<CPersistentOfPhysical> GuardVision;
const uint32 aggroSize=uint32(_AggroRange); uint32 aggroSize = _Grp->getPersistent()._AggroRange;
if (aggroSize == 0)
aggroSize = 25;
TTicks startVisionTime = CTime::getPerformanceTime(); TTicks startVisionTime = CTime::getPerformanceTime();
@ -3907,8 +3909,8 @@ void CGrpProfileFaction::checkTargetsAround()
if (!_Grp->calcCenterPos(centerPos)) // true if there's some bots in the group. if (!_Grp->calcCenterPos(centerPos)) // true if there's some bots in the group.
break; break;
const uint32 playerRadius=(uint32)(assistPlayers||attackPlayers?thisGrpNpc._AggroRange:0); const uint32 playerRadius=assistPlayers||attackPlayers?thisGrpNpc._AggroRange:0;
const uint32 botRadius=(uint32)(assistBots||attackBots?thisGrpNpc._AggroRange:0); const uint32 botRadius=assistBots||attackBots?thisGrpNpc._AggroRange:0;
Vision.updateBotsAndPlayers(thisGrpNpc.getAIInstance(), centerPos, playerRadius, botRadius); Vision.updateBotsAndPlayers(thisGrpNpc.getAIInstance(), centerPos, playerRadius, botRadius);
} }

@ -592,8 +592,8 @@ void CGrpProfileDynHarvest::checkTargetsAround ()
if (!_Grp->calcCenterPos(centerPos)) // true if there's some bots in the group. if (!_Grp->calcCenterPos(centerPos)) // true if there's some bots in the group.
break; break;
const uint32 playerRadius= uint(30); // _AggroRange); const uint32 playerRadius=30; // _AggroRange);
const uint32 botRadius=uint(0); // _AggroRange); const uint32 botRadius=0; // _AggroRange);
const uint32 minRadius=playerRadius>botRadius?botRadius:playerRadius; const uint32 minRadius=playerRadius>botRadius?botRadius:playerRadius;

@ -1338,7 +1338,7 @@ void setAggro_ff_(CStateInstance* entity, CScriptStack& stack)
{ {
sint32 updateNbTicks = (sint32)(float)stack.top(); sint32 updateNbTicks = (sint32)(float)stack.top();
stack.pop(); stack.pop();
float aggroRange = stack.top(); uint32 aggroRange = (uint32)(float)stack.top();
stack.pop(); stack.pop();
CGroup* const grp = entity->getGroup(); CGroup* const grp = entity->getGroup();

Loading…
Cancel
Save