mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
Fix basic mobs triggering click cooldown erroneously. (#95906)
## About The Pull Request Basic Mobs used to always trigger cooldown on clicks. This resulted in missed attacks causing you to have a delay before you could attack again, this makes it really punishing to play as a basic mob. To resolve this I did a mini-refactor on basic mob's attack chain to allow for the return values to determine whether we go on cooldown or not. Preventing attacks that did nothing (due to not passing checks, or simply not having any behavior) from causing cooldown. This fixes #95605 ## Why It's Good For The Game being able to perform melee with the same rules as /human is only fair ## Changelog 🆑 DresserOnFire fix: Fixes a bug where player-controlled basic mobs would get a cooldown when their attacks miss refactor: basic mob attack chain can now decided whether an attack resulted in a cooldown or not. /🆑
This commit is contained in:
@@ -119,3 +119,11 @@ GLOBAL_LIST_EMPTY(customized_pets)
|
||||
#define BB_RAPTOR_FLEE_THRESHOLD "raptor_flee_threshold"
|
||||
|
||||
#define MAX_RAPTOR_POP 64
|
||||
|
||||
|
||||
///Return value for [/mob/living/basic/proc/early_melee_attack]. Using this value will make the attack continue as normal.
|
||||
#define BASIC_MOB_CONTINUE_ATTACK_CHAIN 0
|
||||
///Return value for [/mob/living/basic/proc/early_melee_attack]. Using this value will make the attack end, but not set a cooldown. This is the default.
|
||||
#define BASIC_MOB_END_ATTACK_CHAIN 1
|
||||
///Return value for [/mob/living/basic/proc/early_melee_attack]. Using this value will make the attack end, and sets a cooldown. Useful if you add behavior to early_melee_attack
|
||||
#define BASIC_MOB_END_ATTACK_CHAIN_COOLDOWN 2
|
||||
|
||||
Reference in New Issue
Block a user