mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-08 19:43:53 +00:00
Added position update packet in out-of-combat movement code when movement occurs (rule-based; default: false) - appears to help with rubber-banding effect
This commit is contained in:
parent
7a6d5d46f4
commit
c61c275221
@ -3,9 +3,14 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
== 02/25/2017 ==
|
||||
Uleat: Implemented rule-based node pathing for bots
|
||||
- This currently applies to out-of-combat following movement and blocked los in-combat movement
|
||||
- The default is set to 'true' (use node pathing)
|
||||
- The default is set to 'true' (use node pathing)..so, consider disabling it if cpu use is too high
|
||||
- If you want to disable node pathing, apply the optional sql '2017_02_25_bots_use_pathing_rule.sql' file located in the utils/sql/git/bots/optional sub-directory. This will apply a 'false' rule..but, it can be changed as desired
|
||||
- This helps with bot movement..but, there are still issues...
|
||||
Uleat: Implemented rule-based position update packet with movement timer check for bots
|
||||
- This currently only applies to out-of-combat movement
|
||||
- The default is set to 'false' (original behavior) to help save bandwidth (each bot will send an update packet every 1/10th of a second when enabled)
|
||||
- If you want to enable the position update packet, apply the optional sql '2017_02_25_bots_update_position_with_timer_rule.sql' file located in the utils/sql/git/bots/optional sub-directory. This will apply a 'true' rule..but, it can be changed as desired
|
||||
- This appears to help with/eliminate rubber banding
|
||||
|
||||
== 02/23/2017 ==
|
||||
Uleat: Moved bot spell casting chance values into database - this will allow admins to tailor their bots without having to rebuild server code
|
||||
|
||||
@ -558,6 +558,7 @@ RULE_BOOL(Bots, PreferNoManaCommandSpells, true) // Give sorting priority to new
|
||||
RULE_BOOL(Bots, QuestableSpawnLimit, false) // Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl
|
||||
RULE_BOOL(Bots, QuestableSpells, false) // Anita Thrall's (Anita_Thrall.pl) Bot Spell Scriber quests.
|
||||
RULE_INT(Bots, SpawnLimit, 71) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group pseudo-raid (bots are not raidable at this time)
|
||||
RULE_BOOL(Bots, UpdatePositionWithTimer, false) // Sends a position update with every positive movement timer check
|
||||
RULE_BOOL(Bots, UsePathing, true) // Bots will use node pathing when moving
|
||||
RULE_BOOL(Bots, BotGroupXP, false) // Determines whether client gets xp for bots outside their group.
|
||||
RULE_BOOL(Bots, BotBardUseOutOfCombatSongs, true) // Determines whether bard bots use additional out of combat songs (optional script)
|
||||
|
||||
@ -0,0 +1 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Bots:UpdatePositionWithTimer', 'true', 'Sends a position update with every positive movement timer check');
|
||||
23
zone/bot.cpp
23
zone/bot.cpp
@ -2364,6 +2364,7 @@ void Bot::AI_Process() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Test RuleB(Bots, UpdatePositionWithTimer)
|
||||
if(IsMoving())
|
||||
SendPosUpdate();
|
||||
else
|
||||
@ -2528,11 +2529,12 @@ void Bot::AI_Process() {
|
||||
}
|
||||
}
|
||||
else if(AI_movement_timer->Check()) {
|
||||
// Something is still wrong with bot following...
|
||||
// Something is still wrong with bot the follow code...
|
||||
// Shows up really bad over long distances when movement bonuses are involved
|
||||
// The flip-side is that too much speed adversely affects node pathing...
|
||||
if (cur_dist > GetFollowDistance()) {
|
||||
if (RuleB(Bots, UsePathing) && zone->pathing) {
|
||||
if (cur_dist <= GetFollowDistance() + BOT_FOLLOW_DISTANCE_WALK) {
|
||||
if (cur_dist <= BOT_FOLLOW_DISTANCE_WALK) {
|
||||
bool WaypointChanged, NodeReached;
|
||||
|
||||
glm::vec3 Goal = UpdatePath(follow->GetX(), follow->GetY(), follow->GetZ(),
|
||||
@ -2545,8 +2547,8 @@ void Bot::AI_Process() {
|
||||
}
|
||||
else {
|
||||
int speed = GetRunspeed();
|
||||
if (cur_dist > GetFollowDistance() + BOT_FOLLOW_DISTANCE_CRITICAL)
|
||||
speed = ((float)speed * 1.25f); // sprint mod (1/4 boost)
|
||||
if (cur_dist > BOT_FOLLOW_DISTANCE_CRITICAL)
|
||||
speed = ((float)speed * 1.333f); // sprint mod (1/3 boost)
|
||||
|
||||
bool WaypointChanged, NodeReached;
|
||||
|
||||
@ -2560,13 +2562,13 @@ void Bot::AI_Process() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (cur_dist <= GetFollowDistance() + BOT_FOLLOW_DISTANCE_WALK) {
|
||||
if (cur_dist <= BOT_FOLLOW_DISTANCE_WALK) {
|
||||
CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), GetWalkspeed());
|
||||
}
|
||||
else {
|
||||
int speed = GetRunspeed();
|
||||
if (cur_dist > GetFollowDistance() + BOT_FOLLOW_DISTANCE_CRITICAL)
|
||||
speed = ((float)speed * 1.25f); // sprint mod (1/4 boost)
|
||||
if (cur_dist > BOT_FOLLOW_DISTANCE_CRITICAL)
|
||||
speed = ((float)speed * 1.333f); // sprint mod (1/3 boost)
|
||||
|
||||
CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), speed);
|
||||
}
|
||||
@ -2574,6 +2576,13 @@ void Bot::AI_Process() {
|
||||
|
||||
if (rest_timer.Enabled())
|
||||
rest_timer.Disable();
|
||||
|
||||
if (RuleB(Bots, UpdatePositionWithTimer)) { // this helps with rubber-banding effect
|
||||
if (IsMoving())
|
||||
SendPosUpdate();
|
||||
//else
|
||||
// SendPosition(); // enabled - no discernable difference..disabled - saves on no movement packets
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (moved) {
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
#define BOT_FOLLOW_DISTANCE_DEFAULT 184 // as DSq value (~13.565 units)
|
||||
#define BOT_FOLLOW_DISTANCE_DEFAULT_MAX 2500 // as DSq value (50 units)
|
||||
#define BOT_FOLLOW_DISTANCE_WALK 625 // as DSq value (25 units)
|
||||
#define BOT_FOLLOW_DISTANCE_WALK 400 // as DSq value (20 units)
|
||||
#define BOT_FOLLOW_DISTANCE_CRITICAL 22500 // as DSq value (150 units)
|
||||
|
||||
extern WorldServer worldserver;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user