Roni123
Hardstyle Never Die < 3 !!!
- Joined
- Aug 31, 2010
- Messages
- 152
- Solutions
- 1
- Reaction score
- 18
Good Morning,
Dears,
I have problem with OTHire distro TwistedScorpio/OTHire (https://github.com/TwistedScorpio/OTHire).
When I move or use runes during attack by distance weapons then my attack stopping.
Thanks in advance !
Ok for move I have found the solution,
in player.cpp need to change This line
on
But still not working with runes.
OK with runes got it, need to delete some lines in player.cpp and looking as below,
Dears,
I have problem with OTHire distro TwistedScorpio/OTHire (https://github.com/TwistedScorpio/OTHire).
When I move or use runes during attack by distance weapons then my attack stopping.
Thanks in advance !
Post automatically merged:
Ok for move I have found the solution,
in player.cpp need to change This line
Lua:
setNextAction(OTSYS_TIME() + getStepDuration(dir));
Code:
//setNextAction(OTSYS_TIME() + getStepDuration(dir));
But still not working with runes.
OK with runes got it, need to delete some lines in player.cpp and looking as below,
Lua:
void Player::onAttacking(uint32_t interval)
{
Creature::onAttacking(interval);
}
void Player::doAttacking(uint32_t interval)
{
if(lastAttack == 0){
// - 1 to compensate for timer resolution etc.
lastAttack = OTSYS_TIME() - getAttackSpeed() - 1;
}
// Can't attack while pacified
if(hasCondition(CONDITION_PACIFIED))
{
return;
}
if((OTSYS_TIME() - lastAttack) >= getAttackSpeed() ){
Item* tool = getWeapon();
bool result = false;
const Weapon* weapon = g_weapons->getWeapon(tool);
if(weapon){
result = weapon->useWeapon(this, tool, attackedCreature);
} else{
result = Weapon::useFist(this, attackedCreature);
}
if(result){
lastAttack = OTSYS_TIME();
}
}
}
Last edited: