-
Notifications
You must be signed in to change notification settings - Fork 10
Change creeper's way to work to a more classic way #509
Comments
To do something simple (easier to maintain), @LeMagnesium & @Crabman77 can you give me you opinion about this little tweak :
Instead of :
The creeper explode attack is from here https://github.com/MinetestForFun/server-minetestforfun/blob/master/mods/mobs/api.lua#L1483 to here https://github.com/MinetestForFun/server-minetestforfun/blob/master/mods/mobs/api.lua#L1658 |
No it's for all mobs.
creepers attack start there -> https://github.com/MinetestForFun/server-minetestforfun/blob/master/mods/mobs/api.lua#L1509 He stop attack there -> https://github.com/MinetestForFun/server-minetestforfun/blob/master/mods/mobs/api.lua#L1529
|
This part of the API will affect not affect any other monsters from what I see (excepted to pumpbooms maybe, which is not a problem). |
@Crabman77 If im not wrong, it's only for all monsters with the attack type 'explode', if i understand well the API @ObaniGemini PS : We can also set a fixed value which will be used tu activate the "start_counter_auto_explode" |
👍 for the fixed value. |
@Darcidride The range factor won't be hardcoded, there is one variable for that already. @Crabman77 I did the modification, I hope I didn't butcher the code. |
@LeMagnesium j'ai un doute sur la 1ere condition, c'est pour tous les mobs, peut être la remettre et ajouter
sinon les autre mobs risquent de ne pas s’arrêter, si un 2ème joueur passe à coté et que le 1er s’éloigne, le mobs ne changera pas de cible. |
- ... but only for non-explosive mobs - #509 , following the advice of @Crabman77
@Crabman77 Et là? |
Oui je pense que c'est bon. |
Je crois que le changement a apporté un bug, les pumboom se mettent à exploser a plusieurs nodes(10) de distance maintenant, dès qu'ils nous voient ils explosent au lieu de venir vers nous et exploser au plus près. |
Fixed 6fd2c78 |
Thank you @Crabman77 |
Actually, creeper's exploding timer is disabled if player moves away from him.
The idea would be to start the timer, and to let the creeper explode even if the player is away, as the classic creeper does, which lets the player dodge him.
The text was updated successfully, but these errors were encountered: