fix: bot kick menu isn't functional
nav: probably fix for ladder climbing (ref #544 ref #319) bot: implemented [RSE] Neoptolemus's fix for msec calculation (round vs int cast)
This commit is contained in:
parent
4128b27cf4
commit
df9bc66023
6 changed files with 52 additions and 23 deletions
|
|
@ -3713,12 +3713,6 @@ Vector Bot::isBombAudible () {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
uint8_t Bot::computeMsec () {
|
||||
// estimate msec to use for this command based on time passed from the previous command
|
||||
|
||||
return static_cast <uint8_t> (cr::min (static_cast <int32_t> ((game.time () - m_lastCommandTime) * 1000.0f), 255));
|
||||
}
|
||||
|
||||
bool Bot::canRunHeavyWeight () {
|
||||
constexpr auto interval = 1.0f / 10.0f;
|
||||
|
||||
|
|
@ -3730,6 +3724,21 @@ bool Bot::canRunHeavyWeight () {
|
|||
return false;
|
||||
}
|
||||
|
||||
uint8_t Bot::computeMsec () {
|
||||
// estimate msec to use for this command based on time passed from the previous command
|
||||
|
||||
return static_cast <uint8_t> (cr::min (static_cast <int32_t> (cr::roundf ((game.time () - m_lastCommandTime) * 1000.0f)), 255));
|
||||
}
|
||||
|
||||
const Vector &Bot::getRpmAngles () {
|
||||
// get angles to pass to run player move function
|
||||
|
||||
if ((m_pathFlags & NodeFlag::Ladder) || getCurrentTaskId () == Task::Attack) {
|
||||
return pev->v_angle;
|
||||
}
|
||||
return m_moveAngles;
|
||||
}
|
||||
|
||||
void Bot::runMovement () {
|
||||
// the purpose of this function is to compute, according to the specified computation
|
||||
// method, the msec value which will be passed as an argument of pfnRunPlayerMove. This
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue